引用 | 編輯
konsi
2005-11-16 16:58 |
樓主
|
||
x0
【插件名稱】短消息加回分頁功能【適用版本】3.01 【插件來源】轉貼 【插件類型】優化 【是否升級資料庫】否 【插件介紹】 修改檔案 template/wind/message.htm 找 複製程式 <form name='del' action='$secondurl' method=POST> <table width=100% cellspacing=1 cellpadding=3 $i_table> 複製程式 <!-- EOT; if($fenye){print <<<EOT --> <table width=100% cellspacing=0 cellpadding=0 align=center> <tr><td>$fenye <tr><td height=2> </td></tr></table> <!-- EOT; }print <<<EOT --> <table width=100% cellspacing=1 cellpadding=3 $i_table> <form name='del' action='$secondurl' method=POST> 複製程式 <br><center> <input name=towhere type=hidden value='$towhere'> <input name=action type=radio value='down'> 下載 <input name=action type=radio value='del' checked> 刪除 <input type='button' name='chkall' value='全 選' onclick='CheckAll(this.form)'> <input type=submit value='確 定'> </center></form> 複製程式 <table width=100% cellspacing=0 cellpadding=0 align=center> <tr><td height=2> <tr><td>$fenye </td></tr></table> 複製程式 require_once('./global.php'); 複製程式 require_once(R_P.'require/forum.php'); 複製程式 $gp_maxmsg==0 && Showmsg('msg_group_right'); 複製程式 $db_perpage=20; if(!is_numeric($page) || $page<0){ $page=1; } 複製程式 if ($action=="receivebox"){ 複製程式 $start=($page-1)*$db_perpage; $numofpage=$msgcount%$db_perpage==0 ? floor($msgcount/$db_perpage) : floor($msgcount/$db_perpage)+1; $fenye=numofpage($msgcount,$page,$numofpage,"message.php?action=receivebox&",$msgcounts); 複製程式 $query = $db->query("SELECT mid,fromuid,touid,username,ifnew,title,mdate FROM pw_msg WHERE type='rebox' AND touid='$winduid' ORDER BY mdate DESC"); 複製程式 $query = $db->query("SELECT mid,fromuid,touid,username,ifnew,title,mdate FROM pw_msg WHERE type='rebox' AND touid='$winduid' ORDER BY mdate DESC LIMIT $start,$db_perpage"); 複製程式 if ($action=="sendbox"){ 複製程式 $sebox = $db->get_one("SELECT COUNT(*) AS count FROM pw_msg WHERE type='sebox' AND fromuid='$winduid'"); $seboxcount = $sebox['count']; $start=($page-1)*$db_perpage; $numofpage=$seboxcount%$db_perpage==0 ? floor($seboxcount/$db_perpage) : floor($seboxcount/$db_perpage)+1; $fenye=numofpage($seboxcount,$page,$numofpage,"message.php?action=sendbox&",$counts); 複製程式 $query = $db->query("SELECT mid,fromuid,touid,username,ifnew,title,mdate FROM pw_msg WHERE type='sebox' AND fromuid='$winduid' ORDER BY mdate DESC"); 複製程式 $query = $db->query("SELECT mid,fromuid,touid,username,ifnew,title,mdate FROM pw_msg WHERE type='sebox' AND fromuid='$winduid' ORDER BY mdate DESC LIMIT $start,$db_perpage"); 複製程式 if ($action=="scout"){ 複製程式 $rebox = $db->get_one("SELECT COUNT(*) AS count FROM pw_msg WHERE type='rebox' AND fromuid='$winduid'"); $reboxcount = $rebox['count']; $start=($page-1)*$db_perpage; $numofpage=$reboxcount%$db_perpage==0 ? floor($reboxcount/$db_perpage) : floor($reboxcount/$db_perpage)+1; $fenye=numofpage($reboxcount,$page,$numofpage,"message.php?action=scout&",$counts); 複製程式 $query = $db->query("SELECT mid,fromuid,touid,ms.username,me.username AS toname,ifnew,title,mdate FROM pw_msg ms LEFT JOIN pw_members me ON me.uid=ms.touid WHERE type='rebox' AND fromuid='$winduid' ORDER BY mdate DESC LIMIT $gp_maxmsg"); 複製程式 $query = $db->query("SELECT mid,fromuid,touid,ms.username,me.username AS toname,ifnew,title,mdate FROM pw_msg ms LEFT JOIN pw_members me ON me.uid=ms.touid WHERE type='rebox' AND fromuid='$winduid' ORDER BY mdate DESC LIMIT $start,$db_perpage"); x0
|