]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_country.php
Extension 'debug' introduced (dummy!), fix for guest/member menu sorting, typos fixed
[mailer.git] / inc / modules / admin / what-list_country.php
index f0c8457997e07000bdc9a28984c7df3e8decec84..7977ca3ba018a8f6679264d1475cbe5ae3adf9dd 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__);
 
 // Add new code?
 if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr'])))
@@ -50,8 +49,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr'
        if (SQL_NUMROWS($result) == 0)
        {
                // Save entry
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active)
- VALUES('%s', '%s', '%s')",
+               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('%s','%s','%s')",
  array(strtoupper(substr($_POST['code'], 0, 2)), $_POST['descr'], $_POST['is_active']), __FILE__, __LINE__);
 
                // Country added
@@ -125,7 +123,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr'
                                if ($post == "modify")
                                {
                                        // Generate default selection in edit-mode
-                                       $content['status'] = ADD_OPTION_LINES("/ARRAY/", array('Y', 'N'), array(YES, NO ), $status);
+                                       $content['status'] = ADD_OPTION_LINES("/ARRAY/", array("Y","N"), array(YES, NO ), $status);
                                }
                                 else
                                {