<?php
# CmsEasy Enterprise Content Management System
# Copyright (C) CmsEasy Co.,Ltd (https://www.CmsEasy.cn). All rights reserved.
if (!defined('ROOT')) exit('Can\'t Access !');

class table_ballot extends table_mode {
    function add_before(act $act=null) {
    }

    function save_before() {
        front::$post['viewgroupid'] = front::$post['viewgroupid'] ? implode(',',front::$post['viewgroupid']) : null;
        front::$post['votegroupid'] = front::$post['votegroupid'] ?implode(',',front::$post['votegroupid']) : null;
        front::$post['resgroupid'] =  front::$post['resgroupid'] ?implode(',',front::$post['resgroupid']) : null;
    }

    function view_before(&$data = null)
    {
        $data['viewgroupid'] = explode(',',$data['viewgroupid']);
        $data['votegroupid'] = explode(',',$data['votegroupid']);
        $data['resgroupid'] = explode(',',$data['resgroupid']);
    }
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) CmsEasy Co., Ltd. (https://www.CmsEasy.cn). All rights reserved.