yuki_365170a716 2008-8-11 11:15
文章推荐系统(二)
<P>======APPRE.[url=http://whatis.ctocio.com.cn/searchwhatis/77/6026077.shtml]PHP[/url]========== <BR>$strlen=strlen($articlemsg); <BR>if($strlen<50){ <BR> echo "<[url=http://whatis.ctocio.com.cn/searchwhatis/456/6028456.shtml]table[/url] align=center width=100%>"; <BR> echo "<tr align=center><td>"; <BR> echo"你是不是在灌水呀?为防止部分网友善意的灌水,本站规定你所提交的文章"; <BR> echo"</td></tr>"; <BR> echo"<tr align=center><td>"; <BR> echo"的长度必须大于50个汉字。请你重新提交文章。谢谢"; <BR> echo"</td></tr>"; <BR> echo"<tr><td align=center>"; <BR> echo"<a href=appre.[url=http://whatis.ctocio.com.cn/searchwhatis/154/5948154.shtml]htm[/url]>【重新提交文章】</a>&nbsp;&nbsp;&nbsp"; <BR> echo"<a href=index.php>【返回到主页】</a>"; <BR> echo"</td></tr>"; <BR> echo"</table>"; <BR> echo"<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00FF00>"; <BR> echo"<tr>"; <BR> echo"<td width=20%>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.php>返回首页&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp;|&nbsp;<a href=help.htm> 推荐说明</a>&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp;&nbsp; <a href=#>搜索文章&nbsp;</a>&nbsp; <BR> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp; <a href=article.php>阅读文章</a>&nbsp;&nbsp;&nbsp;&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp; <a href=mailto:webinfro@163.[url=http://whatis.ctocio.com.cn/searchwhatis/307/5947307.shtml]com[/url]>联系站长</a>&nbsp; <BR> |</td>"; <BR> echo"</tr>"; <BR> echo"</table>"; </P>
<P> exit; <BR>} <BR>$strlen=strlen($name); <BR>if($strlen<=1){ <BR> echo"<table align=center width=100%>"; <BR> echo"<tr align=center><td>"; <BR> echo"请你正确输入你的名字"; <BR> echo"</td></tr>"; <BR> echo"<tr><td align=center>"; <BR> echo"【<a href=appre.htm>重新提交文章</a>】&nbsp;&nbsp;&nbsp;&nbsp"; <BR> echo"【<a href=index.php>返回主页</a>】"; <BR> echo"</td></tr>"; <BR> echo"</table>"; <BR> echo"<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00FF00>"; <BR> echo"<tr>"; <BR> echo"<td width=20%>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.php>返回首页&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp;|&nbsp;<a href=help.htm> 推荐说明</a>&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp;&nbsp; <a href=#>搜索文章&nbsp;</a>&nbsp; <BR> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp; <a href=article.php>阅读文章</a>&nbsp;&nbsp;&nbsp;&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp; <a href=mailto:webinfro@163.com>联系站长</a>&nbsp; <BR> |</td>"; <BR> echo"</tr>"; <BR> echo"</table>"; </P>
<P> exit; <BR>} <BR>@$conn=mysql_connect("localhost","user","[url=http://whatis.ctocio.com.cn/searchwhatis/435/6025935.shtml]password[/url]"); <BR>mysql_select_db("bamboo"); <BR>$sql="select*from article where articlename='$articlename'"; <BR>$result=mysql_query($sql,$conn); <BR>if($result){ <BR> if(mysql_fetch_object($result)){ <BR> echo"<table align=center width=100%>"; <BR> echo"<tr><td align=center>"; <BR> echo"你所推荐的文章已经存在了"; <BR> echo"</td>"; <BR> echo"<td align=center>"; <BR> echo"<a href=appre.htm>重新推荐下一篇文章</a>"; <BR> echo"</td></tr>"; <BR> echo"<tr><td align=center>"; <BR> echo"如果你确信本站没有你所推荐的文章,请你点<a href=mailto:webinfro@163.com>这里</a>与此同时Bamboo联系"; <BR> echo"</td></tr>"; <BR> echo"<tr><td align=center>"; <BR> echo"【<a href=appre.htm>重新发表新的文章</a>】"; <BR> echo"【<a href=index.php>返回主页</a>】"; <BR> echo"</td></tr>"; <BR> echo"</table>"; <BR> mysql_close($conn); <BR> echo"<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00FF00>"; <BR> echo"<tr>"; <BR> echo"<td width=20%>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.php>返回首页&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp;|&nbsp;<a href=help.htm> 推荐说明</a>&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp;&nbsp; <a href=#>搜索文章&nbsp;</a>&nbsp; <BR> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; </P>
<P> echo"<td width=20%>&nbsp; <a href=article.php>阅读文章</a>&nbsp;&nbsp;&nbsp;&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp; <a href=mailto:webinfro@163.com>联系站长</a>&nbsp; <BR> |</td>"; <BR> echo"</tr>"; <BR> echo"</table>"; </P>
<P> exit;} <BR> } <BR>$sql="select *from article where name=$name"; <BR>$result=mysql_query($sql,$conn); <BR>if($result){ <BR> if(mysql_fetch_object($result)){ <BR> echo"<table width=100% align=center>"; <BR> echo"<tr align=center>"; <BR> echo"<td align=center>"; <BR> echo"本站[url=http://database.ctocio.com.cn/]数据库[/url]记录显示已经有一个和你同名的记录,请你换一个名字重新发表文章"; <BR> echo"</td></tr>"; <BR> echo"<tr><td align=center>"; <BR> echo"<a href=appre.htm>重新发表文章</a>"; <BR> echo"<a href=index.php>返回主页</a>"; <BR> echo"</td></tr>"; <BR> echo"</table>"; <BR> mysql_close($conn); <BR> echo"<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00FF00>"; <BR> echo"<tr>"; <BR> echo"<td width=20%>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.php>返回首页&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp;|&nbsp;<a href=help.htm> 推荐说明</a>&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp;&nbsp; <a href=#>搜索文章&nbsp;</a>&nbsp; <BR> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp; <a href=article.php>阅读文章</a>&nbsp;&nbsp;&nbsp;&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp; <a href=mailto:webinfro@163.com>联系站长</a>&nbsp; <BR> |</td>"; <BR> echo"</tr>"; <BR> echo"</table>"; </P>
<P> exit; <BR> } <BR>} </P>
<P>echo $webadd1; <BR>$sql="insert into article(name,webname,webadd,weblogo,articlename,articleauthor,articlemsg) values ('$name','$webname','$webadd','$weblogo','$articlename' <BR>,'$articleauthor' <BR>,'$articlemsg' <BR>)"; <BR>//echo mysql_errno().":".mysql_error()."<br>"; <BR>if(mysql_query($sql,$conn)){ <BR> echo"<table width=100% align=center>"; <BR> echo"<tr><td align=center>"; <BR> echo"谢谢你,斑竹园的发展离不开你的支持。你提交的文章已经接受"; <BR> echo"</td></tr>"; <BR> echo"<tr><td align=center>"; <BR> echo"【<a href=appre.htm>提交另一篇文章</a>】"; <BR> echo"【<a href=index.php>返回主页</a>】"; <BR> echo"</td></tr>"; <BR> echo"</table>"; <BR> mysql_close($conn); <BR> } <BR>else{ <BR> echo"<table width=100% align=center>"; <BR> echo"<tr><td align=center>"; <BR> echo"对不起,你提交的文章出现错误,请你重新提交"; <BR> echo"</td></tr>"; <BR> echo"<tr><td align=center>"; <BR> echo"【<a href=appre.htm>重新提交</a>】"; <BR> echo"【<a href=index.php>返回主页</a>】"; <BR> echo"</td></tr>"; <BR> echo"</table>"; <BR> mysql_close($conn); <BR> } <BR> echo"<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00FF00>"; <BR> echo"<tr>"; <BR> echo"<td width=20%>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.php>返回首页&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"; <BR> echo"<td width=20%>&nbsp;|&nbsp;<a href=help.htm> 推荐说明</a>&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp;&nbsp; <a href=#>搜索文章&nbsp;</a>&nbsp; <BR> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> "; <BR> echo"<td width=20%>&nbsp; <a href=article.php>阅读文章</a>&nbsp;&nbsp;&nbsp;&nbsp; <BR> |</td>"; <BR> echo"<td width=20%>&nbsp; <a href=mailto:webinfro@163.com>联系站长</a>&nbsp; <BR> |</td>"; <BR> echo"</tr>"; <BR> echo"</table>"; </P>
<P>?><BR></P>