Пример #1
0
 public function actionchannelview()
 {
     $Datalist = $this->M_chninfo->find($_GET['serial']);
     $this->_V->assign('devname', $_GET['devname']);
     $this->_V->assign('ip', $_GET['ip']);
     $this->_V->assign('port', $_GET['port']);
     $this->_V->assign('Datalist', $Datalist);
     $this->_V->assign('serial', $_GET['serial']);
     $this->_V->display('edit_view.htm');
 }
Пример #2
0
 public function actionweekModify()
 {
     if ($_POST['op']) {
         unset($_POST['op']);
         $_POST['schedule'] = $_POST['hour'] . ':' . $_POST['minute'];
         $chninfo = $this->M_chninfo->find($_POST['chnserial']);
         $_GET['prgname'] = $chninfo['prgname'];
         if ($this->M_timeinfo->update($_POST)) {
             $this->_G->show(2002, "time", "Index");
         } else {
             $this->_G->show(2012, "time", "Modify");
         }
     } else {
         $chninfo = $this->M_chninfo->findall('prgname<>\'\'');
         $hour = array();
         for ($i = 0; $i < 24; $i++) {
             $hour[$i] = str_pad($i, 2, '0', STR_PAD_LEFT);
         }
         $this->_V->assign('hour', $hour);
         $minute = array();
         for ($i = 0; $i < 60; $i++) {
             $minute[$i] = str_pad($i, 2, '0', STR_PAD_LEFT);
         }
         $week = array(1, 2, 3, 4, 5, 6, 7);
         $this->_V->assign('week', $week);
         $this->_V->assign('minute', $minute);
         $this->_V->assign("chninfo", $chninfo);
         // 内容:主页面
         $this->_V->assign("_MainFile", "time_weekedit.htm");
         // 表单地址:添加
         $this->_V->assign("_acurl", url("time", "weekModify"));
         // 操作: 添加
         $this->_V->assign("op", "m");
         // 内容:导航条
         $this->_V->assign("_CurrentlyPlace", $this->_N->genNav('c=time&a=weekModify'));
         //不显示导航条
         //            $this->_V->assign('noview_navigation',TRUE);
         $DataList = $this->M_timeinfo->find($_GET['serial']);
         $time = explode(':', $DataList['schedule']);
         $DataList['hour'] = $time[0];
         $DataList['minute'] = $time[1];
         $this->_V->assign('gainArray', $this->socketClient->gainArray);
         $this->_V->assign("DataList", $DataList);
         $this->_V->display('sys_container.htm');
     }
 }