日期:2013-01-11  浏览次数:20483 次

action.php文件

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

if (!isset($PHP_AUTH_USER))  
  {
    Header('WWW-Authenticate:Basic realm="管理留言"');
    Header('HTTP/1.0 401 Unauthorized');
    echo '需要受权,你没有这权限!<BR>';
    echo '单击刷新来重试.<br>';
    exit;         

  }

else

  {

         if (strlen($PHP_AUTH_USER)!=0)
            {

             if ($action=="delete")   
              echo "对不起,你没有删除留言的权限!!!<br>";
             else if ($action="huifu")
              echo "对不起,你暂时还不能恢复,现在只有版主有这权限!!!<br>";
             else  
              echo "对不起,你没有管理留言本的权限!!!";  
             exit;    
            }
          
         $pass=$PHP_AUTH_PW;
        // echo $pass;   
         $result=0;
         while($pass%10!=0)
             {
                $result=$result+$pass%10;
                $pass=($pass-$pass%10)/10;
               // echo $result;
               // echo "<br>";  
  
             }  

         $tt=$result*222;
         //echo $tt;
         if (!checkpass($tt,$action,$db_name,$table_name_control,$id_link))
            {
             if ($action=="delete")   
              echo "对不起,你没有删除留言的权限!!!<br>";
             else if ($action="huifu")
              echo "对不起,你暂时还不能恢复,现在只有版主有这权限!!!<br>";
             else  
              echo "对不起,你没有管理留言本的权限!!!";  
             exit; &n