| <?php | 
| include_once "/Account/User.php"; | 
| include_once "/Common/Logging.php"; | 
| include_once "/Common/CommFunc.php"; | 
| include_once "/language/lang.php"; | 
|   | 
| \Logging\CreateLogging("AddTitle.php"); | 
| $Permission = \User\Permission::P_AddTitle; | 
| $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("称号管理"); ?></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="addtitle" name="addtitle" action="/Common/GMCmdProcess.php" method="post"> | 
|         <dl> | 
|             <dt><?php echo \Lang\gettext("称号管理"); ?></dt> | 
|             <dd class="def_dd"> | 
|                 <div> | 
|                     <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="" /> | 
|                 </div> | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <dd class="def_dd"> | 
|                 <label><?php echo \Lang\gettext("称号"); ?> (ID):</label> | 
|                 <input class="long_input" type="number" name="titleID" id="titleID" value="" min="1" /> | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <dd class="def_dd"> | 
|                 <label><?php echo \Lang\gettext("有效期秒"); ?>:</label> | 
|                 <input class="long_input" type="number" name="expireTime" value="" min="0" /> (<?php echo \Lang\gettext("不填则默认以配表为准"); ?>) | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <dd class="def_dd"> | 
|                 <label><?php echo \Lang\gettext("指定数值"); ?>:</label> | 
|                 <input class="long_input" type="number" name="setValue" id="setValue" value="" min="0" /> | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <dd class="def_dd"> | 
|                 <label><?php echo \Lang\gettext("选择操作"); ?>:</label> | 
|                 <input type="radio" name="opType" value="add" checked /> | 
|                 <span><?php echo \Lang\gettext("激活"); ?></span> | 
|                 <input type="radio" name="opType" value="del" /> | 
|                 <span><?php echo \Lang\gettext("删除"); ?></span> | 
|                 <input type="radio" name="opType" value="starUp" /> | 
|                 <span><?php echo \Lang\gettext("升星"); ?></span> | 
|                 <input type="radio" name="opType" value="setStar" /> | 
|                 <span><?php echo \Lang\gettext("指定星"); ?></span> | 
|                 <input type="radio" name="opType" value="query" /> | 
|                 <span><?php echo \Lang\gettext("在线查询"); ?></span> | 
|                 <p class="clear"></p> | 
|             </dd> | 
|   | 
|             <?php | 
|             if ($user->NeedCheckKey()) { | 
|                 echo "<dd class=\"def_dd\"><br />"; | 
|                 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_AddTitle" /> | 
|             <dd class="submit_dd"> | 
|                 <input type="submit" name="submit" value="<?php echo \Lang\gettext("提交"); ?>" onclick="return CheckSubmit();" /> | 
|             </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 CheckSubmit() { | 
|             if (!document.getElementById("playerFind").value) { | 
|                 alert("<?php echo \Lang\gettext("请输入目标玩家"); ?>!"); | 
|                 document.getElementById("playerFind").focus(); | 
|                 return false; | 
|             } | 
|   | 
|             if (!document.getElementById("titleID").value) { | 
|                 alert("<?php echo \Lang\gettext("请输入称号ID"); ?>!"); | 
|                 document.getElementById("titleID").focus(); | 
|                 return false; | 
|             } | 
|   | 
|             if (!CheckKey("key")) { | 
|                 return false; | 
|             } | 
|   | 
|             if (!window.confirm("<?php echo \Lang\gettext("确定提交?"); ?>")) { | 
|                 return false; | 
|             } | 
|   | 
|             return true; | 
|         } | 
|     </script> | 
| </body> | 
|   | 
| </html> |