| <?php | 
| include_once "/Account/User.php"; | 
| include_once "/Common/Logging.php"; | 
| include_once "/Common/CommFunc.php"; | 
| include_once "/language/lang.php"; | 
|   | 
| \Logging\CreateLogging("DelPlayerMoney.php"); | 
|   | 
| $Permission = \User\Permission::P_DelPlayerMoney; | 
| $spid = $_SESSION['spid']; | 
| $user = new \User\User($_SESSION['UserAccount']); | 
| if (!$user->HavePermission($Permission)) { | 
|     exit; | 
| } | 
|   | 
| $moneyNameInfo = CommFunc\getCfgKeyNameContent("money", true); | 
|   | 
| ?> | 
|   | 
| <!DOCTYPE html> | 
| <html> | 
|   | 
| <head> | 
|     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | 
|     <title><?php echo \Lang\gettext("扣除玩家货币"); ?></title> | 
|     <link rel="gettext" type="application/x-po" href="../language/<?php echo \Lang\getLang(); ?>/LC_MESSAGES/<?php echo \Lang\getjspodomain(); ?>.po" /> | 
| </head> | 
|   | 
| <body> | 
|   | 
|     <form id="DelPlayerMoney" name="DelPlayerMoney" action="/Common/GMCmdProcess.php" method="post"> | 
|   | 
|         <center> | 
|             <p><?php echo \Lang\gettext("扣除玩家货币"); ?></P> | 
|         </center> | 
|   | 
|         <dd class="def_dd"> | 
|             <label><?php echo \Lang\gettext("目标玩家"); ?>:</label> <br /> | 
|             <input type="radio" name="queryType" value="accID" checked /> | 
|             <span><?php echo \Lang\gettext("按账号"); ?></span> | 
|             <input type="radio" name="queryType" value="playerName" /> | 
|             <span><?php echo \Lang\gettext("角色名"); ?></span><br /> | 
|             <input class="long_input" type="text" name="playerFind" id="playerFind" value="" /> | 
|             <p /> | 
|   | 
|             <label><?php echo \Lang\gettext("货币类型"); ?>:</label> | 
|             <?php echo "1-" . $moneyNameInfo["1"] . ";" . | 
|                 "2-" . $moneyNameInfo["2"] . ";" . | 
|                 "3-" . $moneyNameInfo["3"] . ";" . | 
|                 "4-" . $moneyNameInfo["4"] . ";" . | 
|                 \Lang\gettext("或输入其他自定义类型") . ";" | 
|             ?> | 
|             <br /> | 
|             <input class="long_input" type="number" name="moneyType" id="moneyType" value="1" min="1" /> | 
|             <p /> | 
|             <label><?php echo \Lang\gettext("扣除数量"); ?>:</label><br /> | 
|             <input class="long_input" type="number" name="moneyValue" id="moneyValue" value="" min="1" /> | 
|             <p /> | 
|             <label><?php echo \Lang\gettext("扣除说明"); ?>:</label><br /> | 
|             <input class="long_input" type="text" name="delRemark" id="delRemark" value="" /> | 
|             <p /> | 
|             <?php | 
|             if ($user->NeedCheckKey()) { | 
|                 echo \Lang\gettext("授权码(key)") . ":<br/>"; | 
|                 echo "<input type=\"text\" name=\"key\" id=\"key\" />"; | 
|             } else { | 
|                 echo "<input type=\"hidden\" name=\"key\" id=\"key\" />"; | 
|             } | 
|             ?> | 
|             <p /> | 
|         </dd> | 
|   | 
|         <input type="hidden" name="Permission" value="<?php echo $Permission; ?>" /> | 
|         <input type="hidden" name="pack_type" value="GMT_DelPlayerMoney" /> | 
|         <dd class="submit_dd"> | 
|             <input type="submit" name="submit" value="<?php echo \Lang\gettext("提交"); ?>" onclick="return CheckSubmit()" /> | 
|         </dd> | 
|     </form> | 
|   | 
|     <script type='text/javascript' src='/language/gettext.js'></script> | 
|     <script type='text/javascript' src="/js/common.js"></script> | 
|     <script type="text/javascript"> | 
|         function CheckSubmit() { | 
|             if (!document.getElementById("playerFind").value) { | 
|                 alert("<?php echo \Lang\gettext("请输入目标玩家"); ?>!"); | 
|                 document.getElementById("playerFind").focus(); | 
|                 return false; | 
|             } | 
|   | 
|             if (!document.getElementById("delRemark").value) { | 
|                 alert("<?php echo \Lang\gettext("扣除说明信息不能为空"); ?>!"); | 
|                 document.getElementById("delRemark").focus(); | 
|                 return false; | 
|             } | 
|   | 
|             if (!CheckKey("key")) { | 
|                 return false; | 
|             } | 
|   | 
|             var delMoneyType = document.getElementById("moneyType").value; | 
|             var delMoneyValue = document.getElementById("moneyValue").value; | 
|             if (!delMoneyType || !delMoneyValue || delMoneyType <= 0 || delMoneyValue <= 0) { | 
|                 alert("<?php echo \Lang\gettext("必须指定扣除的货币类型及数量"); ?>!"); | 
|                 return false; | 
|             } | 
|   | 
|             var br = getbr(); | 
|             if (!confirm("<?php echo \Lang\gettext("确认扣除"); ?>?" + br + | 
|                     "<?php echo \Lang\gettext("货币类型"); ?>: " + delMoneyType + br + | 
|                     "<?php echo \Lang\gettext("扣除数量"); ?>: " + delMoneyValue)) { | 
|                 return false; | 
|             } | 
|   | 
|             return true; | 
|         } | 
|     </script> | 
| </body> | 
|   | 
| </html> |