📄 sendmeg.php
字号:
<?
//**************************************************
//************************************
//******Powered by ajin ***************
//*****联系我:wenjinjin@peoplemail.com.cn *******
//*********QQ : 89243743 ********************
//*******主页: http://www.52686.com *******
//**************************************************
include_once('session.php');
include_once('function.php');
include_once('config.php');
if (islogin($_SESSION['username'],$_SESSION['userpass']))
$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_once('addclass.php');
$time=time();
$ftime=date("Y-m-d g:i",$time);
$send_from=$_SESSION['username'];
$addname=$_POST['addname'];
$addarea=$_POST['addarea'];
$addmod=$_POST['addmod'];
$add=new addclass($dbname);
$send_to_list=$_POST['send_to_list'];
$send_to=$_POST['send_to'];
//选择接收人
if($send_to_list=="no")
$mail_to=$send_to;
elseif($send_to=="")
$mail_to=$send_to_list;
//检查表单
if ($mail_to!=""&&!mail_to!="no"&&!isuser($mail_to))
{
$errormeg="<font color=red >错误 </font>: 没有这个人";
$area_value=$_POST['addarea'];
$name_value=$_POST['addname'];
require('template/sendform.php');
}
elseif ($send_to_list=="no"&&$send_to==""&&$accept)
{
$errormeg="<font color=red >错误 </font>: 没有选择发送对象";
$area_value=$_POST['addarea'];
$name_value=$_POST['addname'];
require('template/sendform.php');
}
elseif ($addname==""&&$addmod&&$accept)
{
$area_value=$_POST['addarea'];
$errormeg="<font color=red >错误 </font>: 无标题么?";
require('template/sendform.php');
}
elseif($addarea==""&&$addmod&&$accept)
{
$name_value=$_POST['addname'];
$errormeg="<font color=red>错误 </font> : 发送消息怎么没有内容?";
require('template/sendform.php');
}
elseif ($_POST['addmod']&&$accept&&$addname!=""&&$addarea!="")
{
//所有条件都符合了,开始发送
$flag=$add->addsql("quickmeg","'$addname','$addarea',$time,'未读','$ftime','$send_from','$mail_to','false'");
if ($flag)
{
box("发送成功","给 $mail_to 的消息已成功发送","sendmeg.php");
$errormeg="<font color=red>发送成功</font> 可以关闭窗口,或继续发送";
}
else
{
box("发送失败","<font color=red>意外错误</font>","sendmeg.php");
}
}
else require('template/sendform.php');
@mysql_close();
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -