X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=f3a7aba8246c3a89b3d09588a32ca88f7f2b12de;hb=97eb53f4fdcc3f433dea23d09efde744d52a3740;hp=3e3b5124a42578cab52ef822ddc9e665dc1ed86b;hpb=668485e1cdc24a6d918c41ea1f2214566ed71226;p=mailer.git diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 3e3b5124a4..f3a7aba824 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { // function ADD_MODULE_TITLE($mod) { - global $cacheArray, $_CONFIG; + global $cacheArray; $name = ""; $result = false; // Is the script installed? @@ -50,7 +50,7 @@ function ADD_MODULE_TITLE($mod) { $name = $cacheArray['modules']['title'][$mod]; // Update cache hits - if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } + incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", array($mod), __FILE__, __LINE__); @@ -79,7 +79,7 @@ function ADD_MODULE_TITLE($mod) { // Check validity of a given module name (no file extension) function CHECK_MODULE ($mod) { // We need them now here... - global $cacheArray, $_CONFIG, $cacheInstance; + global $cacheArray, $cacheInstance; // Filter module name (names with low chars and underlines are fine!) $mod = preg_replace("/[^a-z_]/", "", $mod); @@ -115,7 +115,7 @@ function CHECK_MODULE ($mod) { $mem = $cacheArray['modules']['mem_only'][$mod_chk]; // Update cache hits - if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } + incrementConfigEntry('cache_hits'); $found = true; } else { // No, then we have to update it! @@ -202,8 +202,8 @@ function CHECK_MODULE ($mod) { } // Add menu description pending on given file name (without path!) -function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) { - global $NAV_DEPTH, $_CONFIG; +function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) { + global $NAV_DEPTH; // Use only filename of the file ;) $file = basename($file); @@ -264,7 +264,7 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) { } if ((!isset($NAV_DEPTH)) && (!$return)) { $NAV_DEPTH = 0; - $prefix = "
".YOU_ARE_HERE." Home"; + $prefix = "
".YOU_ARE_HERE." Home"; } else { if (!$return) $NAV_DEPTH++; $prefix = ""; @@ -293,11 +293,10 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) { return $ret; } elseif (((GET_EXT_VERSION("sql_patches") >= "0.2.3") && (getConfig('youre_here') == "Y")) || ((IS_ADMIN()) && ($modCheck == "admin"))) { // Output HTML code - $OUT = $prefix."".$ret."\n"; + $OUT = $prefix."".$ret."\n"; // Can we close the you-are-here navigation? //* DEBUG: */ echo __LINE__."*".$type."/".$GLOBALS['what']."*
\n"; - //* DEBUG: */ die("
".print_r($_CONFIG, true)."
"); if (($type == "what") || (($type == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview")))) { //* DEBUG: */ echo __LINE__."+".$type."+
\n"; // Add closing div and br-tag @@ -324,9 +323,7 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) { } } // -function ADD_MENU($MODE, $act, $wht) { - global $_CONFIG; - +function ADD_MENU ($MODE, $act, $wht) { // Init some variables $main_cnt = 0; $AND = ""; @@ -376,26 +373,26 @@ function ADD_MENU($MODE, $act, $wht) { $test = (FILE_READABLE($test_inc)); if ($test) { if ((!empty($wht)) && (($wht == $sub_what))) { - $content = ""; + $content = ""; } // Navigation link - $content .= ""; + $content .= ""; } else { - $content .= ""; + $content .= ""; } // Menu title $content .= getConfig('menu_blur_spacer') . $sub_title; if ($test) { - $content .= ""; + $content .= ""; } else { - $content .= ""; + $content .= ""; } if ((!empty($wht)) && (($wht == $sub_what))) { - $content .= ""; + $content .= ""; } $wht = $sub_what; $cnt++; // Prepare array @@ -441,9 +438,10 @@ function ADD_MENU($MODE, $act, $wht) { } } // This patched function will reduce many SELECT queries for the specified or current admin login -function IS_ADMIN($admin="") -{ - global $cacheArray, $_CONFIG; +function IS_ADMIN ($admin="") { + global $cacheArray; + + // Init variables $ret = false; $passCookie = ""; $valPass = ""; //* DEBUG: */ echo __LINE__."ADMIN:".$admin."
"; @@ -461,7 +459,7 @@ function IS_ADMIN($admin="") $valPass = $cacheArray['admin_hash']; } elseif ((!empty($passCookie)) && (isset($cacheArray['admins']['password'][$admin])) && (!empty($admin))) { // Count cache hits - if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } + incrementConfigEntry('cache_hits'); // Login data is valid or not? $valPass = generatePassString($cacheArray['admins']['password'][$admin]); @@ -515,11 +513,11 @@ function ADD_MAX_RECEIVE_LIST($MODE, $default="", $return=false) $OUT = ""; while (list($value, $comment) = SQL_FETCHROW($result)) { - $OUT .= "