| 一个可分页的基于文本的PHP留言板 |
|
| 作者:未知 文章来源:网络收集 点击数: 更新时间:2006-3-9 12:14:27
|
ot;/13.gif"; ?>" width="15" height="15"> <input type="radio" name="icon" value="14"> <img src="<? echo $imagedir."/14.gif"; ?>" width="15" height="15"> <input type="radio" name="icon" value="15"> <img src="<? echo $imagedir."/15.gif"; ?>" width="15" height="15"> <input type="radio" name="icon" value="16"> <img src="<? echo $imagedir."/16.gif"; ?>" width="15" height="15"> </p> </div> </p> <p align="center"> <input type="submit" name="b1" value="写入"> <input type="reset" name="b2" value="重写"> </p> </form> <hr> <?php if(!file_exists($guestfile)){ echo "<p align="center">没有留言</p>"; } else{ $filebuffer=file($guestfile); $size=sizeof($filebuffer); $pages=ceil($size/20); echo "<p align="center">共".$size."条留言 第".$page."页/共".$pages."页<br>"; if($page>1){ $prev=$page-1; echo "<a href="guest.php?".$prev.""><<</a> "; } for($i=1;$i<=$pages;$i++){ echo " <a href="guest.php?".$i."">".$i."</a> "; } if($page<$pages){ $next=$page+1; echo "<a href="guest.php?".$next.""> >></a>"; } echo "</p></font><table width="650" border="0" cellspacing="0" cellpadding="0">"; for($i=($page-1)*20; $i<$page*20 && $i<$size; $i++){ $buffer=explode("t",$filebuffer[$i]); echo "<tr><td valign="top" width="25"><img src=http://www.okasp.com/techinfo/"".$imagedir."/".$buffer[5].".gif"></td>"; echo "<td valign="top" width="250"><p align="left">".$buffer[3]."</p></td>"; echo "<td valign="top" width="80"><p align="left"><B>(".$buffer[0].")</B></p></td>"; echo "<td valign="top" width="35"><p align="center">"; if($buffer[2]!="0"){ echo "<a href="".$buffer[2]."">主页</a>"; } else{ echo "主页"; } echo "</p></td>"; echo "<td valign="top" width="35"><p align="center">"; if($buffer[1]!="0"){ echo "<a href="mailto:".$buffer[1]."">E_Mail</a>"; } else{ echo "E_Mail"; } echo "</p></td>"; echo "<td valign="top" width="175"><p align="left">".$buffer[6]."</p></td>"; echo "</tr><tr><td>&上一页 [1] [2] [3] [4] 下一页
|
|
[ 收藏此页到: 天天|和讯|博采|ViVi|狐摘|我摘|天极 ] 文章录入:kinda 责任编辑:kinda |
|
上一篇文章: 用PHP制作的意见反馈表 下一篇文章: 采用行写方式的聊天程序(之五) |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |