- FROM "._MYSQL_PREFIX."_guest_menu
- WHERE action='main' AND what != '' AND locked='N'
- ORDER BY sort", __FILE__, __LINE__);
-
- $SW = 2; $OUT = ""; $atitle = "";
- while (list($id, $wht, $wtitle) = SQL_FETCHROW($result))
- {
- $LINK = "<A href=\"".URL."/modules.php?module=admin&what=config_home&sub=target&home=".$wht."\">"._IS_NEW_HOME."</A>";
- if ($wht == $CONFIG['index_home'])
- {
+FROM `{!_MYSQL_PREFIX!}_guest_menu`
+WHERE `action`='main' AND `what` != '' AND `what` IS NOT NULL AND `locked`='N'
+ORDER BY `sort` ASC", __FILE__, __LINE__);
+
+ // Init variables
+ $SW = 2;
+ $OUT = "";
+
+ // Process all entries
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Link for setting 'what' as new "home"
+ $LINK = "<a href=\"{!URL!}/modules.php?module=admin&what=config_home&sub=target&home=".$content['what']."\">{--_IS_NEW_HOME--}</a>";
+
+ // Is this current home?
+ if ($content['what'] == getConfig('index_home')) {