======APPRE.php==========
$strlen=strlen($articlemsg);
if($strlen<50){
echo "
"; echo "
"; echo"你是不是在灌水呀?為防止部分網友善意的灌水,本站規定你所提交的文章"; echo" |
"; echo"
"; echo"的長度必須大於50個漢字。請你重新提交文章。謝謝"; echo" |
"; echo"
"; echo"【重新提交文章】 "; echo"【返回到首頁】"; echo" |
"; echo"
";
echo"
"; echo"
"; echo"
| 返回首頁 | "; echo"
| 推薦說明 | | "; echo"
搜尋文章 | | "; echo"
閱讀文章 | | "; echo"
聯絡站長 | | "; echo"
"; echo"
";
exit;
}
$strlen=strlen($name);
if($strlen<=1){
echo"
"; echo"
"; echo"請你正確輸入你的名字"; echo" |
"; echo"
"; echo"【重新提交文章】 "; echo"【返回首頁】"; echo" |
"; echo"
";
echo"
"; echo"
"; echo"
| 返回首頁 | "; echo"
| 推薦說明 | | "; echo"
搜尋文章 | | "; echo"
閱讀文章 | | "; echo"
聯絡站長 | | "; echo"
"; echo"
";
exit;
}
@$conn=MySQL_connect("localhost","user","passWord");
mysql_select_db("bamboo");
$sql="select*from article where articlename='$articlename'";
$result=mysql_query($sql,$conn);
if($result){
if(mysql_fetch_object($result)){
echo"
"; echo"
"; echo"你所推薦的文章已經存在了"; echo" | "; echo"
"; echo"重新推薦下一篇文章"; echo" |
"; echo"
"; echo"如果你確信本站沒有你所推薦的文章,請你點這裡與此同時Bamboo聯絡"; echo" |
"; echo"
"; echo"【重新發表新的文章】"; echo"【返回首頁】"; echo" |
"; echo"
";
mysql_close($conn);
echo"
"; echo"
"; echo"
| 返回首頁 | "; echo"
| 推薦說明 | | "; echo"
搜尋文章 | | "; echo"
閱讀文章 | | "; echo"
聯絡站長 | | "; echo"
"; echo"
";
exit;}
}
$sql="select *from article where name=$name";
$result=mysql_query($sql,$conn);
if($result){
if(mysql_fetch_object($result)){
echo"
"; echo"
"; echo"
"; echo"本站資料庫記錄顯示已經有一個和你同名的記錄,請你換一個名字重新發表文章"; echo" |
"; echo"
"; echo"重新發表文章"; echo"返回首頁"; echo" |
"; echo"
";
mysql_close($conn);
echo"
"; echo"
"; echo"
| 返回首頁 | "; echo"
| 推薦說明 | | "; echo"
搜尋文章 | | "; echo"
閱讀文章 | | "; echo"
聯絡站長 | | "; echo"
"; echo"
";
exit;
}
}
echo $webadd1;
$sql="insert into article(name,webname,webadd,weblogo,articlename,articleauthor,articlemsg) values ('$name','$webname','$webadd','$weblogo','$articlename'
,'$articleauthor'
,'$articlemsg'
)";
//echo mysql_errno().":".mysql_error()."
";
if(mysql_query($sql,$conn)){
echo"
"; echo"
"; echo"謝謝你,斑竹園的發展離不開你的支援。你提交的文章已經接受"; echo" |
"; echo"
"; echo"【提交另一篇文章】"; echo"【返回首頁】"; echo" |
"; echo"
";
mysql_close($conn);
}
else{
echo"
"; echo"
"; echo"對不起,你提交的文章出現錯誤,請你重新提交"; echo" |
"; echo"
"; echo"【重新提交】"; echo"【返回首頁】"; echo" |
"; echo"
";
mysql_close($conn);
}
echo"
"; echo"
"; echo"
| 返回首頁 | "; echo"
| 推薦說明 | | "; echo"
搜尋文章 | | "; echo"
閱讀文章 | | "; echo"
聯絡站長 | | "; echo"
"; echo"
";
?>