note 34725 added to features.cookies
| From: | php-general at lists dot php dot net | Date: | Tue, 05 Aug 2003 07:28:00 +0000 |
| Subject: | note 34725 added to features.cookies | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-53387@lists.php.net to get a copy of this message | ||
if ((isset($aid)) && (isset($pwd)) && ($op == "login")) {
if($aid!="" AND $pwd!="") {
$pwd = md5($pwd);
$result=sql_query("select pwd, admlanguage from ".$prefix."_authors where
aid='$aid'", $dbi);
list($pass, $admlanguage)=sql_fetch_row($result, $dbi);
if($pass == $pwd) {
$admin = base64_encode("$aid:$pwd:$admlanguage");
setcookie("admin","$admin",time()+3600);
unset($op);
}
}
}
$admintest = 0;
if(isset($admin) && $admin != "") {
$admin = base64_decode($admin);
$admin = explode(":", $admin);
$aid = "$admin[0]";
$pwd = "$admin[1]";
$admlanguage = "$admin[2]";
if ($aid=="" || $pwd=="") {
$admintest=0;
echo "<html>\n";
echo "<title>Ingreso prohibido</title>\n";
echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\">\n\n
\n\n";
echo "<center><img src=\"images/logo.gif\" border=\"0\">
\n";
echo "<font face=\"Verdana\" size=\"+4\"><b>Su Ip esta
siendo registrada en nuestra base de datos, toda operación indebida será investigada.
Gerencia Administrativa</b></font></center>\n";
echo "</body>\n";
echo "</html>\n";
----
Manual Page -- http://www.php.net/manual/en/features.cookies.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34725
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34725&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34725&report=yes