📄 showannounce.php
字号:
<?php
// session_start();
// session_register("master_nickname_session");
include("pwdsuper.php");
include("connect.inc.php");
include("char.inc.php");
$AnnounceID=$id;
$mastersn=$userid;
$boardsql="select name,nickname from zmis41197 where studentnumber=".$userid;
$boardinfo=@mysql_query($boardsql,$conn)or die("SELECT DB ERROR!");
$infoarray=mysql_fetch_array($boardinfo);
$boardname=$infoarray["name"];
$master_nickname_session="集中营论坛";
$updatesql="update guestbook set hits=hits+1 where id=".$AnnounceID;
@mysql_query($updatesql,$conn)or die("UPDATE 失败!");
$sql="select * from guestbook where id=".$AnnounceID;
$selectrec=@mysql_query($sql,$conn)or die("数据库操作失败") ;
?>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
<title>显示贴子</title>
<link rel="stylesheet" type="text/css" href="forum.css">
</head>
<body bgcolor="#dcf6ce" text="#666600" link="#009900" alink="#00FF00" vlink="#006600">
<?php
if (mysql_num_rows($selectrec)==0)
{
echo "<center><P>该贴子的内容找不到</P></center>";
}
else
{
$recordarray=mysql_fetch_array($selectrec);
$v_sn=$recordarray["mastersn"];
$useremail=$recordarray["email"];
$topic=$recordarray["topic"];
$body=$recordarray["body"];
$datetimestr=$recordarray["dateandtime"];
$layer=$recordarray["layer"];
$orders=$recordarray["orders"];
$parentid=$recordarray["parentid"];
$ip=$recordarray["ip"];
$recordid=$recordarray["id"];
if($v_sn>=56){
$v_name="访客";
$v_nickname="访客";
}else{
$vsql="select name,nickname from zmis41197 where studentnumber=".$v_sn;
$vquery=@mysql_query($vsql,$conn)or die("QUERY ERROR!");
$v_infoarray=@mysql_fetch_array($vquery)or die("EXEC MYSQL_FETCH_ARRAY ERROR!");
$v_name=$v_infoarray["name"];
$v_nickname=$v_infoarray["nickname"];
}
echo "<p align='center'><strong>";
echo htmlspecialchars($topic);
echo "</strong></p> ".chr(13).chr(10);
echo "<hr size='1' color=#00CC00>".chr(13).chr(10);
if (trim($useremail)!="")
{
echo "<p> <a href='mailto:".htmlspecialchars($useremail)."'>";
echo htmlspecialchars($v_name);
echo "</a> ";
echo " 于 ".$datetimestr." 发表在:<strong>".$master_nickname_session."</strong></p><p>".chr(13).chr(10);
}
else
{
echo "<p> ";
echo htmlspecialchars($v_name);
echo " 于 ".$datetimestr." 发表在:<strong>".$master_nickname_session."</strong></p><p>".chr(13).chr(10);
}
echo zlstr($body);
?>
<hr size="1" color=#00CC00>
<p><strong>回复:</strong></p>
<form action="savereannounce.php?userid=<?php echo $userid; ?>" method="POST"
name="frmAnnounce">
<input type='hidden' name='rootid' value="<?php echo $rootid; ?>">
<input type='hidden' name='followup' value="<?php echo $recordid; ?>">
<div align="center"><center>
<table border="1" width="530"
bordercolorlight="#009900" cellspacing="2" bordercolordark="#009900" height="362">
<tr>
<td width="100%" bgcolor="#83d160" height="17">
<div align="center"><center>
<p><strong>我 要 发 言</strong>
</center></div></td>
</tr>
<tr align="center" valign="top">
<td width="100%">
<table border="0" width="100%" cellspacing="1">
<tr>
<td width="15%" align="right">说 明:</td>
<td colspan="2"><strong><?php echo $master_nickname_session; ?></strong> <font color="red"><strong>*</strong></font>为必填项目</td>
</tr>
<tr>
<td width="15%" align="right">主 题:</td>
<td colspan="2">
<?php if(!((strpos($topic,"回复:")?strpos($topic,"回复:")+1:0)>0))
{
?>
<p><input class="smallInput" name="subject" size="65" value="回复: <?php echo $topic; ?>" maxlength="255">
<?php }else{ ?>
<input class="smallInput" name="subject" size="65" value="<?php display($topic); ?>" maxlength="255">
<?php } ?>
<font color="red"><strong>*</strong></font> </td>
</tr>
<tr>
<td width="15%" align="right" valign="top"><span class="smallFont">表
情:</span></td>
<td colspan="2">
<input type="radio" value="smiley" name="expression" checked>
<img
src="images/smiley.gif" width="15" height="15">
<input type="radio" name="expression"
value="sad">
<img src="images/sad.gif" width="16" height="16">
<input type="radio"
name="expression" value="angry">
<img src="images/angry.gif" width="15" height="15">
<input
type="radio" name="expression" value="13">
<img src="images/13.gif" width="15" height="15">
<input
type="radio" name="expression" value="14">
<img src="images/14.gif" width="15" height="15">
<input type="radio" name="expression" value="15">
<img src="images/15.gif" width="15"
height="15">
<input type="radio" name="expression" value="16">
<img src="images/16.gif"
width="15" height="15"> <br>
<input type="radio" value="18" name="expression">
<img src="images/18.gif" width="15"
height="15">
<input type="radio" name="expression" value="17">
<img src="images/17.gif"
width="15" height="15">
<input type="radio" name="expression" value="19">
<img
src="images/19.gif" width="15" height="15">
<input type="radio" name="expression"
value="20">
<img src="images/20.gif" width="15" height="15">
<input type="radio"
name="expression" value="21">
<img src="images/21.gif" width="15" height="15">
<input
type="radio" name="expression" value="22">
<img src="images/22.gif" width="15" height="15">
<input type="radio" name="expression" value="23">
<img src="images/23.gif" width="15"
height="15"> </td>
</tr>
<tr>
<td width="15%" align="right"><span class="smallFont">内 容:</span></td>
<td width="64%"><span class="smallFont">(最多<?php echo $ANNOUNCE_MAXBYTE/1024; ?>KB)</span></td>
<td width="21%">
<div align="center">
<center>
<p>
</center>
</div>
</td>
</tr>
<tr align="center">
<td width="15%"><span class="smallFont"></span></td>
<td colspan="2">
<div align="left">
<p>
<textarea class="smallarea" cols="65"
name="body" rows="10"><?php echo $body; ?></textarea>
</div>
</td>
</tr>
<tr align="center">
<td colspan="3"><span class="smallFont">
<input class="buttonface" type="submit"
value=" 发 送 " name="submit">
<input class="buttonface" type="reset" value=" 重 填 " name="reset">
</span></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<?php
}
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -