// Get the title from menu
$result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_%s_menu WHERE %s='%s' ".$AND." LIMIT 1",
- array($ACC_LVL, $type, $search), __FILE__, __LINE__);
+ array($ACC_LVL, $type, $search), __FILE__, __LINE__);
// Menu found?
if (SQL_NUMROWS($result) == 1) {
//* DEBUG: */ die("<pre>".print_r($_CONFIG, true)."</pre>");
if (($type == "what") || (($type == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview")))) {
//* DEBUG: */ echo __LINE__."+".$type."+<br />\n";
- $OUT .= "</div>\n";
-
- // Extension removeip activated?
- if ((EXT_IS_ACTIVE("removeip")) && (getConfig('removeip_'.strtolower($ACC_LVL).'_show') == "Y")) {
- // Add anoymity/privacy infos
- $OUT .= REMOVEIP_ADD_INFOS();
- } // END - if
-
- // Add line-break tag
- $OUT .= "<br />\n";
+ // Add closing div and br-tag
+ $OUT .= "</div><br />\n";
$NAV_DEPTH = "0";
- // Handle failed logins here if not in guest
- //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$type},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$ACC_LVL}<br />\n";
- if ((($type == "what") || ($type == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($ACC_LVL != "guest") && ((GET_EXT_VERSION("sql_patches") >= "0.4.7") || (GET_EXT_VERSION("admins") >= "0.7.0"))) {
- // Handle failture
- $OUT .= HANDLE_LOGIN_FAILTURES($ACC_LVL);
- } // END - if
+ // Run the filter chain
+ $ret = RUN_FILTER('post_youhere_line', array('access_level' => $ACC_LVL, 'type' => $type, 'content' => ""));
+ $OUT .= $ret['content'];
} // END - if
}
} // END - if
function GET_ADMIN_ID ($login) {
global $cacheArray, $_CONFIG;
$ret = "-1";
- if (!empty($cacheArray['admins']['aid'][$login])) {
+ if (isset($cacheArray['admins']['aid'][$login])) {
// Check cache
$ret = $cacheArray['admins']['aid'][$login];
{
global $cacheArray, $_CONFIG;
$ret = "-1";
- if (!empty($cacheArray['admins']['password'][$aid])) {
+ if (isset($cacheArray['admins']['password'][$aid])) {
// Check cache
$ret = $cacheArray['admins']['password'][$aid];
function GET_ADMIN_LOGIN ($aid) {
global $cacheArray, $_CONFIG;
$ret = "***";
- if (!empty($cacheArray['admins']['login'][$aid])) {
+ if (isset($cacheArray['admins']['login'][$aid])) {
// Get cache
$ret = $cacheArray['admins']['login'][$aid];
global $cacheArray, $_CONFIG;
$ret = "***";
- if (!empty($cacheArray['admins']['email'][$aid])) {
+ if (isset($cacheArray['admins']['email'][$aid])) {
// Get cache
$ret = $cacheArray['admins']['email'][$aid];
global $cacheArray, $_CONFIG;
$ret = "***";
- if (!empty($cacheArray['admins']['def_acl'][$aid])) {
+ if (isset($cacheArray['admins']['def_acl'][$aid])) {
// Use cache
$ret = $cacheArray['admins']['def_acl'][$aid];
return $wht;
}
-// Checks if the module has a menu
-function MODULE_HAS_MENU ($mod, $forceDb = false) {
- global $cacheArray, $_CONFIG;
-
- // All is false by default
- $ret = false;
- //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):mod={$mod},cache=".GET_EXT_VERSION("cache")."<br />\n";
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
- // Cache version is okay, so let's check the cache!
- if (isset($cacheArray['modules']['has_menu'][$mod])) {
- // Check module cache and count hit
- $ret = ($cacheArray['modules']['has_menu'][$mod] == "Y");
- if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
- } elseif (isset($cacheArray['extensions']['ext_menu'][$mod])) {
- // Check cache and count hit
- $ret = ($cacheArray['extensions']['ext_menu'][$mod] == "Y");
- if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
- } elseif ((IS_ADMIN()) && ($mod == "admin")) {
- // Admin module has always a menu!
- $ret = true;
- }
- } elseif ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ((!EXT_IS_ACTIVE("cache")) || ($forceDb === true))) {
- // Check database for entry
- $result = SQL_QUERY_ESC("SELECT has_menu FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1",
- array($mod), __FILE__, __LINE__);
-
- // Entry found?
- if (SQL_NUMROWS($result) == 1) {
- // Load "has_menu" column
- list($has_menu) = SQL_FETCHROW($result);
-
- // Fake cache... ;-)
- $cacheArray['extensions']['ext_menu'][$mod] = $has_menu;
-
- // Does it have a menu?
- $ret = ($has_menu == "Y");
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result);
- } elseif (GET_EXT_VERSION("sql_patches") == "") {
- // No sql_patches installed, so maybe in admin area?
- $ret = ((IS_ADMIN()) && ($mod == "admin")); // Then there is a menu!
- }
-
- // Return status
- //* DEBUG: */ var_dump($ret);
- return $ret;
-}
-
// Subtract points from database and mediadata cache
function SUB_POINTS ($subject, $uid, $points) {
// Add points to used points