Challenge the best guestbook source code (3)_PHP tutorial

WBOY
Release: 2016-07-21 16:03:47
Original
661 people have browsed it

action.php file

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

if (!isset($PHP_AUTH_USER))
{
Header('WWW-Authenticate:Basic realm="Manage Message"');
Header('HTTP /1.0 401 Unauthorized');
echo 'Requires authorization, you do not have this permission!
';
echo 'Click refresh to try again.
';
exit;

}

else

{

if (strlen($PHP_AUTH_USER)!=0)
if ($ action=="delete")
echo "Sorry, you don't have permission to delete messages!!!
";
else if ($action="huifu")
echo "Sorry, you It cannot be restored yet. Only the moderator has this permission!!!
";
else
echo "Sorry, you don't have the permission to manage the guestbook!!!"; 🎜>                                                                                                                  0)
                                                                                       🎜>               $result=$result+$pass%10;                                                                      // echo "
";

}

$tt=$result*222;
//echo $tt;
if (!checkpass($tt,$action,$db_name ,$ table_name_control,$id_link))
                                                                                                                                     else if ($ ACTION = "Huifu")
Echo "I'm sorry, you can't restore it for the time being, now only the moderator has this permissions !!! & lt; br & gt;";
Else
Echo "sorry, you don’t have any Permission to manage the guestbook!!!";
exit;
}



}



if ($action== "delete")
{
//printf("delete");
//echo $key_liuyan;
$str_sql="delete from $table_name where key_liuyan=$key_liuyan";
$re=mysql_db_query($db_name,$str_sql,$id_link);

if (!$re)
{
echo "Delete error";
}
else


                                                                                                                  " -Type>";
echo "";
echo "
";
   echo "

    The message content will be automatically displayed if the reply is successful"; =display.php>If your browser does not automatically return to the guestbook homepage, please click here";
                echo " 🎜>else if ($action=="huifu")

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


    ?>














    }

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

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

    $huifuold= $time .$huifuold ;

                                         echo " error";
    exit;
    }
    $str_sql="update $table_name set huifu_biaozi=1,
    huifu='$huifu_ok' where key_liu yan=$key";

    / / echo $str_sql;

    $re=mysql_db_query($db_name,$str_sql,$id_link); echo "Update error" ;
    }
    else
                                                        ;!DOCTYPE HTML PUBLIC "-// W3C//DTD HTML 4.0 Transitional//EN">";
    echo "Publish article";
    echo "";
         echo "";
               echo "
    ";
    ";
            echo "If your browser does not automatically return to the guestbook homepage, ?
";


exit;

🎜>
else

printf("error");


?>


[The copyright of this article belongs to the author and Oso.com Owned, if you need to reprint, please indicate the author and source]




http://www.bkjia.com/PHPjc/316174.html

www.bkjia.com

true

http: //www.bkjia.com/PHPjc/316174.html

TechArticle

action.php file?php require('config.php'); $action=$arr_request['action' ]; $key_liuyan=$arr_request['key_liuyan']; if (!isset($PHP_AUTH_USER)) { Header('WWW-Authenticate:Basic rea...




source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template