📄 postmsg.php
字号:
<?php
require_once("variable.php");
echo $WmlDeclare;
?>
<wml>
<head>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
</head>
<card id="loop" title="发送站内信息">
<p align="left">
<a href="./?session=<?=$session;?>">返回首页</a>|<a href="inbox.php?session=<?=$session;?>">站内短信</a><br/>
<?php
if($_GET[action]=="post" and $session!=""){
if(empty($_GET[user]) or empty($_GET[subject]) or empty($_GET[content])){
echo "请填写用户名/或标题/内容!<br/><anchor>[返回上一页]<prev/></anchor><br/>";
}else{
$user = iconv("UTF-8","GB2312",htmlspecialchars($_GET[user]));
$subject = iconv("UTF-8","GB2312",htmlspecialchars($_GET[subject]));
$content = iconv("UTF-8","GB2312",htmlspecialchars($_GET[content]."[Post by WAP]"));
$rowms = mysql_fetch_array(mysql_query("select * from ".$dbTablePx."members where username='$user' limit 1"));
if(!$rowms[uid]){
echo "无此用户名!<br/><anchor>[返回上一页]<prev/></anchor><br/>";
}else{
$row = mysql_fetch_array(mysql_query("select * from ".$dbTablePx."members where uid='$uid' limit 1"));
if($session==$row[md5id]){
$idif = substr_count($row[banpm], ','.$rowms[uid].',');
if($idif>0){
$AllowP = 0;
}else{
$AllowP = 1;
}
if($row[groupid]==6){$AllowP = 0;}
if($AllowP==1){
if(mysql_query("insert into ".$dbTablePx."msg (touid,fromuid,username,type,ifnew,title,mdate,content) values ('$rowms[uid]','$uid','$username','rebox','1','$subject',UNIX_TIMESTAMP(),'$content')")){
echo "发送成功!<br/><a href='inbox.php?session=$session'><<返回短信箱</a><br/>";
}
}else{
echo "对方已禁止接收您发送的信息!<br/>";
}
}else{
echo "用户出错!<br/>";
echo "<anchor>[返回上一页]<prev/></anchor><br/>";
}
}
}
}elseif($session!=""){
?>
发送到:<input name="user" type="text" format="*M" value="" emptyok="true" maxlength="20"/><br/>
标 题:<input name="subject" type="text" format="*M" value="" emptyok="true" maxlength="120"/><br/>
内 容:<input name="content" type="text" format="*M" value="" emptyok="true" maxlength="300"/><br/>
<anchor>
[发送]
<go href="postmsg.php?action=post&session=<?=$session;?>" method="get">
<postfield name="user" value="$(user)"/>
<postfield name="subject" value="$(subject)"/>
<postfield name="content" value="$(content)"/>
</go>
</anchor>
<?php
}else{
echo "请先登录!";
}
?>
<br/>
<a href="./?session=<?=$session;?>">返回首页</a>|<a href="inbox.php?session=<?=$session;?>">站内短信箱</a><br/>
<small>(C)copyright by <?php echo $siteSign;?></small>
</p>
</card>
</wml>
<?php
LangFlush(ob_get_contents());
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -