예제 #1
0
파일: navimenu.php 프로젝트: xuding/gMIS
<?php

$ido = "ido.php";
$myNavi = new PageNavi();
$pnscTodo = "state=? and (touser like ? or togroup like ?)";
$pnsckTodo = $myNavi->signPara($pnscTodo);
$dynamicmenu = '';
$hm = $myNavi->execBy("select levelcode,linkname,modulename,dynamicpara,disptitle,thedb from " . $_CONFIG['tblpre'] . "info_menulist where state=1 order by levelcode", null);
#print_r($hm);
if ($hm[0]) {
    $hm = $hm[1];
    $hmkeys = array();
    $hmkeysbylen = array("2" => array(), "4" => array(), "6" => array(), "8" => array());
    foreach ($hm as $k => $v) {
        $hmkeys[$hm[$k]['levelcode']] = $hm[$k];
        # use levelcode 作为key
        $hmkeysbylen[strlen($hm[$k]['levelcode'])][] = $hm[$k]['levelcode'];
        # 按levelcode的长度划分menu等级
    }
    #print_r($hmkeys);
    #print_r($hmkeysbylen);
    for ($li = 10; $li <= 99; $li++) {
        $li = "" . $li;
        if (in_array($li, $hmkeysbylen[2])) {
            $linfo = $hmkeys[$li];
            $dynamicmenu .= '<li><!--' . $li . '.--><a href="javascript:void(0);" class="menulink">' . $linfo['linkname'] . '</a>' . "\n";
            $dynamicmenu .= "<ul>\n";
            $lv3 = '';
            $lv4 = '';
            foreach ($hmkeysbylen[4] as $k1 => $v1) {
                if (strpos($v1, $li) === 0) {
예제 #2
0
파일: jdo.php 프로젝트: xuding/gMIS
     include "./act/doaddmodi.php";
 }
 if (startsWith($act, "list-dodelete")) {
     $origId = $id;
     include "./act/dodelete.php";
     $url = str_replace('&id=', '&xoid=', $url);
     if ($fmt != '') {
         $data['respobj']['resultobj'] = array('resultcode' => '0', 'resulttrace' => '1511242124', 'targetid' => $origId);
         # unique trace id
     }
 }
 if (isset($data['respobj']['resultobj'])) {
     # json, xml, Tue Nov 24 21:31:23 CST 2015
 } else {
     # html
     $navi = new PageNavi();
     $orderfield = $navi->getOrder();
     if ($orderfield == '') {
         $orderfield = $gtbl->getOrderBy();
         $navi->set('isasc', $orderfield == 'id' ? 1 : 0);
     }
     $gtbl->set("pagesize", $navi->get('pnps'));
     $gtbl->set("pagenum", $navi->get('pnpn'));
     $gtbl->set("orderby", $orderfield . " " . ($navi->getAsc() == 0 ? "asc" : "desc"));
     if ($_REQUEST['pntc'] == '' || $_REQUEST['pntc'] == '0' || $navi->get('neednewpntc') == 1) {
         $pagenum = $gtbl->get('pagenum');
         $gtbl->set('pagenum', 1);
         $hm = $gtbl->getBy("count(*) as totalcount", $navi->getCondition($gtbl, $user));
         #print "get pntc:";
         #print_r($hm);
         if ($hm[0]) {
예제 #3
0
파일: index.php 프로젝트: xuding/gMIS
    $data['user_count'] = $hm[0]['usercount'];
}
$hm = $gtbl->execBy("select * from " . $_CONFIG['tblpre'] . "fin_operatelogtbl order by id desc limit 6");
if ($hm[0]) {
    $hm = $hm[1];
    $data['log_list'] = $hm;
}
$fp = fopen("./ido.php", "r");
if ($fp) {
    $fstat = fstat($fp);
    fclose($fp);
    $mtime = $fstat['mtime'];
    $data['system_lastmodify'] = date("Y-m-d", $mtime);
    #print __FILE__.": lastmodify: ".$data['system_lastmodify'].", mtime:$mtime\n";
}
$data['module_list_order'] = $hm_module_order;
$data['module_list_name'] = $hm_module_name;
$smttpl = getSmtTpl(__FILE__, $act);
$smt->assign('agentname', $_CONFIG['agentname']);
$smt->assign('welcomemsg', $welcomemsg);
$smt->assign('desktopurl', 'ido.php?sid=' . rand(10000, 999999));
$smt->assign('ido', 'ido.php?sid=' . rand(10000, 999999));
$smt->assign('today', date("Y-m-d"));
$smt->assign('historyurl', 'ido.php?tbl=info_operatelogtbl&tit=操作历史记录&a1=0&pnsktogroup=' . $user->getGroup() . '&pnskuserid=' . $userid);
$navi = new PageNavi();
$pnsc = "state=? and (touser like ? or togroup like ?)";
$smt->assign('todourl', 'ido.php?tbl=fin_todotbl&tit=待处理任务&a1=1&pnskstate=0&pnsm=1&pnsktouser='******'&pnsc=' . $pnsc . '&pnsck=' . $navi->signPara($pnsc) . '&pnsktogroup=' . $user->getGroup());
$smt->assign('content', $out);
$smt->assign('rtvdir', $rtvdir);
$smt->assign('isheader', $isheader);
require "./comm/footer.inc";
예제 #4
0
파일: readfield.php 프로젝트: xuding/gMIS
<?php

require "../comm/header.inc";
#require("../class/gtbl.class.php");
#require("../class/pagenavi.class.php");
# read table config, refer to /jdo.php
require "../comm/tblconf.php";
$navi = new PageNavi();
$orderfield = $navi->getOrder();
if ($orderfield == '' && $hasid) {
    $orderfield = $gtbl->getOrderBy();
    $navi->set('isasc', $orderfield == 'id' ? 1 : 0);
}
$gtbl->set("pagesize", 0);
# all records
$gtbl->set("pagenum", $navi->get('pnpn'));
$gtbl->set("orderby", $orderfield . " " . ($navi->getAsc() == 0 ? "asc" : "desc"));
$fieldlist = $_REQUEST['fieldlist'];
$hm = $gtbl->getBy("{$fieldlist}", $navi->getCondition($gtbl, $user));
$tblwidth = "800px";
$intbl = 0;
if ($_REQUEST['mode'] == 'intbl') {
    $tblwidth = "500px";
    $intbl = 1;
}
# view mode
//$out .= "<table align=\"center\" style=\"background:#fff\" width=\"".$tblwidth."\" cellspacing=\"0\" cellpadding=\"0\" border=\"".($intbl==1?"0":"1")."px\">";
$out .= "<table align=\"center\" style=\"background:#fff\" width=\"" . $tblwidth . "\" cellspacing=\"0\" cellpadding=\"0\" class=\"printtbl\">";
if ($hm[0]) {
    $hm = $hm[1];
} else {