} // END - if
// Load SQL data and add the menu to the output stream...
- $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
- array($mode), __FUNCTION__, __LINE__);
+ $result_main = SQL_QUERY_ESC("SELECT `title`, `action` FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
+ array($mode), __FUNCTION__, __LINE__);
//* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$main_action.'/'.$sub_what.':'.getWhat()."*<br />\n";
if (SQL_NUMROWS($result_main) > 0) {
OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$mode."_menu\">");
while ($content = SQL_FETCHARRAY($result_main)) {
//* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$sub_what.':'.getWhat()."*<br />\n";
// Init variables
- $GLOBALS['block_mode'] = false;
+ enableBlockMode(false);
$act = $content['action'];
// Load menu header template
- LOAD_TEMPLATE($mode."_menu_title", false, $content);
+ LOAD_TEMPLATE($mode . '_menu_title', false, $content);
// Sub menu
$result_sub = SQL_QUERY_ESC("SELECT title AS sub_title, what AS sub_what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
}
} else {
// This is a menu block... ;-)
- $GLOBALS['block_mode'] = true;
+ enableBlockMode();
$INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $mode, $content['action']);
if (isFileReadable($INC_BLOCK)) {
// Load include file