"; $channel = $_SESSION['spid']; $BranchNum = intval($_POST["BranchNum"]); $find = array( "Channel" => $channel, "BranchNum" => $BranchNum ); if ($opType == "del") { if (!DBOper\Remove("GamePackBranch", $find)) { $alertMsg = "删除分支失败!"; \Logging\LogError($alertMsg . print_r($find, true)); return false; } $alertMsg = "删除分支成功!"; \Logging\LogInfo($alertMsg . print_r($find, true)); return true; } $BranchName = $_POST["BranchName"]; $NoticeUrl = $_POST["NoticeUrl"]; $ResourceUrl = $_POST["ResourceUrl"]; $ResourceAwardInfo = $_POST["ResourceAwardInfo"]; // $ResourceAwardVer = intval($_POST["ResourceAwardVer"]); $JsonBranch = intval($_POST["JsonBranch"]); $AuditState = intval($_POST["AuditState"]); $editArray = array( "Channel" => $channel, "BranchNum" => $BranchNum, "BranchName" => $BranchName, "JsonBranch" => $JsonBranch, "NoticeUrl" => $NoticeUrl, "ResourceUrl" => $ResourceUrl, "ResourceAwardInfo" => $ResourceAwardInfo, "AuditState" => $AuditState, // "ResourceAwardVer" => $ResourceAwardVer, ); // 添加 if ($opType == "add") { DBOper\FindOne("GamePackBranch", $find, $ret); if (count($ret) > 0) { $alertMsg = "该分支已存在,不能重复添加!"; \Logging\LogInfo($alertMsg . print_r($editArray, true)); return false; } if (!DBOper\Insert("GamePackBranch", $editArray, $find)) { $alertMsg = "添加分支失败!"; \Logging\LogError($alertMsg . print_r($editArray, true)); return false; } $alertMsg = "添加分支成功!"; \Logging\LogInfo($alertMsg . print_r($editArray, true)); } // 更新 elseif ($opType == "upd") { $find["BranchNum"] = intval($_POST["SrcBranchNum"]); if (!DBOper\Update("GamePackBranch", $find, $editArray, true)) { $alertMsg = "更新分支失败!"; \Logging\LogError($alertMsg . print_r($editArray, true)); return false; } $alertMsg = "更新分支成功!"; \Logging\LogInfo($alertMsg . print_r($editArray, true)); } return true; } $alertMsg = ""; $Permission = \User\Permission::P_OPSPackBranch; $channel = $_SESSION['spid']; $user = new \User\User($_SESSION['UserAccount']); if (!$user->HavePermission($Permission)) { exit; } if ($_POST["opType"]) { PackBranchEdit($_POST["opType"]); } DBOper\Find("GamePackBranch", array("Channel" => $channel), $branchArray); // $branchCount = $branchArray ? count($branchArray) : 0; //显示表格字段配置 key-参数名,value-说明 $tableArray = array( "BranchNum" => array("分支编号", "5%", "center"), "BranchName" => array("名称", "5%", "center"), "JsonBranch" => array("选服Json分支文件", "13%", "center"), "ResourceAwardInfo" => array("资源下载奖励信息", "9%", "center"), // "ResourceAwardVer" => array("奖励版本号", "6%", "center"), "ResourceUrl" => array("资源地址", "28%", "center"), "NoticeUrl" => array("公告地址", "28%", "center"), "AuditState" => array("审核状态", "5%", "center"), "" => array("操作", "", "center"), ); if ($alertMsg) { echo ""; } ?>
打包分支管理
" . $value[0] . ""; } echo " | |
---|---|
"; echo " "; echo " "; echo " | "; continue; } $tdContent = $branchInfo[$key]; if ($key == "JsonBranch") { $tdContent = \ServerOPS\GetCommonServerlistJsonFileName($channel, $tdContent); } elseif ($key == "AuditState") { $tdContent = ($tdContent == 1) ? "是" : "否"; } echo "" . $tdContent . " | "; } echo "