| <?php | 
| include_once "/Account/User.php"; | 
| include_once "/Common/CommFunc.php"; | 
| include_once "/language/lang.php"; | 
|   | 
| \CommFunc\SessionStart(); | 
| $Permission = \User\Permission::P_CTGReq; | 
| $spid = $_SESSION['spid']; | 
| $user = new \User\User($_SESSION['UserAccount']); | 
| if (!$user->HavePermission($Permission)) { | 
|     exit; | 
| } | 
|   | 
| ?> | 
|   | 
| <!DOCTYPE html> | 
| <html> | 
|   | 
| <head> | 
|     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | 
|     <title><?php echo \Lang\gettext("CTG充值"); ?></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="CTG" name="CTG" action="/Common/GMCmdProcess.php" method="post"> | 
|         <dl> | 
|             <dt><?php echo \Lang\gettext("CTG充值"); ?></dt> | 
|             <dd class="def_dd"> | 
|                 <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 /> | 
|                 <label><?php echo \Lang\gettext("目标玩家"); ?>:</label> | 
|                 <input class="long_input" type="text" name="playerFind" id="playerFind" value="" /> | 
|                 (<?php echo \Lang\gettext("多个用英文\",\"隔开如:玩家1,玩家2"); ?>)</span> | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <dd class="def_dd"> | 
|                 <label>   <?php echo \Lang\gettext("CTG值"); ?>:</label> | 
|                 <input class="short_input" type="text" name="value" id="value" value="" size="20" /> | 
|                 (<?php echo \Lang\gettext("充值商品编号或直接填入对应币种值"); ?>) | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <dd class="def_dd"> | 
|                 <label>   AppID:</label> | 
|                 <input class="short_input" type="text" name="appID" id="appID" value="" size="20" /> | 
|                 <span class="tips">(<?php echo \Lang\gettext("使用商品编号充值时需要填写对应的AppID"); ?>)</span> | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <dd class="def_dd"> | 
|                 <div> | 
|                     <?php echo \Lang\gettext("是否可用于集市购买"); ?>: | 
|                     <input type="radio" name="isAddBourseMoney" value="0" checked /> | 
|                     <span><?php echo \Lang\gettext("否"); ?></span> | 
|                     <input type="radio" name="isAddBourseMoney" value="1" /> | 
|                     <span><?php echo \Lang\gettext("是"); ?></span> | 
|                 </div> | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <?php | 
|             if ($user->NeedCheckKey()) { | 
|                 echo "<dd class=\"def_dd\">"; | 
|                 echo \Lang\gettext("授权码(key)") . ":"; | 
|                 echo "<input type=\"text\" name=\"key\" id=\"key\" />"; | 
|                 echo "<p class=\"clear\"></p>"; | 
|                 echo "</dd>"; | 
|             } else { | 
|                 echo "<input type=\"hidden\" name=\"key\" id=\"key\" />"; | 
|             } | 
|             ?> | 
|   | 
|             <input type="hidden" name="Permission" value="<?php echo $Permission; ?>" /> | 
|             <input type="hidden" name="pack_type" value="GMT_CTG" /> | 
|             <dd class="submit_dd"> | 
|                 <input type="submit" name="submit" value="<?php echo \Lang\gettext("提交"); ?>" onclick="return CheckCTG();" /> | 
|             </dd> | 
|         </dl> | 
|     </form> | 
|   | 
|     <script type='text/javascript' src='/language/gettext.js'></script> | 
|     <script type='text/javascript' src="/js/common.js"></script> | 
|     <script type="text/javascript"> | 
|         function CheckCTG() { | 
|             if (!CheckKey("key")) { | 
|                 return false; | 
|             } | 
|   | 
|             if (!document.getElementById("playerFind").value) { | 
|                 alert("<?php echo \Lang\gettext("请输入玩家"); ?>"); | 
|                 document.getElementById("playerFind").focus(); | 
|                 return false; | 
|             } | 
|   | 
|             if (!document.getElementById("value").value) { | 
|                 alert("<?php echo \Lang\gettext("请输入CTG值"); ?>"); | 
|                 document.getElementById("value").focus(); | 
|                 return false; | 
|             } | 
|   | 
|             if (isNaN(document.getElementById("value").value)) { | 
|                 if (!document.getElementById("appID").value) { | 
|                     alert("<?php echo \Lang\gettext("请输入AppID"); ?>"); | 
|                     document.getElementById("appID").focus(); | 
|                     return false; | 
|                 } | 
|             } | 
|   | 
|             var br = getbr(); | 
|             var confirmStr = ""; | 
|             confirmStr += "<?php echo \Lang\gettext("确定充值?"); ?>"; | 
|             if (!window.confirm(confirmStr)) { | 
|                 return false; | 
|             } | 
|   | 
|             return true; | 
|         } | 
|     </script> | 
| </body> | 
|   | 
| </html> |