| <?php | 
| include_once "/Common/CommFunc.php"; | 
| include_once "/Account/User.php"; | 
| include_once "/language/lang.php"; | 
|   | 
| $Permission = \User\Permission::P_Execfile; | 
| $channel = $_SESSION['spid']; | 
| $user = new \User\User($_SESSION['UserAccount']); | 
| if (!$user->HavePermission($Permission)) { | 
|     exit; | 
| } | 
|   | 
| $serversArray = $user->GetServers(); | 
|   | 
| ?> | 
| <!DOCTYPE html> | 
| <html> | 
|   | 
| <head> | 
|     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | 
|     <title>执行命令</title> | 
| </head> | 
|   | 
| <body> | 
|   | 
|     <center> | 
|         <p>执行命令</P> | 
|     </center> | 
|   | 
|     <form id="execfilemulti" name="execfilemulti" action="/Common/GMCmdProcess.php" method="post"> | 
|         <a href="Execfile.php">切换单服玩家执行</a><br /> | 
|         <p> | 
|             <label>输入命令:</label> <br /> | 
|             <input type="text" id="cmdInfo" name="cmdInfo" value="" /> | 
|         </P> | 
|         <p> | 
|             <input type="hidden" name="Permission" value="<?php echo $Permission; ?>" /> | 
|             <input type="hidden" name="pack_type" id="pack_type" value="GMT_Execfile" /> | 
|             <?php | 
|             if ($user->NeedCheckKey()) { | 
|                 echo \Lang\gettext("授权码(key)") . ":"; | 
|                 echo "<input type=\"text\" name=\"key\" id=\"key\" />"; | 
|             } else { | 
|                 echo "<input type=\"hidden\" name=\"key\" id=\"key\" />"; | 
|             } | 
|             ?> | 
|         </P> | 
|   | 
|         <?php | 
|         include_once "/Common/SelectServer.php"; | 
|         ?> | 
|   | 
|         <p> | 
|             <input type="submit" name="submit" align="center" value="提交" onclick="return CheckSubmit();" /> | 
|         </P> | 
|         <br /> | 
|     </form> | 
|   | 
|     <script type='text/javascript' src='/language/gettext.js'></script> | 
|     <script type='text/javascript' src="/js/common.js"></script> | 
|     <script type='text/javascript' src="/Common/selectserver.js"></script> | 
|     <script type="text/javascript"> | 
|         function CheckSubmit() { | 
|             if (!document.getElementById("cmdInfo").value) { | 
|                 alert("<?php echo \Lang\gettext("请输入命令"); ?>!"); | 
|                 document.getElementById("cmdInfo").focus(); | 
|                 return false; | 
|             } | 
|   | 
|             if (!checkHaveServerSelected()) { | 
|                 return false; | 
|             } | 
|   | 
|             if (!CheckKey("key")) { | 
|                 return false; | 
|             } | 
|   | 
|             if (!window.confirm("确定提交?")) { | 
|                 return false; | 
|             } | 
|   | 
|             return true; | 
|         } | 
|     </script> | 
| </body> | 
|   | 
| </html> |