]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_user.php
Previous fix fixed, a lot constants rewritten (unfinished)
[mailer.git] / inc / modules / admin / what-edit_user.php
index a4be4f6398bcc4cfc100d98fa20a8eba42f59ee7..f3d58632667a2c336cc8e16451ad628f085e7f56 100644 (file)
  ************************************************************************/
 
 // 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__);
 
 // Fix a notice
 $result_main = false;
 if (isset($_GET['u_id'])) {
        //                                    0      1        2         3      4     5      6       7         8          9           10         11
-       $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
-        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+       $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails
+FROM `{!_MYSQL_PREFIX!}_user_data`
+WHERE userid=%s
+LIMIT 1",
+               array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
 }
 
 if ((SQL_NUMROWS($result_main) == 1) || (empty($_GET['u_id'])))
@@ -74,7 +77,7 @@ if ((SQL_NUMROWS($result_main) == 1) || (empty($_GET['u_id'])))
                if ($PASS)
                {
                        // We have to add the following things: birthday and max receive mails
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
 gender='%s',
 surname='%s',
 family='%s',
@@ -146,7 +149,7 @@ WHERE userid=%s LIMIT 1",
  else
 {
        // Account does not exists!
-       OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
+       LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</div>");
 }
 
 //