文章推薦系統(二)

來源:互聯網
上載者:User
關鍵字 文章推薦系統(二)
======APPRE.php==========
$strlen=strlen($articlemsg);
if($strlen<50){
 echo "



";  echo " ";  echo" ";  echo" ";  echo"
";
 echo"你是不是在灌水呀?為防止部分網友善意的灌水,本站規定你所提交的文章";
 echo"
";
 echo"的長度必須大於50個漢字。請你重新提交文章。謝謝";
 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"重新推薦下一篇文章";
  echo"
";
  echo"如果你確信本站沒有你所推薦的文章,請你點這裡與此同時Bamboo聯絡";
  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"
|   返回首頁    | 推薦說明
     |
  搜尋文章
     |   
閱讀文章  
     |
聯絡站長
     |
";

?>
  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.