======APPRE.PHP==========
$strlen=strlen($articlemsg);
if($strlen<50){
echo "
1<table align="center" width="100%">";
2echo "<tr align="center"><td>";
3echo"你是不是在灌水呀?为防止部分网友善意的灌水,本站规定你所提交的文章";
4echo"</td></tr>";
5echo"<tr align="center"><td>";
6echo"的长度必须大于50个汉字。请你重新提交文章。谢谢";
7echo"</td></tr>";
8echo"<tr><td align="center">";
9echo"<a href="appre.htm">【重新提交文章】</a> ";
10echo"<a href="index.php">【返回到主页】</a>";
11echo"</td></tr>";
12echo"</table>
";
echo"
1<table bgcolor="00FF00" border="0" cellpadding="5" cellspacing="0" width="100%">";
2echo"<tr>";
3echo"<td width="20%">| <a href="index.php">返回首页 </a> </td>";
4echo"<td width="20%"> | <a href="help.htm"> 推荐说明</a>
5|</td>";
6echo"<td width="20%"> <a href="#">搜索文章 </a>
7| </td>";
8echo"<td width="20%"> <a href="article.php">阅读文章</a>
9|</td>";
10echo"<td width="20%"> <a href="mailto:[email protected]">联系站长</a>
11|</td>";
12echo"</tr>";
13echo"</table>
";
exit;
}
$strlen=strlen($name);
if($strlen<=1){
echo"
1<table align="center" width="100%">";
2echo"<tr align="center"><td>";
3echo"请你正确输入你的名字";
4echo"</td></tr>";
5echo"<tr><td align="center">";
6echo"【<a href="appre.htm">重新提交文章</a>】 ";
7echo"【<a href="index.php">返回主页</a>】";
8echo"</td></tr>";
9echo"</table>
";
echo"
1<table bgcolor="00FF00" border="0" cellpadding="5" cellspacing="0" width="100%">";
2echo"<tr>";
3echo"<td width="20%">| <a href="index.php">返回首页 </a> </td>";
4echo"<td width="20%"> | <a href="help.htm"> 推荐说明</a>
5|</td>";
6echo"<td width="20%"> <a href="#">搜索文章 </a>
7| </td>";
8echo"<td width="20%"> <a href="article.php">阅读文章</a>
9|</td>";
10echo"<td width="20%"> <a href="mailto:[email protected]">联系站长</a>
11|</td>";
12echo"</tr>";
13echo"</table>
";
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"
1<table align="center" width="100%">";
2echo"<tr><td align="center">";
3echo"你所推荐的文章已经存在了";
4echo"</td>";
5echo"<td align="center">";
6echo"<a href="appre.htm">重新推荐下一篇文章</a>";
7echo"</td></tr>";
8echo"<tr><td align="center">";
9echo"如果你确信本站没有你所推荐的文章,请你点<a href="mailto:[email protected]">这里</a>与此同时Bamboo联系";
10echo"</td></tr>";
11echo"<tr><td align="center">";
12echo"【<a href="appre.htm">重新发表新的文章</a>】";
13echo"【<a href="index.php">返回主页</a>】";
14echo"</td></tr>";
15echo"</table>
";
mysql_close($conn);
echo"
1<table bgcolor="00FF00" border="0" cellpadding="5" cellspacing="0" width="100%">";
2echo"<tr>";
3echo"<td width="20%">| <a href="index.php">返回首页 </a> </td>";
4echo"<td width="20%"> | <a href="help.htm"> 推荐说明</a>
5|</td>";
6echo"<td width="20%"> <a href="#">搜索文章 </a>
7| </td>";
8
9echo"<td width="20%"> <a href="article.php">阅读文章</a>
10|</td>";
11echo"<td width="20%"> <a href="mailto:[email protected]">联系站长</a>
12|</td>";
13echo"</tr>";
14echo"</table>
";
exit;}
}
$sql="select *from article where name=$name";
$result=mysql_query($sql,$conn);
if($result){
if(mysql_fetch_object($result)){
echo"
1<table align="center" width="100%">";
2echo"<tr align="center">";
3echo"<td align="center">";
4echo"本站数据库记录显示已经有一个和你同名的记录,请你换一个名字重新发表文章";
5echo"</td></tr>";
6echo"<tr><td align="center">";
7echo"<a href="appre.htm">重新发表文章</a>";
8echo"<a href="index.php">返回主页</a>";
9echo"</td></tr>";
10echo"</table>
";
mysql_close($conn);
echo"
1<table bgcolor="00FF00" border="0" cellpadding="5" cellspacing="0" width="100%">";
2echo"<tr>";
3echo"<td width="20%">| <a href="index.php">返回首页 </a> </td>";
4echo"<td width="20%"> | <a href="help.htm"> 推荐说明</a>
5|</td>";
6echo"<td width="20%"> <a href="#">搜索文章 </a>
7| </td>";
8echo"<td width="20%"> <a href="article.php">阅读文章</a>
9|</td>";
10echo"<td width="20%"> <a href="mailto:[email protected]">联系站长</a>
11|</td>";
12echo"</tr>";
13echo"</table>
";
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()."
1<br/>
";
if(mysql_query($sql,$conn)){
echo"
1<table align="center" width="100%">";
2echo"<tr><td align="center">";
3echo"谢谢你,斑竹园的发展离不开你的支持。你提交的文章已经接受";
4echo"</td></tr>";
5echo"<tr><td align="center">";
6echo"【<a href="appre.htm">提交另一篇文章</a>】";
7echo"【<a href="index.php">返回主页</a>】";
8echo"</td></tr>";
9echo"</table>
";
mysql_close($conn);
}
else{
echo"
1<table align="center" width="100%">";
2echo"<tr><td align="center">";
3echo"对不起,你提交的文章出现错误,请你重新提交";
4echo"</td></tr>";
5echo"<tr><td align="center">";
6echo"【<a href="appre.htm">重新提交</a>】";
7echo"【<a href="index.php">返回主页</a>】";
8echo"</td></tr>";
9echo"</table>
";
mysql_close($conn);
}
echo"
1<table bgcolor="00FF00" border="0" cellpadding="5" cellspacing="0" width="100%">";
2echo"<tr>";
3echo"<td width="20%">| <a href="index.php">返回首页 </a> </td>";
4echo"<td width="20%"> | <a href="help.htm"> 推荐说明</a>
5|</td>";
6echo"<td width="20%"> <a href="#">搜索文章 </a>
7| </td> ";
8echo"<td width="20%"> <a href="article.php">阅读文章</a>
9|</td>";
10echo"<td width="20%"> <a href="mailto:[email protected]">联系站长</a>
11|</td>";
12echo"</tr>";
13echo"</table>
";
?>