X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_add.php;h=fad779b17f607d531364162542f3429bf377dfe7;hb=2142149f3f72f1a2476f95a87937c044d63bbaf2;hp=c3073789f19d362504197c4a855bc82d07cd2d06;hpb=d0ab0382dd73638f0bc13a1a3d6f117ec11a203e;p=mailer.git
diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php
index c3073789f1..fad779b17f 100644
--- a/inc/modules/admin/what-admins_add.php
+++ b/inc/modules/admin/what-admins_add.php
@@ -32,15 +32,15 @@
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
-global $CACHE;
+global $cacheInstance;
// Display form is default
$FORM = true;
@@ -54,16 +54,16 @@ if ((isset($_POST['add'])) && (!empty($_POST['login'])) && (!empty($_POST['email
{
// Login does not exist so we can create it.
$FORM = false;
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins (login, password, email) VALUES ('%s', '%s', '%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins (login, password, email) VALUES ('%s','%s','%s')",
array($_POST['login'], generateHash($_POST['pass1']), $_POST['email']), __FILE__, __LINE__);
// Admin login saved
- LOAD_TEMPLATE ("admin_settings_saved", false, "".ADMIN_ADMINS_ADD_DONE."");
+ LOAD_TEMPLATE("admin_settings_saved", false, "".ADMIN_ADMINS_ADD_DONE."");
// Remove cache file
if (EXT_IS_ACTIVE("cache"))
{
- if ($CACHE->cache_file("admins", true)) $CACHE->cache_destroy();
+ if ($cacheInstance->cache_file("admins", true)) $cacheInstance->cache_destroy();
}
}
else