您的位置:首页网页设计PHP实例 → 文章推荐系统二

文章推荐系统二

时间:2004/11/7 3:29:00来源:本站整理作者:蓝点我要评论(0)

======APPRE.PHP==========

$strlen=strlen($articlemsg);

if($strlen<50){

  echo "";

  echo "";

  echo"";

  echo"";

  echo"

";

  echo"你是不是在灌水呀?为防止部分网友善意的灌水,本站规定你所提交的文章";

  echo"
";

  echo"的长度必须大于50个汉字。请你重新提交文章。谢谢";

  echo"
";

  echo"【重新提交文章】&nbsp;&nbsp;&nbsp";

  echo"【返回到主页】";

  echo"

";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"

|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 返回首页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;|&nbsp; 推荐说明&nbsp;

          |
&nbsp;&nbsp; 搜索文章&nbsp;&nbsp;

          |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; 阅读文章&nbsp;&nbsp;&nbsp;&nbsp;

          |
&nbsp; 联系站长&nbsp;

          |

";



  exit;

}

$strlen=strlen($name);

if($strlen<=1){

  echo"";

  echo"";

  echo"";

  echo"

";

  echo"请你正确输入你的名字";

  echo"
";

  echo"【重新提交文章】&nbsp;&nbsp;&nbsp;&nbsp";

  echo"【返回主页】";

  echo"

";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"";

  echo"

|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 返回首页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;|&nbsp; 推荐说明&nbsp;

          |
&nbsp;&nbsp; 搜索文章&nbsp;&nbsp;

          |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; 阅读文章&nbsp;&nbsp;&nbsp;&nbsp;

          |
&nbsp; 联系站长&nbsp;

          |

";



  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"重新推荐下一篇文章";

    echo"
";

    echo"如果你确信本站没有你所推荐的文章,请你点这里与此同时Bamboo联系";

    echo"


";

    echo"【重新发表新的文章】";

    echo"【返回主页】";

    echo"


";

    mysql_close($conn);

    echo"";

    echo"";

    echo"";

    echo"";

    echo"";



    echo"";

    echo"";

    echo"";

    echo"

|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 返回首页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;|&nbsp; 推荐说明&nbsp;

          |
&nbsp;&nbsp; 搜索文章&nbsp;&nbsp;

          |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; 阅读文章&nbsp;&nbsp;&nbsp;&nbsp;

          |
&nbsp; 联系站长&nbsp;

          |

";



    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"

|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 返回首页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;|&nbsp; 推荐说明&nbsp;

          |
&nbsp;&nbsp; 搜索文章&nbsp;&nbsp;

          |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; 阅读文章&nbsp;&nbsp;&nbsp;&nbsp;

          |
&nbsp; 联系站长&nbsp;

          |

";



  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"

|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 返回首页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;|&nbsp; 推荐说明&nbsp;

          |
&nbsp;&nbsp; 搜索文章&nbsp;&nbsp;

          |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; 阅读文章&nbsp;&nbsp;&nbsp;&nbsp;

          |
&nbsp; 联系站长&nbsp;

          |

";



?>

相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么

文章评论
发表评论

热门文章 没有查询到任何记录。

最新文章 我的php文件怎么打开_php运算符怎么写 php 如何生成静态页面的函数PHP生成图片缩略图PHP session常见问题集锦及解决办法PHP实现同步远程Mysql

人气排行 DEDE在文章列表文章没有缩略图的不显示图片php+mysq修改用户密码我的php文件怎么打开_如何打开php文件的办法FCKeditor的配置和使用方法使用dedecms建站教程PHP+Ajax实现分页技术图片存储与浏览一例Linux+Apache+PHP+MySQLPHP生成图片缩略图