📄 sendmsgto.php
字号:
<?php
include("pwdyb.php");
include("connect.inc.php");
include("char.inc.php");
?>
<html>
<head>
<script language="javascript">
<!--
function ok_onclick(){
var text=""
if(form1.title.value!="" && form1.memo.value!="") form1.submit()
else text="你没有填写"
if (form1.title.value=="") text=text+" 标题 "
if (form1.memo.value=="") text=text+" 内容 "
if(form1.title.value=="" || form1.memo.value=="") alert(text)
}
//-->
</script>
<style type="text/css">
<!--
td{font-size:12px;line-height:17px;}
a:active {text-decoration: none;}
a:link {text-decoration: none;}
a:hover{text-decoration: underline;}
a:visited {text-decoration: none;}
BODY{font-size:12px;line-height:17px;SCROLLBAR-FACE-COLOR: #83d160; SCROLLBAR-HIGHLIGHT-COLOR: #CCFF00; SCROLLBAR-SHADOW-COLOR: #CCFF00; SCROLLBAR-3DLIGHT-COLOR: #009900; SCROLLBAR-ARROW-COLOR: #006600; SCROLLBAR-TRACK-COLOR: ##99FF00; SCROLLBAR-DARKSHADOW-COLOR: #009900; }
-->
</style>
<title>发送消息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#dcf6ce" text="#666600" link="#009900" alink="#00FF00" vlink="#006600">
<?php
if (isset($flag)){
$msgfrom="访客";
$wbman="nobody";
$toquery=@mysql_query("select name from zmis41197 where studentnumber=".$snid,$conn)or die(mysql_error());
$toarray=mysql_fetch_array($toquery);
$msgto=$toarray["name"];
$query="insert into message (title,form,msgto,wbman,userid,senddt,memo,msgtoid) values ('$title','$msgfrom','$msgto','$wbman',$userid,NOW(),'$memo',$snid)";
if(mysql_query($query)){
echo "<br><br><center>给:".$msgto." 发送消息,已成功完成!</center><br>";
echo '<br><br><p align="center"><a href="javascript:window.close()">关闭窗口</a></p>';
echo '</body></html>';
exit();
}else{
echo "<br>".mysql_error()."<br>";
}
}
?>
<br>
<br>
<br>
<form name="form1" method="post" action="sendmsgto.php">
<table border="1" cellspacing="2" cellpadding="0" align="center" bordercolorlight="#009900" bordercolordark="#009900">
<tr>
<td bgcolor="#FFCC00">标题:</td>
<td bgcolor="#83d160">
<input type="text" name="title" size="30" maxlength="20">
</td>
</tr>
<tr>
<td bgcolor="#FFCC00" valign="top">内容:</td>
<td valign="top">
<textarea name="memo" cols="30" rows="5"></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="Submit" value="写好了,发送!" onClick="ok_onclick();return false">
</div>
</td>
</tr>
</table>
<input type=hidden name="userid" value="<?php echo $userid;?>">
<input type=hidden name="snid" value="<?php echo $snid;?>">
<input type=hidden name="flag" value="send">
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -