]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
More variables renamed to , install/admin_WriteData() is now generic (with open TODO)
[mailer.git] / inc / mysql-manager.php
index 98c45fe686e0b13b182ae9b1981886483f1e7850..2304e13b9932506d4da3a9bc9ed77ea30fbefadb 100644 (file)
@@ -205,22 +205,23 @@ function CHECK_MODULE ($mod) {
 }
 
 // Add menu description pending on given file name (without path!)
-function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
+function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
        global $NAV_DEPTH;
 
-       // Use only filename of the file ;)
-       $file = basename($file);
+       // Use only filename of the FQFN...
+       $file = basename($FQFN);
 
        // Init variables
-       $LINK_ADD = ""; $OUT = ""; $AND = "";
+       $LINK_ADD = "";
+       $OUT = "";
+       $AND = "";
 
        // First we have to do some analysis...
        if (substr($file, 0, 7) == "action-") {
                // This is an action file!
                $type = "action";
                $search = substr($file, 7);
-               switch ($ACC_LVL)
-               {
+               switch ($ACC_LVL) {
                case "admin":
                        $modCheck = "admin";
                        break;
@@ -237,8 +238,7 @@ function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
                $type = "what";
                $search = substr($file, 5);
                $AND = "";
-               switch ($ACC_LVL)
-               {
+               switch ($ACC_LVL) {
                case "admin":
                        $modCheck = "admin";
                        break;
@@ -255,17 +255,19 @@ function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
                $AND .= " AND `action`='".GET_ACTION($ACC_LVL, $dummy)."'";
        } elseif (($ACC_LVL == "sponsor") || ($ACC_LVL == "engine")) {
                // Sponsor / engine menu
-               $type = "what";
-               $search = $file;
+               $type     = "what";
+               $search   = $file;
                $modCheck = $GLOBALS['module'];
-               $AND = "";
+               $AND      = "";
        } else {
                // Other
-               $type = "menu";
-               $search = $file;
+               $type     = "menu";
+               $search   = $file;
                $modCheck = $GLOBALS['module'];
-               $AND = "";
+               $AND      = "";
        }
+
+       // Begin the navigation line
        if ((!isset($NAV_DEPTH)) && (!$return)) {
                $NAV_DEPTH = 0;
                $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--}&nbsp;<strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
@@ -1337,8 +1339,7 @@ function GET_CURRENT_ADMIN_ID () {
 }
 
 // Get password hash from administrator's login name
-function GET_ADMIN_HASH ($aid)
-{
+function GET_ADMIN_HASH ($aid) {
        global $cacheArray;
        $ret = "-1";
        if (isset($cacheArray['admins']['password'][$aid])) {
@@ -1460,7 +1461,7 @@ function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where=
                        // Both are arrays
                        foreach ($id as $idx => $value) {
                                $ret .= "<option value=\"".$value."\"";
-                               if ($default == $value) $ret .= " selected checked";
+                               if ($default == $value) $ret .= " selected=\"selected\"";
                                $ret .= ">".$name[$idx]."</option>\n";
                        } // END - foreach
                } // END - if
@@ -1477,7 +1478,7 @@ function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where=
                        while (list($value, $title, $add) = SQL_FETCHROW($result)) {
                                if (empty($special)) $add = "";
                                $ret .= "<option value=\"".$value."\"";
-                               if ($default == $value) $ret .= " selected checked";
+                               if ($default == $value) $ret .= " selected=\"selected\"";
                                if (!empty($add)) $add = " (".$add.")";
                                $ret .= ">".$title.$add."</option>\n";
                        } // END - while