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 "