⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reply.php

📁 php做的wap论坛 有详细说明在readme中
💻 PHP
字号:
<?php
require_once("variable.php");
echo $WmlDeclare;
$nav = "<a href='./?session=$session'>首页</a> | <a href='read.php?tid=$_GET[tid]&amp;fid=$_GET[fid]&amp;session=$session'>上一级</a><br/>";
$rowforum = mysql_fetch_array(mysql_query("select name from ".$dbTablePx."forums where fid='$_GET[fid]' limit 1"));
$rowthread = mysql_fetch_array(mysql_query("select subject from ".$dbTablePx."threads where tid='$_GET[tid]' limit 1"));
?>
<wml>
<head>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
</head>
<card id="menu" title="回复帖子">
<p align="left">
<?php
echo $nav;
if($_GET[action]=="post" and $session!=""){	
	if(empty($_GET[subject]) or empty($_GET[content])){
		echo "请填写标题与内容!<br/>";
	}else{
		$subject = iconv("UTF-8","GB2312",htmlspecialchars($_GET[subject]));
		$content = iconv("UTF-8","GB2312",htmlspecialchars($_GET[content]."[Reply by WAP]"));
		if($session==""){
			$username = "cvmlsdjt64mcmdlsd";
		}
		$row = mysql_fetch_array(mysql_query("select * from ".$dbTablePx."members where username='$username' limit 1"));
		if($session==$row[md5id]){
			$idif = substr_count($rowforum[allowrp], ','.$row[groupid].',');
			$idifb = substr_count($rowforum[allowrp], ','.$row[memberid].',');
			$AllowP = 0;
			if(str_replace(" ","",$rowforum[allowrp])==""){
				$AllowP = 1;
			}else{
				if(($idif+$idifb) > 0){
					$AllowP = 1;
				}else{
					$AllowP = 0;
				}
			}
			if($row[groupid]==6){$AllowP = 0;}
			if($AllowP==1){
				if(mysql_query("insert into ".$dbTablePx."posts (fid,tid,author,authorid,subject,postdate,content,userip,ifcheck,ifconvert) values ('$_GET[fid]','$_GET[tid]','$username','$row[uid]','$subject',UNIX_TIMESTAMP(),'$content','$_SERVER[REMOTE_ADDR]',1,1)")){
					$mm = $subject."	".time()."	".$username;
					mysql_query("update ".$dbTablePx."threads set replies=replies+1,lastpost=UNIX_TIMESTAMP(),lastposter='$username' where tid='$_GET[tid]'");
					mysql_query("update ".$dbTablePx."forums set posts=posts+1,lastpost='$mm' where fid='$_GET[fid]'");
					mysql_query("update ".$dbTablePx."memberdata set lastpost=UNIX_TIMESTAMP(),postnum=postnum+1 where uid='$row[uid]'");
				}
				echo "回复成功!<br/><a href='read.php?tid=$_GET[tid]&amp;fid=$_GET[fid]&amp;session=$session'>&lt;&lt;返回查看</a><br/>";
			}else{
				echo "此版只接受特殊权限会员的文章发表回复!<br/><a href='read.php?tid=$_GET[tid]&amp;fid=$_GET[fid]&amp;session=$session'>&lt;&lt;返回上一级</a><br/>";
			}
		}else{
			echo "用户出错!<br/>";
			echo "<anchor>[返回上一页]<prev/></anchor><br/>";
		}
	}
}elseif($session!=""){
?>
论坛版区:<?php echo $rowforum[name];?><br/>
帖子:<?php echo htmlspecialchars($rowthread[subject]);?><br/>
标题:<input name="subject" type="text" format="*M" value="" emptyok="true" maxlength="60"/><br/>
回复内容:<input name="content" type="text" format="*M" value="" emptyok="true" maxlength="300"/><br/>
<anchor>
[回复]
        <go href="reply.php?action=post&amp;tid=<?php echo $_GET[tid];?>&amp;fid=<?php echo $_GET[fid];?>&amp;session=<?=$session;?>" method="get">
          <postfield name="subject" value="$(subject)"/>
          <postfield name="content" value="$(content)"/>
        </go>
</anchor>
 <a href="read.php?tid=<?php echo $_GET[tid];?>&amp;fid=<?php echo $_GET[fid];?>&amp;session=<?=$session;?>">[取消]</a>
<?php
}else{
	echo "请先登录!";
}
?>
<br/>
<?php echo $nav;?>
<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 + -