10323 【越南】后台公会的特殊需求(新增使用媒体卡汇报;新增可选根据媒体卡类型配置账号分组;充值订单、充值排行、查看玩家支持显示分组;)
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据游戏账号返回平台账号明细 |
| | | */ |
| | | function GetAccountInfoByAccID($accID) |
| | | { |
| | | $accIDInfoList = explode("@", $accID); |
| | | $infoCount = count($accIDInfoList); |
| | | if ($infoCount < 3) { |
| | | return array(); |
| | | } |
| | | $sid = $accIDInfoList[$infoCount - 1]; |
| | | $platform = $accIDInfoList[$infoCount - 2]; |
| | | $AccountID = join("@", array_slice($accIDInfoList, 0, $infoCount - 2)); |
| | | $accountInfo = array( |
| | | "AccountID" => $AccountID, |
| | | "Channel" => $platform, |
| | | "ServerID" => GetServerIDBySid($sid), |
| | | ); |
| | | return $accountInfo; |
| | | } |
| | | |
| | | /** |
| | | * 根据字符串取服务器id,一般正常的格式为 sxxx |
| | | * @param string $sid 字符串 s+服务器ID |
| | | * @return number 大于等于0代表服务器ID |
| | |
| | | <?php |
| | | include_once "/db/DataMgr.php"; |
| | | include_once "/language/lang.php"; |
| | | include_once "/Common/CommFunc.php"; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | CommFunc\GetConfig("ServerInfo", "CoupontypeGroup", $CoupontypeGroup); |
| | | $CoupontypeGroup = json_decode($CoupontypeGroup, true); |
| | | if (isset($CoupontypeGroup)) { |
| | | $playerInfoKeyCh["AccountGroup"] = \Lang\gettext('分组'); |
| | | $accountInfo = \CommFunc\GetAccountInfoByAccID($playerInfo["AccID"]); |
| | | $Coupontype = \DataMgr\GetCoupontypeGroup($accountInfo["Channel"], $accountInfo["AccountID"], $accountInfo["ServerID"]); |
| | | $playerInfo["AccountGroup"] = array_key_exists($Coupontype, $CoupontypeGroup) ? $CoupontypeGroup[$Coupontype] : ""; |
| | | } |
| | | |
| | | //echo $_POST[data]; |
| | | ?> |
| | | |
| | |
| | | ;自动开服限制时间范围列表,24小时制 [["从x时:分", "到x时:分"], ...] |
| | | AutoOpenServerLimitTimeRange = '[["23:30", "00:20"], ["01:00", "06:00"]]' |
| | | |
| | | ;媒体卡类型对应分组,目前用于越南版本运营公会分组 {"卡类型":"显示分组名", ...} |
| | | CoupontypeGroup = '{"g001":"公会1", "g002":"公会2"}' |
| | | |
| | | [db] |
| | | |
| | | ;接口Mongo数据库IP |
New file |
| | |
| | | <?php |
| | | |
| | | namespace DataMgr; |
| | | |
| | | include_once 'DBOper.php'; |
| | | |
| | | /**获取媒体卡账号分组 */ |
| | | function GetCoupontypeGroup($Channel, $AccountID, $ServerID) |
| | | { |
| | | \DBOper\FindOne("CoupontypeGroup", array( |
| | | "Channel" => $Channel, |
| | | "AccountID" => $AccountID, |
| | | "ServerID" => $ServerID |
| | | ), $findData); |
| | | if ($findData) { |
| | | return $findData["Coupontype"]; |
| | | } |
| | | return ""; |
| | | } |
| | |
| | | array("Channel" => 1, "YMD" => -1), |
| | | array("unique" => true), |
| | | ), |
| | | ), |
| | | |
| | | "CoupontypeGroup" => array( |
| | | array( |
| | | array("Channel" => 1, "AccountID" => 1, "ServerID" => 1), |
| | | array("unique" => true), |
| | | ) |
| | | ) |
| | | ); |
| | | |
| | |
| | | } |
| | | break; |
| | | |
| | | case "CouponCode": |
| | | $ok = RecordCoupontypeGroup(); |
| | | break; |
| | | |
| | | default: |
| | | Response(1001, "unknown eventID -> " . $EventID); |
| | | exit; |
| | |
| | | } |
| | | \DBOper\Update("AccountDayActive", $find, $actInfo, false, true); |
| | | } |
| | | |
| | | /**记录媒体卡账号分组 */ |
| | | function RecordCoupontypeGroup() |
| | | { |
| | | global $Channel, $RegionName; |
| | | |
| | | $ServerID = \CommFunc\GetServerIDBySid($RegionName); |
| | | if (!$ServerID) { |
| | | return; |
| | | } |
| | | |
| | | CommFunc\GetConfig("ServerInfo", "CoupontypeGroup", $CoupontypeGroup); |
| | | if (!$CoupontypeGroup) { |
| | | // \Logging\LogInfo("CoupontypeGroup 不需要"); |
| | | return; |
| | | } |
| | | |
| | | $AccountID = $_GET["accid"]; |
| | | $code = $_GET["code"]; |
| | | $coupontype = $_GET["coupontype"]; |
| | | |
| | | $find = array("Channel" => $Channel, "AccountID" => $AccountID, "ServerID" => $ServerID); |
| | | if (!\DBOper\FindOne("CoupontypeGroup", $find, $findData)) { |
| | | return; |
| | | } |
| | | if (isset($findData)) { |
| | | // \Logging\LogInfo("已存在,不再重复添加: " . print_r($findData, true)); |
| | | return true; |
| | | } |
| | | |
| | | $insArray = array( |
| | | "Channel" => $Channel, |
| | | "AccountID" => $AccountID, |
| | | "ServerID" => $ServerID, |
| | | "CreateTime" => date("Y-m-d H:i:s"), |
| | | "Coupontype" => $coupontype, |
| | | "Code" => $code, |
| | | ); |
| | | if (\DBOper\Insert("CoupontypeGroup", $insArray, $find)) { |
| | | \Logging\LogInfo("记录使用媒体卡首次分组: " . print_r($insArray, true)); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | include_once "/Common/Logging.php"; |
| | | include_once "/Account/User.php"; |
| | | include_once "/db/DBOper.php"; |
| | | include_once "/db/DataMgr.php"; |
| | | include_once "/language/lang.php"; |
| | | |
| | | \Logging\CreateLogging("payorderlist.php"); |
| | |
| | | $tableArray = array( |
| | | "Num" => array(\Lang\gettext("编号"), "3%", "center"), |
| | | "OrderID" => array(\Lang\gettext("订单ID"), "15%", "center"), |
| | | "AccountGroup" => array(\Lang\gettext("分组"), "3%", "center"), |
| | | "AccountID" => array(\Lang\gettext("游戏账号"), "15%", "center"), |
| | | "OrderInfo" => array(\Lang\gettext("商品编号"), "8%", "center"), |
| | | "OrderAmount" => array(\Lang\gettext("支付金额"), "5%", "center"), |
| | |
| | | "Createtime" => array(\Lang\gettext("订单时间"), "11%", "center"), |
| | | "PayTime" => array(\Lang\gettext("支付时间"), "11%", "center"), |
| | | "OrderIDSDK" => array(\Lang\gettext("SDK订单ID"), "15%", "center"), |
| | | "State" => array(\Lang\gettext("状态"), "5%", "center"), |
| | | "State" => array(\Lang\gettext("状态"), "3%", "center"), |
| | | "" => array(\Lang\gettext("操作"), "", "center"), |
| | | ); |
| | | |
| | | // 保存cookie |
| | | setcookie("limit", $limit); |
| | | |
| | | CommFunc\GetConfig("ServerInfo", "CoupontypeGroup", $CoupontypeGroup); |
| | | $CoupontypeGroup = json_decode($CoupontypeGroup, true); |
| | | if (!isset($CoupontypeGroup)) { |
| | | unset($tableArray['AccountGroup']); |
| | | $tableArray['State'][1] = "5%"; |
| | | } |
| | | |
| | | ?> |
| | | |
| | |
| | | $tdContent = $Num; |
| | | } elseif ($key == "AccountID") { |
| | | $tdContent = $info["AccountID"] . "@" . $info["Channel"] . "@s" . $info["ServerID"]; |
| | | } elseif ($key == "AccountGroup") { |
| | | $Coupontype = \DataMgr\GetCoupontypeGroup($info["Channel"], $info["AccountID"], $info["ServerID"]); |
| | | $tdContent = array_key_exists($Coupontype, $CoupontypeGroup) ? $CoupontypeGroup[$Coupontype] : ""; |
| | | } elseif ($key == "OriginalAmount") { |
| | | if (array_key_exists("OriginalAmount", $info)) { |
| | | $tdContent = $info["OriginalAmount"]; |
| | |
| | | include_once "/Common/Logging.php"; |
| | | include_once "/Account/User.php"; |
| | | include_once "/db/DBOper.php"; |
| | | include_once "/db/DataMgr.php"; |
| | | include_once "/language/lang.php"; |
| | | |
| | | \Logging\CreateLogging("payrank.php"); |
| | |
| | | } |
| | | $server_id = $_SESSION['server_id']; |
| | | |
| | | $isSpecialAccount = False; |
| | | \CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList); |
| | | $SpecialAccountList = explode(",", $SpecialAccountList); |
| | | // 特殊账号,只能看本服 |
| | | if (in_array($UserAccount, $SpecialAccountList)) { |
| | | $isSpecialAccount = True; |
| | | } |
| | | |
| | | $match = array("Channel" => $spid); |
| | | |
| | | $limit = 100; |
| | |
| | | } |
| | | |
| | | $onlyServerID = $_POST["onlyServerID"]; |
| | | if ($onlyServerID == "on") { |
| | | if ($onlyServerID == "on" || $isSpecialAccount) { |
| | | $serversCfg = $user->GetServersCfg($spid); |
| | | if (array_key_exists($server_id, $serversCfg)) { |
| | | $match["ServerID"] = intval($serversCfg[$server_id]["ServerID"]); |
| | |
| | | //显示表格字段配置 key-参数名,value-说明 |
| | | $tableArray = array( |
| | | "Num" => array(\Lang\gettext("编号"), "3%", "center"), |
| | | "AccountGroup" => array(\Lang\gettext("分组"), "5%", "center"), |
| | | "_id" => array(\Lang\gettext("游戏账号"), "15%", "center"), |
| | | "total" => array(\Lang\gettext("充值总金额"), "5%", "center"), |
| | | ); |
| | | |
| | | CommFunc\GetConfig("ServerInfo", "CoupontypeGroup", $CoupontypeGroup); |
| | | $CoupontypeGroup = json_decode($CoupontypeGroup, true); |
| | | if (!isset($CoupontypeGroup)) { |
| | | unset($tableArray['AccountGroup']); |
| | | } |
| | | |
| | | ?> |
| | | |
| | |
| | | <input type="text" name="endDate" id="endDate" onclick="new Calendar().show(this);" readonly value="<?php echo $endDate; ?>" size="8" /> |
| | | 前x名: <input type="number" name="limit" id="limit" value="<?php echo $limit ?>" min="1" /> |
| | | <?php |
| | | // 仅显示本服 |
| | | echo " "; |
| | | echo '<input type="checkbox" name="onlyServerID" id="onlyServerID" ' . ($onlyServerID == "on" ? "checked" : "") . ' />' . \Lang\gettext("仅显示本服"); |
| | | if (!$isSpecialAccount) { |
| | | // 仅显示本服 |
| | | echo " "; |
| | | echo '<input type="checkbox" name="onlyServerID" id="onlyServerID" ' . ($onlyServerID == "on" ? "checked" : "") . ' />' . \Lang\gettext("仅显示本服"); |
| | | } |
| | | ?> |
| | | <input type="submit" name="submit" value="<?php echo \Lang\gettext("查询"); ?>" class="button green medium" /> |
| | | <hr /> |
| | |
| | | $tdContent = $info[$key]; |
| | | if ($key == "Num") { |
| | | $tdContent = $Num; |
| | | } elseif ($key == "AccountGroup") { |
| | | $idInfo = $info["_id"]; |
| | | $Coupontype = \DataMgr\GetCoupontypeGroup($spid, $idInfo["AccountID"], $idInfo["ServerID"]); |
| | | $tdContent = array_key_exists($Coupontype, $CoupontypeGroup) ? $CoupontypeGroup[$Coupontype] : ""; |
| | | } elseif ($key == "_id") { |
| | | $tdContent = $tdContent["AccountID"] . "@" . $spid . "@s" . $tdContent["ServerID"]; |
| | | } |