📄 leaveword.php
字号:
<?
session_start();
$title="班级留言";
include("inc_head.php");
if(!$_CLASS_CONF) include("conf_class.php");
echo '
<table align=center border=1 cellpadding=0 cellspacing=0 width=762 bordercolor=#FFFFFF style="border-collapse: collapse">
<tr>
<td width=531 bgcolor=#6BBED6 valign="top" align="center">
<div style="margin:8;background-color:#FFFFFF;width:511;text-align:center;height:360px" >
<table width=200 border=0 cellspacing=0 cellpadding=0>
<tr>
<td style="border:1px solid #C7C7C3;border-top-width:0;height:24;background:#F0F3ED;font-size:16px" valign="middle" align="center">'.htmlspecialchars($class_name).'</td>
</tr>
<tr><td align="center"><img src="images/bt_t05.gif" width=176 height=10></td></tr>
</table>
<p></p>
<table width=97% border=0 cellspacing=0 cellpadding=0>
<tr><td height=20><b> 班 级 留 言 列 表</b></td></tr>
<tr><td height=1 background="images/bj04.gif"></td></tr>
</table>
<p></p>
<table width=96% border=0 cellspacing=0 cellpadding=0>
';
if(!$_MYSQL_INC) include("conf_mysql.php");
if($_GET['p']>0) $page=$_GET['p']-1;
else $page=0;
$sql="select * from mc_word order by id desc limit ".($page*$words_per_page).",".($words_per_page+1);
$Myres=mysql_query($sql,$Mylink);
$tmp_num=mysql_num_rows($Myres);
$f_pageup=($page?1:0);
$f_pagedown=($tmp_num>$words_per_page?1:0);
$tmp_i=0;
while($row=mysql_fetch_row($Myres)){
if($tmp_i==$words_per_page) break; //实际查询多一条记录,这多一条不显示...
$word_author=htmlspecialchars($row[1]);
$word_time=$row[3];
$word_content=$row[2];
$deletable=(($_SESSION['power']>1 || htmlspecialchars($_SESSION['id'])==$word_author)?' <a href="deal_word.php?action=del&id='.$row[0].'"><img src="images/char2.gif" width=9 height=9></a>':'');
print <<<l_lable1
<tr>
<td height=24 style="color:#7C7C7A;font-family: verdana">
<img src="images/jiao02.gif" width=9 height=10>{$word_time} <a href="member.php?id={$word_author}" target="_blank">{$word_author}</a>{$deletable}</td>
</tr>
<tr><td style="color:#001D7D" valign="top" height=20 class="wrap">{$word_content}</td></tr>
l_lable1;
$tmp_i++;
}
echo '
</table>
<table width=97% border=0 cellspacing=0 cellpadding=0>
<tr><td height=1 background="images/bj04.gif"></td></tr>
<tr><td height=20><form method=get action="leaveword.php"> 第 <input name="p" type="text" size=3 maxlength=2 class="input" style="text-align:center"> 页 ';
if($f_pageup) echo '<a href="leaveword.php?p='.($page).'" class="black">上一页</a> ';
if($f_pagedown) echo '<a href="leaveword.php?p='.($page+2).'" class="black">下一页</a>';
echo '</form></td></tr>
<tr><td height=16></td></tr>
</table>
</div>
</td>
<td width=233 bgcolor=#E1EFF6 valign="top" align="center">
';
include("inc_nav.php");
echo '
<table width=98% border=0 cellspacing=0 cellpadding=0>
<tr bgcolor=#9EC5D0>
<td width=25> <img src="images/write.gif" width=16 height=16></td>
<td width=172 align="center"><b><font color=#FFFFFF>普通文本留言</font></b></td>
<td width=25><img src="images/bt_t00.gif" align="right" width=20 height=25></td>
</tr>
<tr>
<td colspan=3 height=3 background="images/bj04.gif"></td>
</tr>
<tr>
<td colspan=3 align="center">您的留言不要超过500个字</td>
</tr>
<tr>
<td colspan=3 align="center">
<form action="deal_word.php?action=add" method="post" name="leave_word">
<textarea name="content" class="input" style="height:200px;width:206px"'.($_SESSION['power']>0?">":" disabled>你现在没有权限留言\n请注册为正式成员并登陆").'</textarea><br><br>
<input type="image" src="images/b_fbly.gif" name="lw_sub"'.($_SESSION['power']>0?"":" disabled").'> <img src="images/b_cxyb.gif" style="cursor:hand" onClick="document.all.leave_word.reset()" width=55 height=15>
</form></td>
</tr>
</table>
</td>
</tr>
</table>
';
include("inc_foot.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -