<?php
/*
 * @Author: your name
 * @Date: 2018-06-05 18:03:07
 * @LastEditTime : 2020-01-13 09:18:10
 * @LastEditors  : Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \information-system\gys_system\controllers\feedback.php
 */

if (!defined('BASEPATH')) exit('No direct script access allowed');

class Feedback extends CI_Controller {

    function __construct() {
        parent::__construct();
        //todo:判断用户是否登录
        $this->permission->is_admin();
        //$this->output->enable_profiler(TRUE);
        $this->load->model('Groupinfo_model');
        $this->load->model('User_model');
    }

    public function index() {
        echo 'ok';
    }

    public function checkunback() {
        $data = array();
        $vei_sn = $this->permission->admin()->LMI_VEI_SN;
        $check_day_start = date("Y-m-d", strtotime("-6 month"));
        $check_day_end = date("Y-m-d", strtotime("-1 month"));
        $group_list = $this->Groupinfo_model->get_eva_objectinfo(100, false, false, $vei_sn, false, false, null, " EOI_Date between '$check_day_start' and '$check_day_end'  ", ' EOI_Date ASC ');
        if (empty($group_list)) {
            $data[] = array('name' => 'no', 'value' => 'all feedback is sumbit');
        } else {
            $feedbackstring='';
            foreach ($group_list as $item){
                $feedbackstring=$feedbackstring."<tr><td>$item->groupname</td><td>$item->EOI_Date</td><td><a href='javascript:void(0);' onclick=\"hideunbackfeed();toweb('/Cooperate/Feedback_Detail.aspx?ESN=$item->EOI_SN&GSN=$item->EOI_GRI_SN','MainBodyFrame');\" >查看</a></td></tr>";          
            }
            $data[] = array('name' => 'yes', 'value' => $feedbackstring);
        }
        echo json_encode($data);
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */