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]) { $hm = $hm[1][0]; $navi->set('totalcount', $hm['totalcount']); } $gtbl->set('pagenum', $pagenum); } # list start
<?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 {