X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=inc%2Fhtml%2Fadmin.php;h=d15846a255b7ed4fe5744c87c07213ca32f5d9f9;hp=d6d876b105aa570631c4e02cff7105d9ba60d569;hb=HEAD;hpb=1eff14d093d541d9858f73ffca042de5a2bf3ea5
diff --git a/inc/html/admin.php b/inc/html/admin.php
index d6d876b..d15846a 100644
--- a/inc/html/admin.php
+++ b/inc/html/admin.php
@@ -7,7 +7,7 @@ $error = false;
if (!@include_once ("./inc/settings.php")) {
$error = true;
}
-require_once ("./inc/db/mysql.php");
+require_once ("./inc/db/" . (defined ("DBTYPE")? DBTYPE: "mysql") . ".php");
require_once ("./inc/utils.php");
try {
@@ -39,8 +39,10 @@ if (!$usrtblexists || !$itemstblexists) {
exit ();
} // if ($error)
- $user = $_COOKIE [sprintf ("%suser", DBPREFIX)];
- $pwd = $_COOKIE [sprintf ("%sauth", DBPREFIX)];
+ $userkey = sprintf ("%suser", DBPREFIX);
+ $user = (isset($_COOKIE [$userkey]))? $_COOKIE[$userkey]: "";
+ $pwdkey = sprintf ("%sauth", DBPREFIX);
+ $pwd = (isset($_COOKIE [$pwdkey]))? $_COOKIE[$pwdkey]: "";
$logged = ($connection->checkpwdmd5 ($user, $pwd));
?>
+\n");
+ }
+?>
+