⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comment_ing.php

📁 php写的论坛,代码精简到极点 请相看说明文件。是从英文翻译过来的:)
💻 PHP
字号:
<?
//////////////////////////////////ready
include"connect.php";
include"lib.php";

//////////////////////////////////check
chk_bd($bd);

//////////////////////////////////if member, id save
$id=$HTTP_COOKIE_VARS[$member_cookie];

//////////////////////////////////To take out establishment
$set=bd_info($bd);
$security=sec_info();

//////////////////////////////////Competence check
$chk_level=0;
$chk_admin=chk_admin_return($bd);
if(!$chk_admin){$chk_level=chk_level_return($set[auth_comment]);}


////////////////////////////////////////////////////////////////////If have competence, to put writing
if($chk_level || $chk_admin){

//////////////////////////////////Take away tag and / paste
$name=cut2(tag(addslashes($name)),49);
$memo=tag(addslashes($memo));

//////////////////////////////////Refusal word filtering
if($set[use_ban_word]){
$tmp_name=strtolower($name);
$tmp_memo=strtolower($memo);
$security[ban_word]=strtolower($security[ban_word]);
$ban_word=explode(",",$security[ban_word]);
$ban_word_length=sizeof($ban_word);
for($i=0;$i<$ban_word_length;$i++){
if(eregi("$ban_word[$i]",$tmp_memo) || eregi("$ban_word[$i]",$tmp_name))
{error($error.$ban_word[$i].'can\'t use');}
}
}

//////////////////////////////////Variable establishment
$date=time();
$ip=$REMOTE_ADDR;

//////////////////////////////////input
input("$com_table$bd","id,no,name,memo,pass,ip,date","'$id','$no','$name','$memo',password('$pass'),'$ip','$date'");
}


//////////////////////////////////To increase point
edit("$member_table","comment=comment+1","id='$HTTP_COOKIE_VARS[$member_cookie]'");
////////////////////////////////////////////////////////////////////If have competence, to finish writing input


//////////////////////////////////move
mysql_close($connect);
go("memo.php?bd=$bd&no=$no&add_hit=no");
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -