sql_fetchrow($db->sql_query("SELECT active, view, blocks, blocks_c FROM ".$prefix."_modules WHERE title='".addslashes($name)."'")); $mod_active = intval($mod_active); $view = intval($view); $blocks = intval($blocks); $blocks_c = intval($blocks_c); if (($mod_active == 1) || ($mod_active == 0 && is_admin($admin))) { $ThemeSel = get_theme(); if ($view == 0 && file_exists("modules/$name/".$file.".php")) { include("modules/$name/".$file.".php"); } else if (($view == 1 && (is_user($user) && is_group($user, $name)) || is_admin($admin)) && file_exists("modules/$name/".$file.".php")) { include("modules/$name/".$file.".php"); } elseif ($view == 1 && !is_admin($admin)) { $pagetitle = "$defis "._ACCESSDENIED.""; head(); title(""._ACCESSDENIED.""); if (!is_user($user)) $infotext = ""._MODULEUSERS." "; list($gname) = $db->sql_fetchrow($db->sql_query("SELECT name FROM ".$prefix."_modules LEFT JOIN ".$prefix."_groups ON (mod_group=id) WHERE title='$name'")); if ($gname) $infotext .= ""._ADDITIONALYGRP.": $gname"; warning($infotext, "?name=Account&op=newuser", 5, 2); foot(); exit; } else if ($view == 2 && is_admin($admin) && file_exists("modules/$name/".$file.".php")) { include("modules/$name/".$file.".php"); } elseif ($view == 2 && !is_admin($admin)) { $pagetitle = "$defis "._ACCESSDENIED.""; head(); title(""._ACCESSDENIED.""); warning(""._MODULESADMINS."", "", 5, 2); foot(); exit; } else { Header("Location: index.php"); exit; } } else { Header("Location: index.php"); exit; } } else { $home = 1; $name = $StartModule; $ThemeSel = get_theme(); if (file_exists("modules/$name/".$file.".php")) { include("modules/$name/".$file.".php"); } else { head(); warning(""._HOMEPROBLEMUSER."", "", "", 1); foot(); } } ?>