<?php
|
include_once "/Account/User.php";
|
include_once "/language/lang.php";
|
|
$Permission = \User\Permission::P_BroadCastMulti;
|
$spid = $_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><?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>
|
<center>
|
<p><b><?php echo \Lang\gettext("多服系统公告"); ?></b>
|
</P>
|
</center>
|
<form id="SendSysMsg" name="SendSysMsg" action="/Common/GMCmdProcess.php" method="post">
|
<p>
|
<?php echo \Lang\gettext("广播时间"); ?>:
|
<input type="text" id="startDate" name="startDate" onclick="new Calendar().show(this);" readonly value="<?php echo date('Y-m-d'); ?>" size="8" />
|
<input type="text" id="startTime" name="startTime" value="<?php echo date('H:i:s'); ?>" size="5" maxlength="8" />
|
~
|
<input type="text" id="endDate" name="endDate" onclick="new Calendar().show(this);" readonly value="<?php echo date('Y-m-d'); ?>" size="8" />
|
<input type="text" id="endTime" name="endTime" value="<?php echo date('H:i:s', strtotime("+1 hours")); ?>" size="5" maxlength="8" /></br>
|
</p>
|
|
<?php echo \Lang\gettext("发送间隔"); ?>: <input type="number" name="interval" value="1" size="5" min="1" />(<?php echo \Lang\gettext("分钟"); ?>)</br>
|
|
<p>
|
<input type="checkbox" name="isDelOthers"><?php echo \Lang\gettext("清除之前的广播"); ?><br />
|
</p>
|
|
<?php echo \Lang\gettext("广播信息"); ?>: <br /><br />
|
|
<input type="button" value="<?php echo \Lang\gettext("插入超链接"); ?>" onclick="inserthyperlink('msg');" />
|
<input type="button" value="<?php echo \Lang\gettext("插入界面"); ?>" onclick="insertgameform('msg');" />
|
<br />
|
|
<textarea name="msg" id="msg" cols="100" rows="10" maxlength="500"></textarea><br /><br />
|
|
<input type="submit" name="submit" value="<?php echo \Lang\gettext("提交"); ?>" onclick="return CheckBroadCast();" /> <br />
|
<input type="hidden" name="Permission" value="<?php echo $Permission; ?>" />
|
<input type="hidden" name="pack_type" value="GMT_BroadCast" /></br>
|
<?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\" />";
|
}
|
?>
|
<?php
|
include_once "/Common/SelectServer.php";
|
?>
|
</form>
|
|
<script type='text/javascript' src='/language/gettext.js'></script>
|
<script type='text/javascript' src="/js/calendar.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 CheckBroadCast() {
|
if (!CheckKey("key")) {
|
return false;
|
}
|
|
if (!document.getElementById("msg").value) {
|
alert("<?php echo \Lang\gettext("广播信息不能为空"); ?>");
|
document.getElementById("msg").focus();
|
return false;
|
}
|
|
if (!checkHaveServerSelected()) {
|
return false;
|
}
|
|
var br = getbr();
|
var confirmStr = "";
|
confirmStr += "<?php echo \Lang\gettext("广播时间") . " : "; ?>" + br + document.getElementById("startDate").value +
|
" " + document.getElementById("startTime").value + " ~ " + document.getElementById("endDate").value +
|
" " + document.getElementById("endTime").value + br + br;
|
confirmStr += "<?php echo \Lang\gettext("广播信息") . " : "; ?>" + br + document.getElementById("msg").value + br + br;
|
confirmStr += "<?php echo \Lang\gettext("确定广播") . "?"; ?>";
|
if (!window.confirm(confirmStr)) {
|
return false;
|
}
|
|
return true;
|
}
|
</script>
|
</body>
|
|
</html>
|