public function actionIndex() { $w = ""; $param = isset($_GET['param']) ? $_GET['param'] : $w; $this->_V->assign('param', $param); FLEA::loadHelper('pager'); $currentPage = isset($_GET['page']) ? $_GET['page'] : 0; $pager = new FLEA_Helper_Pager($this->_M, $currentPage, 2, $param); $pagerData = $pager->getPagerData(); $plist = $pager->findAll(); if (count($plist) > 0) { $socket = FLEA::getSingleton('Util_socketclient'); foreach ($plist as &$devinfo) { foreach ($devinfo['chninfo'] as &$chninfo) { $chninfo['agcstat'] = $socket->ConversionLanguageChinese($chninfo['agcstat']); $chninfo['mutestat'] = $socket->ConversionLanguageChinese($chninfo['mutestat']); $chninfo['passstat'] = $socket->ConversionLanguageChinese($chninfo['passstat']); } } } else { $this->_V->assign('nodata', NODATA); } $chnselect = $this->M_chninfo->findAll('chn<>9 and prgname<>\'\''); $this->_V->assign('chnselect', $chnselect); $this->_V->assign('pagerData', $pagerData); $this->_V->assign('Datalist', $plist); $this->_V->assign('editview', url('socket', 'editview')); $this->_V->display('edit_index.htm'); }
function actionIndex() { // 菜单栏:显示 $this->_V->assign("_op", true); // 模式:列表 + 搜索页 $this->_V->assign("_ds", true); $this->_V->assign("_sp", "user_search.htm"); // 链接:添加 $this->_V->assign("_addurl", url("User", "Add")); // 删除表单:提交地址 $this->_V->assign("_delurl", url("User", "Delete")); // 内容:导航条 $this->_V->assign("_CurrentlyPlace", $this->_N->genNav()); // 权限:需要判断 $this->_V->assign("_rights", $this->_N->judgeRight(array("add" => 'User_Add', "delete" => "User_Delete", "mod" => "User_Modify"))); // 内容:主页面 $this->_V->assign("_MainFile", "user_list.htm"); # 部门数组 $soms = $this->_O->findAll(); $aSom = array(); for ($i = 0; $i < count($soms); $i++) { $aSom[$soms[$i]['org_id']] = $soms[$i]['name']; } $this->_V->assign("soms", $aSom); $w = " username!='admin'"; if ($_POST['searchString'] != "") { $w = empty($w) ? "" : $w . " and "; $w .= " username LIKE '%" . $_POST['searchString'] . "%' or tname LIKE '%" . $_POST['searchString'] . "%'"; } if ($_POST['org_id'] != "-1" and $_POST['org_id'] != '') { $w = empty($w) ? "" : $w . " and "; $w .= " org_id = '" . $_POST['org_id'] . "'"; $org_id = $_POST['org_id']; } else { $org_id = '-1'; } $this->_V->assign('org_id', $org_id); $param = isset($_GET['param']) ? $_GET['param'] : $w; $this->_V->assign('param', $param); // 分页开始 FLEA::loadHelper('pager'); $currentPage = isset($_GET['page']) ? $_GET['page'] : 0; $pager = new FLEA_Helper_Pager($this->_M, $currentPage, PAGESIZE, $param, 'user_id DESC'); $pagerData = $pager->getPagerData(); $plist = $pager->findAll(); if (count($plist) > 0) { for ($i = 0; $i < count($plist); $i++) { //echo $plist[$i]['Updated']; // $plist[$i]['created_d'] = date("Y年n月d日",$plist[$i]['Created']); $plist[$i]['updated_d'] = date("Y年n月d日", $plist[$i]['updated']); $plist[$i]['created_d'] = date("Y年n月d日", $plist[$i]['created']); } } else { $this->_V->assign("nodata", NODATA); } //dump($plist); $this->_V->assign('pagerData', $pagerData); $this->_V->assign("plist", $plist); $this->_V->display('sys_container.htm'); }
public function actionIndex() { // 菜单栏:显示 $this->_V->assign("_op", true); // 模式:列表 + 搜索页 $this->_V->assign("_ds", true); $this->_V->assign("_sp", "time_search.htm"); // 链接:添加 $this->_V->assign("_addurl", url("time", "Add")); // 删除表单:提交地址 $this->_V->assign("_delurl", url("time", "Delete")); // 内容:导航条 $this->_V->assign("_CurrentlyPlace", $this->_N->genNav('c=time&a=Index')); // 权限:需要判断 $this->_V->assign("_rights", $this->_N->judgeRight(array("add" => 'time_Add', "delete" => "time_Delete", "mod" => "time_Modify"))); // 内容:主页面 $this->_V->assign("_MainFile", "time_list.htm"); // 数据 $w = ""; if ($_POST['searchString'] != "") { $w = empty($w) ? "" : $w . " and "; $w .= "( prgname LIKE '%" . $_POST['searchString'] . "%' or schedule LIKE '%" . $_POST['searchString'] . "%' or schedule_desc LIKE '%" . $_POST['searchString'] . "%')"; } $param = isset($_GET['param']) ? $_GET['param'] : $w; $this->_V->assign('param', $param); // 分页开始 FLEA::loadHelper('pager'); $currentPage = isset($_GET['page']) ? $_GET['page'] : 0; $pager = new FLEA_Helper_Pager($this->M_timeinfo, $currentPage, PAGESIZE, $param, 'serial asc'); $pagerData = $pager->getPagerData(); $plist = $pager->findAll(); $chninfo = $this->M_chninfo->findall(); $achninfo = array(); for ($i = 0; $i < count($chninfo); $i++) { $achninfo[$chninfo[$i]['prgname']] = $chninfo[$i]['prgname']; } if (count($plist) > 0) { /*for($i=0;$i<count($plist);$i++) { $plist[$i]['prgname'] = $achninfo[$plist[$i]['serial']]; }*/ } else { $this->_V->assign("nodata", NODATA); } $this->_V->assign('pagerData', $pagerData); $this->_V->assign("plist", $plist); $this->_V->display('sys_container.htm'); }
public function actionIndex() { // 菜单栏:显示 $this->_V->assign("_op", true); // 模式:列表 + 搜索页 $this->_V->assign("_ds", true); $this->_V->assign("_sp", "som_search.htm"); // 链接:添加 $this->_V->assign("_addurl", url("Som", "Add")); // 删除表单:提交地址 $this->_V->assign("_delurl", url("Som", "Delete")); // 内容:导航条 $this->_V->assign("_CurrentlyPlace", $this->_N->genNav()); // 权限:需要判断 $this->_V->assign("_rights", $this->_N->judgeRight(array("add" => 'Som_Add', "delete" => "Som_Delete", "mod" => "Som_Modify"))); // 内容:主页面 $this->_V->assign("_MainFile", "som_list.htm"); // 数据 $w = ""; if ($_POST['searchString'] != "") { $w = empty($w) ? "" : $w . " and "; $w .= " name LIKE '%" . $_POST['searchString'] . "%'"; } $param = isset($_GET['param']) ? $_GET['param'] : $w; $this->_V->assign('param', $param); // 分页开始 FLEA::loadHelper('pager'); $currentPage = isset($_GET['page']) ? $_GET['page'] : 0; $pager = new FLEA_Helper_Pager($this->_M, $currentPage, PAGESIZE, $param, 'org_id DESC'); $pagerData = $pager->getPagerData(); $plist = $pager->findAll(); //dump($plist); if (count($plist) > 0) { for ($i = 0; $i < count($plist); $i++) { $plist[$i]['created_d'] = date("Y年n月d日", $plist[$i]['created']); $plist[$i]['updated_d'] = date("Y年n月d日", $plist[$i]['updated']); } } else { $this->_V->assign("nodata", NODATA); } $this->_V->assign('pagerData', $pagerData); $this->_V->assign("plist", $plist); $this->_V->display('sys_container.htm'); }
public function actionloglist() { // 菜单栏:显示 // $this->_V->assign("_op",true); $this->_V->assign("_rights", $this->_N->judgeRight(array("delete" => "socket_logDelete", "logalldelete" => "socket_logalldelete", "sendlogcvs" => "socket_sendlogcvs"))); //日志功能 $this->_V->assign("_fu", TRUE); $this->_V->assign('_fun', 'log_function.htm'); // 模式:列表 + 搜索页 $this->_V->assign("_ds", TRUE); $this->_V->assign("_sp", "log_search.htm"); // 链接:添加 #$this->_V->assign("_addurl",url("socket","Add")); // 删除表单:提交地址 $this->_V->assign("_delurl", url("socket", "logDelete")); // 内容:导航条 $this->_V->assign("_CurrentlyPlace", $this->_N->genNav()); // 内容:主页面 $this->_V->assign("_MainFile", "log_list.htm"); $log = FLEA::getSingleton('Model_operatorlog'); $utilLog = FLEA::getSingleton('Util_log'); $searchDate = $utilLog->searchDate(); $this->_V->assign('searchTime', $searchDate); //如果超过一定数量的日志,将提示删除日志 $lognum = $log->findCount(); if ($lognum > LogMaxNum) { $this->_V->assign('log_warning', TRUE); } if (isset($_GET['param'])) { $key = explode('|', $_GET['param']); if ($key[0] != '' && $key[1] != '' && $key[2] != '' && $key[3] != '' && $key[4] != '' && $key[5] != '' && $key[6] != '') { $firstTime = $key[0] . '-' . $key[1] . '-' . $key[2]; $lastTime = $key[3] . '-' . $key[4] . '-' . $key[5]; $searchTime = $key[0] . '|' . $key[1] . '|' . $key[2] . '|' . $key[3] . '|' . $key[4] . '|' . $key[5]; $this->_V->assign('startYear', $key[0]); $this->_V->assign('startMonth', $key[1]); $this->_V->assign('startDay', $key[2]); $this->_V->assign('endYear', $key[3]); $this->_V->assign('endMonth', $key[4]); $this->_V->assign('endDay', $key[5]); } } else { if ($_POST['startYear'] != '' && $_POST['startMonth'] != '' && $_POST['startDay'] != '' && $_POST['endYear'] != '' && $_POST['endMonth'] != '' && $_POST['endDay'] != '') { $firstTime = strtotime($_POST['startYear'] . '-' . $_POST['startMonth'] . '-' . $_POST['startDay']); $lastTime = strtotime($_POST['endYear'] . '-' . $_POST['endMonth'] . '-' . $_POST['endDay']); $searchTime = $_POST['startYear'] . '|' . $_POST['startMonth'] . '|' . $_POST['startDay'] . '|' . $_POST['endYear'] . '|' . $_POST['endMonth'] . '|' . $_POST['endDay']; $this->_V->assign('startYear', $_POST['startYear']); $this->_V->assign('startMonth', $_POST['startMonth']); $this->_V->assign('startDay', $_POST['startDay']); $this->_V->assign('endYear', $_POST['endYear']); $this->_V->assign('endMonth', $_POST['endMonth']); $this->_V->assign('endDay', $_POST['endDay']); } } // 数据 $w = ""; if ($firstTime != '' && $lastTime != '') { $w = empty($w) ? "" : $w . " and "; $w .= "(time BETWEEN {$firstTime} and {$lastTime})"; } $param = isset($_GET['param']) ? $_GET['param'] : $searchTime; $this->_V->assign('param', $param); // 分页开始 FLEA::loadHelper('pager'); $currentPage = isset($_GET['page']) ? $_GET['page'] : 0; $pager = new FLEA_Helper_Pager($log, $currentPage, 12, $w, 'serial desc'); $pagerData = $pager->getPagerData(); $plist = $pager->findAll(); if (count($plist) > 0) { foreach ($plist as &$list) { $list['run_type'] = $list['run_type'] ? '<font color="#666666">自动</font>' : '手动'; $list['time'] = date('Y-m-d H:i:s', $list['time']); } } else { $this->_V->assign("nodata", NODATA); } $this->_V->assign('pagerData', $pagerData); $this->_V->assign("plist", $plist); $this->_V->display('sys_container.htm'); }