// Load sub menus
$SUB = '';
while ($content2 = SQL_FETCHARRAY($result_sub)) {
- // Merge both arrays
- $content = merge_array($content, $content2);
-
// Check if current selected menu is matching the loaded one
- if ($current == $content['sub_what']) $content['sub_title'] = '<strong>' . $content['sub_title'] . '</strong>';
-
- // Prepare data for the sub template
- $content = array(
- 'what' => $content['sub_what'],
- 'title' => $content['sub_title']
- );
+ if ($current == $content2['sub_what']) $content2['sub_title'] = '<strong>' . $content2['sub_title'] . '</strong>';
// Load row template
- $SUB .= loadTemplate('sponsor_what', true, $content);
- }
+ $SUB .= loadTemplate('sponsor_what', true, $content2);
+ } // END - while
// Prepare data for the main template
$content['menu'] = $SUB;
// Free memory
SQL_FREERESULT($result_sub);
- }
+ } // END - while
} else {
// No main menus active
$OUT .= loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_MAIN_MENUS_ACTIVE--}');
<table border="0" cellspacing="0" cellpadding="0" class="sponsor_menu">
<tr>
<td class="sponsor_action bottom left right" align="center">
- <strong>$content[title]</strong>
+ <strong>$content[main_title]</strong>
</td>
</tr>
$content[menu]
<tr>
<td class="sponsor_what bottom left right">
- <a class="menu_blur" href="{%url=modules.php?module=sponsor&what=$content[what]%}">
+ <a class="menu_blur" href="{%url=modules.php?module=sponsor&what=$content[sub_what]%}">
<strong><big>·</big></strong>
- $content[title]
+ $content[sub_title]
</a>
</td>
</tr>