?? 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 + -