首頁  >  文章  >  後端開發  >  挑戰最棒的留言本的源碼(三)_PHP教程

挑戰最棒的留言本的源碼(三)_PHP教程

WBOY
WBOY原創
2016-07-21 16:03:47662瀏覽

action.php檔案

require('config.php');   
$action=$arr_request['action'];
$key_liuyan=$arr_request['key_liuyan '];

if (!isset($PHP_AUTH_USER))  
  {
    Header('WWW-Authenticate:Basic realm="TPM.D); 1.0 401 Unauthorized');
    echo '需要受權,你沒有這權限!
';
    echo '點選刷新來重試.
';
   echo '點選刷新來重複🎜>  }

else

  {

         🎜>
             if ($action== "delete")   
              echo "對不起,你沒有留言的權限!!!
";
             echo "對不起,你暫時還不能恢復,現在只有版主有此權限!!!
";
             else  
                 exit;    
            }

         $pass=$PHP_AUTH_PW;
        // echo $pass;   while($pass !=0)
             {
          result $pass ;
                $pass=($pass-$pass )/10;
              // echo "
";  

             }

         $tt=$result*222;
         //  $ $id_link))
{
             if ($action=="delete")   
                else if ($action="huifu")
              echo "對不起,你暫時還不能恢復,現在只有版主有此權限!!!
";
          echo "對不起,你沒有管理留言本的權限!!!";  
             exit;    
            🎜>if ($action=="delete")
  {
//printf("delete");
   //echo $key_liuyan;
   $str_sql="delete from $table_name where key_liuyan=$key_liuyan"; $id_link);

   if (!$re)
      {
        echo
   else

      {
          echo " C//DTD HTML 4.0 Transitional//EN">";
          echo "

發表文章";
         >          echo "";
         >          echo "
    回覆成功,將自動顯示留言內容";
              echo " 
    "簿首頁,請點這裡";
              echo "
";
       }    

{
   //printf("huifu");
  // echo $key_liuyan;

     ?>
   

   
   



   


   


   




  }

else if ($action=="ok")
   key'];
      $huifuold=$huifu;

      $time=date('Y/m/d H:i:     $time=date('Y/m/d H:i:     $time=date('Y/m/d H:i:0); . ')
';

      $huifuold=$time .$huifuold ;

       umber);       

if (strlen($key)==0)
         {  echo "error";
               $str_sql="update $table_name set huifu_biaozi=1,
                  huifu=' $huifu_ok'  where key_liuyan=$key";    

   //   echo $str_sql    $id_link);

      if (!$re)
         {
             echo "更新中出錯";       else
          {

  
    


            echo "";
            echo "發表文章"; ";
           echo "
";
            echo "
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn