📄 announce.php
字号:
<?
include_once('config.php');
include_once('session.php');
include_once('function.php');
//$_SESSION['username']="wjj";
//$_SESSION['userpass']="0143140";
if (islogin($_SESSION['username'],$_SESSION['userpass'])&&isadmin($_SESSION['username'])||isadmin($_SESSION['username'],1))
$accept=true;
else
{
$accept=false;
echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">";
exit;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>通知管理</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#F3F7FC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<? include('js.php');?>
<table width="100%" height="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="16" valign="top"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="4%"><img src="images/tleft.jpg" width="50" height="18"></td>
<td width="91%" background="images/dmid.jpg"> </td>
<td width="5%"><img src="images/tright.jpg" width="50" height="18"></td>
</tr>
</table>
<table width="96%" height="41" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><font class="size10">(此处仅主管可见)</font></td>
</tr>
</table>
<table width="96%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F3F7FC" class="table_kuang">
<tr>
<td height="26" colspan="2" valign="top" class="tian4">
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_kuang">
<tr>
<td class="tianchong">
<? if (isadmin($_SESSION['username'],1)) $return="<a href=\"admin/index.php\">返回管理首页</a>";
elseif (isadmin($_SESSION['username'])) $return="<a href=\"index.php\">返回首页</a>";
echo $return;
?>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="52%" height="399" valign="top" class="tian4">
<table width="50%" border="0" align="left" cellpadding="0" cellspacing="0" class="table_kuang">
<tr>
<td class="tianchong">
<?
include_once('addclass.php');
$time=time();
$ftime=date("Y-m-d g:i",$time);
$worker_login_name=$_SESSION['username'];
$addname=$_POST['ann_title'];
$addarea=$_POST['ann_text'];
$addmod=$_POST['addmod'];
$add=new addclass($dbname);
$ann_job=getjob($_SESSION['username']);
$lim=10;
$count=$_GET['count'];
if (isadmin($_SESSION['username'])) $ann_mod="clas";
elseif (isadmin($_SESSION['username'],1)) $ann_mod="comp";
if ($addname==""&&$addmod&&$accept)
{
$area_value=$_POST['ann_text'];
$errormeg="<font color=red >错误 </font>: 无标题么?";
}
elseif($addarea==""&&$addmod&&$accept)
{
$name_value=$_POST['ann_title'];
$errormeg="<font color=red>错误 </font> : 添加通知怎么没有内容?";
}
elseif ($_POST['addmod']&&$accept&&$addname!=""&&$addarea!="")
{
$flag=$add->addsql("all_announce","'$addname','$addarea','$ftime',$time,'$ann_mod','$ann_job','false'");
if ($flag) $errormeg="<font color=red>添加成功</font> 可以关闭窗口,或继续添加";
else $errormeg="<font color=red>意外错误</font>";
}
echo $errormeg;
?>
</td>
</tr>
<tr>
<td class="tianchong">添加通知 </td>
</tr>
<tr>
<td valign="top"><form name="form1" method="post" action="">
<input name="addmod" type="hidden" id="addmod2" value="true">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tianchong">标题:
<input name="ann_title" type="text" id="ann_title2"></td>
</tr>
<tr>
<td class="tianchong">内容:(允许使用html代码)</td>
</tr>
<tr>
<td class="tianchong"><textarea name="ann_text" cols="50" rows="10" id="textarea"></textarea></td>
</tr>
<tr>
<td class="tianchong"><div align="center">
<input name="addmod" type="hidden" id="addmod2" value="true">
<input type="submit" name="Submit" value="添加">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<p align="left"></p></td>
<td width="48%" valign="top" class="tian4"> <iframe scrolling="auto" src="modpage.php?mod=ann&count=0" frameborder="0" width="100%" height="100%"></iframe>
</td>
</tr>
</table></td>
</tr>
</table>
<div align="center">
<input type="button" name="Submit3" value="关闭窗口" onClick="window.close(); return false;" class="buton" onMouseOver ="this.style.backgroundColor='#879BD8'" onMouseOut ="this.style.backgroundColor='#f3f7f3'">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<? require('template/temp_footer.php'); ?>
</div></td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -