sql_query("select main_module from ".$prefix."_main"); list($main_module) = $db->sql_fetchrow($result); /*****************************************************/ /* Remove module from database if does not exist */ /*****************************************************/ $result = $db->sql_query("select title from ".$prefix."_modules"); while (list($title) = $db->sql_fetchrow($result)) { $a = 0; $handle=opendir('modules'); while ($file = readdir($handle)) { if ($file == $title) { $a = 1; } } closedir($handle); if ($a == 0) { $db->sql_query("delete from ".$prefix."_modules where title='$title'"); } } /*****************************************************/ /* Interface with correspondent url's */ /*****************************************************/ $content = ""; $content .=""; $content .= "\n"; //$content .= "·"._HOME."
\n"; $sql = "SELECT mcid, mcname FROM ".$prefix."_modules_categories WHERE visible='1' ORDER BY mcid ASC"; $result2 = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result2)) { $mcid = $row[mcid]; $mcname = $row[mcname]; if (file_exists("images/blocks/modules/".$mcname.".gif")) { $content .="\n"; } else { $content .="\n"; } /*****************************************************/ /* Module - NSN Groups v.1.6.3 START */ /*****************************************************/ $sql = "SELECT title, custom_title, view, groups FROM ".$prefix."_modules WHERE active='1' AND title!='$def_module' AND inmenu='1' AND mcid='$mcid' ORDER BY custom_title ASC"; /*****************************************************/ /* Module - NSN Groups v.1.6.3 END */ /*****************************************************/ $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $m_title = $row[title]; $custom_title = $row[custom_title]; $view = $row[view]; /*****************************************************/ /* Module - NSN Groups v.1.6.3 START */ /*****************************************************/ $groups = $row['groups']; /*****************************************************/ /* Module - NSN Groups v.1.6.3 END */ /*****************************************************/ if ($custom_title != "") { $m_title2 = $custom_title; } $m_title2 = ereg_replace("_", " ", $m_title2); /*****************************************************/ /* Module - NSN Groups v.1.6.3 START */ /*****************************************************/ /*if ($m_title != $main_module) { if ((is_admin($admin) AND $view == 2) OR $view != 2) { $content .= "\n"; }*/ if ($m_title != $main_module) { if ($view == 0) { if (eregi($m_title,$_SERVER['REQUEST_URI'])) { $content .= "\n"; } else { $content .= "\n"; } } elseif ($view == 1 AND is_user($user)) { if (eregi($m_title,$_SERVER['REQUEST_URI'])) { $content .= "\n"; } else { $content .= "\n"; } } elseif ($view == 2 AND is_admin($admin)) { if (eregi($m_title,$_SERVER['REQUEST_URI'])) { $content .= "\n"; } else { $content .= "\n"; } } elseif ($view == 3 AND paid()) { if (eregi($m_title,$_SERVER['REQUEST_URI'])) { $content .= "\n"; } else { $content .= "\n"; } } elseif ($view > 3 AND in_groups($groups)) { if (eregi($m_title,$_SERVER['REQUEST_URI'])) { $content .= "\n"; } else { $content .= "\n"; } } } } } /*****************************************************/ /* Module - NSN Groups v.1.6.3 END */ /*****************************************************/ $content .= "
Main
 "._HOME."
".$mcname."
".$mcname."
 ".boldit($m_title,$m_title2)."
 $m_title2
 $m_title2
 $m_title2
 $m_title2
 $m_title2
 $m_title2
 $m_title2
 $m_title2
 $m_title2
 $m_title2
\n"; $content .= "
".Resources."
\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "
 Future Nuke
 TechGFX
 conrads-berlin

 Computerbroke Online
\n"; /*****************************************************/ /* Dropdown / block style selection menu creation */ /*****************************************************/ if ($dropDown == 0){ $content .= "

"; $admcontent .= "\n"; $admcontent .="\n"; $result = $db->sql_query("select title, custom_title from ".$prefix."_modules where active='1' AND inmenu='0' ORDER BY title ASC"); while(list($mn_title, $custom_title) = $db->sql_fetchrow($result)) { if ($custom_title != "") { $mn_title2 = $custom_title; } $mn_title2 = ereg_replace("_", " ", $mn_title2); if ($mn_title2 != "") { $content .= "\n"; $dummy = 1; } else { $a = 1; } } /*****************************************************/ /* If no invisible modules, display lang variable */ /*****************************************************/ if ($a = 1 AND $dummy != 1) { $content .= "\n"; } $content .= "\n"; $result = $db->sql_query("select title, custom_title from ".$prefix."_modules where active='0' ORDER BY title ASC"); while(list($mn_title, $custom_title) = $db->sql_fetchrow($result)) { if ($custom_title != "") { $mn_title2 = $custom_title; } $mn_title2 = ereg_replace("_", " ", $mn_title2); if ($mn_title2 != "") { $content .= "\n"; $dummy = 1; } else { $a = 1; } } /*****************************************************/ /* If no inactive modules, display lang variable */ /*****************************************************/ if ($a = 1 AND $dummy != 1) { $content .= "\n"; } } $content .= ""; $content .= $admcontent; $content .= "
"._INVISIBLEMODULES."
 $mn_title2
 "._NONE."
"._NOACTIVEMODULES."
 $mn_title2
 "._NONE."
"; /*****************************************************/ /* Search function / feature */ /*****************************************************/ if ($viewSearch == 1){ $content .= ""; $content .= "
"; $content .= "
"; } else { return; } ?>