HavePermission($Permission)) { exit; } $Organization = array_key_exists("Organization", $_POST) ? $_POST["Organization"] : $user->GetAttr("Organization"); $showPermissionArray = array(); $PermissionModules = \User\GetPermissionModules(); foreach ($PermissionModules as $index => $mInfo) { foreach ($mInfo["PList"] as $pName => $pInfo) { if (!$pInfo["Log"]) { continue; } if (!$user->HavePermission($pName, false)) { // 只展示自己有的权限动态 continue; } $showPermissionArray[$pName] = $pInfo; } } $findPermission = $_POST["findPermission"]; $findCheckState = intval($_POST["findCheckState"]); $onlyErrorMsg = $_POST["onlyErrorMsg"]; $find = array("SPID" => $spid); if ($findPermission) { $find["Permission"] = $findPermission; } else { $find["Permission"] = array('$in' => array_keys($showPermissionArray)); } if ($findCheckState) { $find["CheckState"] = $findCheckState; } if ($onlyErrorMsg == 'on') { $find["ErrorMsg"] = array('$nin' => array(array())); } $limitDefault = 15; $limit = array_key_exists("limit", $_COOKIE) ? intval($_COOKIE["limit"]) : $limitDefault; // 单页条数 $page = 1; if (array_key_exists("limit", $_POST) && intval($_POST["limit"]) > 0) { $limit = intval($_POST["limit"]); } if (array_key_exists("topage", $_POST) && intval($_POST["topage"]) > 1) { $page = intval($_POST["topage"]); } else if (array_key_exists("page", $_POST) && intval($_POST["page"]) > 1) { $page = intval($_POST["page"]); } $skip = ($page - 1) * $limit; \DBOper\Find("GMTLog", $find, $logArray, null, array("OPTime" => -1), $limit, $skip); $totalCount = count($logArray); if ($totalCount >= $limit || $page > 1) { $totalCount = \DBOper\Count("GMTLog", $find); } //显示表格字段配置 key-参数名,value-说明 $tableArray = array( "Num" => array(\Lang\gettext("编号"), "3%", "center"), "UserAccount" => array(\Lang\gettext("操作账号"), "8%", "center"), "Permission" => array(\Lang\gettext("操作类型"), "8%", "center"), "Post" => array(\Lang\gettext("请求数据"), "10%", "center"), "Result" => array(\Lang\gettext("请求结果"), "12%", "center"), "OPTime" => array(\Lang\gettext("请求时间"), "11%", "center"), "IP" => array("IP", "9%", "center"), "CheckState" => array(\Lang\gettext("审核状态"), "5%", "center"), "CheckUserAccount" => array(\Lang\gettext("审核账号"), "8%", "center"), "CheckTime" => array(\Lang\gettext("审核时间"), "11%", "center"), "CheckIP" => array(\Lang\gettext("审核IP"), "9%", "center"), "" => array(\Lang\gettext("操作"), "", "center"), ); if ($alertMsg) { echo ""; } $checkStateNameInfo = \User\GMTCheckState::StateNameInfo(); // echo "_COOKIE:", json_encode($_COOKIE), "
"; // echo "_POST:", json_encode($_POST), "
"; // echo "find:", json_encode($find), "
"; $showDetailInfo = array( 0 => \Lang\gettext("简要信息"), 1 => \Lang\gettext("明细信息"), ); $showDetail = array_key_exists("showDetail", $_COOKIE) ? intval($_COOKIE["showDetail"]) : 0; if (array_key_exists("showDetail", $_POST)) { $showDetail = intval($_POST["showDetail"]); } // 保存cookie setcookie("limit", $limit); setcookie("showDetail", $showDetail); ?> <?php echo \Lang\gettext("操作动态"); ?>

"; echo ""; foreach ($showPermissionArray as $pName => $pInfo) { echo ""; } echo ""; echo "  "; echo ""; //明细信息 echo "  "; foreach ($showDetailInfo as $value => $t) { echo "" . $t; } // 过滤错误结果 echo "  "; echo '' . \Lang\gettext("仅显示错误请求"); echo "  "; echo \Lang\gettext("单页条数"), ": "; echo ""; ?>   " class="button green medium" />
"; foreach ($tableArray as $value) { echo ""; } else { echo \Lang\gettext("暂无动态"), "
"; } $Num = $skip; foreach ($logArray as $logInfo) { $Num += 1; echo ""; $Permission = $logInfo["Permission"]; $GUID = $logInfo["GUID"]; $PerInfo = \User\GetPermissionInfo($Permission); $MultiServer = $logInfo["Post"]["MultiServer"]; foreach ($tableArray as $key => $value) { if (!$key) { echo ""; continue; } $tdContent = $logInfo[$key]; if ($key == "Num") { $tdContent = $Num; } else if ($key == "Permission") { $tdContent = $PerInfo["Name"]; } else if ($key == "CheckState") { if ($tdContent == \User\GMTCheckState::OK && !$logInfo["CheckUserAccount"]) { $tdContent = \Lang\gettext("免审通过"); } else { $tdContent = $checkStateNameInfo[$tdContent]; } } else if ($key == "Post") { ParseGMTLogTDHtml_Post($logInfo, $showDetail, $tdContent); } else if ($key == "Result") { ParseGMTLogTDHtml_Result($logInfo, $showDetail, $tdContent); } else if ($key == "OPTime") { $tdContent = date("Y-m-d H:i:s", $tdContent); } else if ($key == "CheckTime" && $tdContent) { $tdContent = date("Y-m-d H:i:s", $tdContent); } echo ""; } echo ""; } ?>
" . $value[0] . ""; } echo "
"; echo ""; echo ""; echo "
" . $tdContent . "
"; echo "