支持oicq頭像,自動分頁,顯示留言人ip,email合法性驗證,方便安全的留言管理,
沒有復雜函數,初學者也很容易看懂。
程序示例:http://medguider.51.net/notebook/
完整程序下載(包括圖片)http://medguider.51.net/downlo " /> 国产a区,亚洲国产成人久久77,avhd101永久地址高清迷片

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

支持oicq頭像的留言簿(一)

特點:
支持oicq頭像,自動分頁,顯示留言人ip,email合法性驗證,方便安全的留言管理,
沒有復雜函數,初學者也很容易看懂。
程序示例:http://medguider.51.NET/notebook/
完整程序下載(包括圖片)http://medguider.51.NET/download/notebook.zip
程序清單:
config.php 配置文件 mysql.txt 數據庫文件 index.php 顯示留言主程序 addnote.php 添加留言 delnote.php 刪除留言
mysql.txt
create table notebook (name char(6),email varchar(35),time char(30),face char(2),ip varchar(16),title varchar(255),nnote text);
//留言簿 name 姓名 email time 時間 face 頭像 ip title 標題 nnote 內容
config.php
<?php
//這里改為自己的數據庫用戶名與密碼
$db = mysql_connect("localhost", "root");
mysql_select_db("test",$db);
//這里改為自己的管理用戶名和密碼
$username="demo";
$password="demo";
?>
index.php
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>留言簿</TITLE>
<style type="text/css">
<!--
.blue9 {  font-size: 9pt; color: #0099FF; text-decoration: none}
.black9 {  font-size: 9pt; text-decoration: none}
.purple10 {  font-size: 10pt; color: #9900FF; text-decoration: none}
.white12 {  font-size: 12pt; color: #FFFFFF; text-decoration: none}
a:visited {  color: #FFFFFF}
a:link {  color: #FFFFFF}
-->
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<?php
include ("config.php");
$result = mysql_query("SELECT * FROM notebook ",$db);
$row=mysql_num_rows($result);//查看查詢結果有多少行
$max=$row; //帖子總數
//設每頁顯示10篇,可自行設定,$p總頁數,$page第幾頁,$low 從第幾行開始讀,$x 讀取幾行
if (!$page){ $page=1;}//$page默認值為1
$p=ceil($max/10);//頁數為$max/10的最大整數
$low=10*($page-1);
if($page==$p&&($max%10)<>0){$x=($max%10);} else {$x=10;}//如果是最后一頁,且不是10的整倍數,讀取$max除以10的余數,否則取10
if($max==0){$x=0;}//如果沒有帖子,$x取0
$result = mysql_query("select * from notebook ORDER BY time DESC limit $low,$x",$db);//按照帖子的時間降序查詢
?>
<table width="98%" border="0" cellspacing="0" cellpadding="0" height="61">
  <tr>  
    <td height="62" width="34%"><a href="http://www.medguider.com"><img src="image/logo.gif" width="243" height="60" alt="醫學導航網" border="0"></a></td>
    <td height="62" width="66%">  
      <div align="center"><img src="image/note.gif" width="410" height="60"><img src="image/y1.gif" width="60" height="60"></div>
    </td>
  </tr>
</table>
<table width="95%" border="1" cellspacing="0" cellpadding="0" height="253" bordercolordark="#FFFFFF" bordercolorlight="#003399" align="center">
  <tr>  
    <td height="250">  
      <div align="center"></div>
      <table width="95%" border="0" cellspacing="0" cellpadding="0" height="32" bgcolor="#3366FF">
        <tr>  
          <td width="26%" class="white12" height="23"><a href="../index.php" class="white12">首頁</a>  
            > 留言簿</td>
          <td width="48%" class="white12" height="23">  
            <?php
          echo "帖子總數:  ",$max,"   第";
          for ($n=1;$n<=$p;$n++){
          echo "<a href=index.php?page=$n>$n</a> ";
          }
          echo "頁";
          ?>
          </td>
          <td width="15%" height="23"><a href="addnote.php"><img src="image/newthread.gif" width="91" height="21" border="0"></a></td>
          <td width="11%" height="23"><a href="delnote.php"><span class="white12">留言管理</span></a></td>
        </tr>
      </table>  
<?php
   for ($i=0;$i<=($x-1);$i++) {
   $name=mysql_result($result,$i,'name');
   $email=mysql_result($result,$i,'email');
   $face=mysql_result($result,$i,'face');
   $face='image/face/icon'.$face;    //用戶頭像
   $time=mysql_result($result,$i,'time');
   $ip=mysql_result($result,$i,'ip');
   $title=mysql_result($result,$i,'title');
   $nnote=mysql_result($result,$i,'nnote');
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0' height=107' bordercolor='#FFFFFF'> <tr bgcolor='#eeeeee'>";  
echo "<td width='10%' height='33' bgcolor='#eeeeee' class='blue9'> <img src='$face.gif' width='32' height='32'></td>";
echo        "<td width='16%' height='33' bgcolor='#eeeeee' class='blue9'>留言人:$name</td>";
echo        "<td width='41%' height='33' bgcolor='#eeeeee' class='blue9'>發表于:$time</td>";
echo        "<td width='12%' height='33' bgcolor='#eeeeee' class='blue9'><a href='mailto:$email'><img src='image/email.gif' width='16' height='16' border=0></a></td>";
echo        "<td width='21%' height='33' class='blue9'><img src='image/ip.gif' width='13' height='15'>  $ip</td>  </tr> <tr>";  
echo        "<td colspan='5' class='purple10' height='33'>標題:$title</td> </tr>";
echo        "<tr bgcolor='#ffffff'><td colspan='5' class='black9' height='37'>留言內容:$nnote</td></tr></table>";
}
mysql_close($db);
?>     
    </td>
</tr>
</table>
</BODY>
</HTML> 

php技術支持oicq頭像的留言簿(一),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产黄频在线观看高清免费 | 五月婷婷开心网 | 日韩欧美三区 | 五月婷婷六月综合 | 亚洲人色大成年网站在线观看 | 亚洲视频一二区 | 久久久一区二区三区不卡 | 欧美日韩精品乱国产 | 成人a毛片视频免费看 | 91视频插插插 | 色老板免费 | 国产在线精品一区二区 | 青草成人| 国产视频首页 | 成人小视频免费在线观看 | 七七国产福利在线二区 | 午夜爽爽性刺激一区二区视频 | 欧美viedo护士 | 女性毛片 | 免费看国产视频 | 91日韩欧美 | 亚洲成精品动漫久久精久 | 玖玖国产精品 | 一区二区三区网站在线免费线观看 | 国产日韩精品一区二区三区 | 亚洲欧美另类久久久精品能播放的 | 99久久精品国产片 | 91视频麻豆 | 欧美精品做人一级爱免费 | 黑人专区| 婷婷在线观看视频 | 91热久久免费频精品99欧美 | 美女免费精品视频在线观看 | 狠狠综合久久久综合 | 久精品在线| 99视频有精品视频免费观看 | 亚洲综合色婷婷中文字幕 | 99午夜 | 91免费视频播放 | 色吧久久| 国产原创精品视频 |