下載 : 每日發表篇數限制所需檔案error message

1.

將 add_protect_table.php上傳至 ZB根目錄,執行 http://(你的網址)/(ZB根目錄)/add_protect_table.php

2-5 只要上傳了 zip 內的檔案便可,如曾自行修改過這些檔案,則請依照以下步驟加入防步灌水的程式碼

2. 在 admin_add_board.php 的 第 197行下

(ln 197 <tr height=25 bgcolor=#bbbbbb><td colspan=2  align=center  style=font-family:Tahoma;font-size:8pt;><b> 其它設定</b></td></tr>)

加上

<tr height=25 bgcolor=#e0e0e0>
<td align=right style=font-family:Tahoma;font-size:8pt;><b>防止灌水 </td>
<td >
<input type=text  name=use_protect value=’<?echo $data[use_protect];?>’> 每日最多可發表的篇數 (0 為不使用)
</td>
</tr>

3. 在 admin_exec_board.php 第27 行 (即 mysql_query 那兒) 的 where no=’$no’ 前

, use_protect=’$use_protect’

4. 在 admin_modify_board.php 第 200 行下

(ln 200 <tr height=25 bgcolor=#bbbbbb><td colspan=2 align=center  style=font-family:Tahoma;font-size:8pt;& amp;gt;<b>其它設定 </b></td></tr>)

<tr height=25 bgcolor=#e0e0e0>
<td align=right style=font-family:Tahoma;font-size:8pt;><b>防止灌水 </td>
<td >
<input type=text  name=use_protect value=’<?echo $data[use_protect];?>’> 每日最多可發表的篇數 (0 為不使用)
</td>
</tr>

5. 在 write_ok.php 第 31行下加

//防止灌水功能 by laig 2005.08.01
if (($setup[use_protect] > 0) && ($mode != “modify”) && (($member[is_admin]!=1) && ($member[is_admin] !=2))) {
$mem_temp=mysql_query(“select * from $t_board”.”_$id where ismember=’$member[no]‘ or name=’$name’ limit $setup[use_protect]“,$connect);
$i = 0;
while ($check = mysql_fetch_array($mem_temp)) {
if (date(“Y m d”,$check[reg_date]) == date(“Y m d”)) $i ++;
}
if ($i == $setup[use_protect]) Error(“您今日已發表超過每日限制的篇數。”);
}

使用方法 :

程式預設是 每日 每支留言板 可發 5篇
在管理後台的討論板設定中就可以設定每日多少篇的了
設定為 0 的時候表示不使用