| [ Index ] |
PHP Cross Reference of Nuke-Evolution v2.0.5 |
[Summary view] [Print] [Text view]
1 <?php 2 /*======================================================================= 3 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System 4 =======================================================================*/ 5 6 /************************************************************************/ 7 /* PHP-NUKE: Advanced Content Management System */ 8 /* ============================================ */ 9 /* */ 10 /* Copyright (c) 2002 by Francisco Burzi */ 11 /* http://phpnuke.org */ 12 /* */ 13 /* This program is free software. You can redistribute it and/or modify */ 14 /* it under the terms of the GNU General Public License as published by */ 15 /* the Free Software Foundation; either version 2 of the License. */ 16 /* */ 17 /************************************************************************/ 18 /* Additional security checking code 2003 by chatserv */ 19 /* http://www.nukefixes.com -- http://www.nukeresources.com */ 20 /************************************************************************/ 21 22 /*****[CHANGES]********************************************************** 23 -=[Base]=- 24 Nuke Patched v3.1.0 06/26/2005 25 -=[Mod]=- 26 Lock Modules v1.0.0 08/04/2005 27 ************************************************************************/ 28 29 define('MODULE_FILE', true); 30 31 if (isset($_GET['file']) && $_GET['file'] == 'posting') { 32 define('MEDIUM_SECURITY', true); 33 } 34 35 if (isset($_POST['tos_text']) && isset($_POST['op']) && $_POST['op'] == 'editTOS') { 36 define('MEDIUM_SECURITY', true); 37 } 38 39 require_once(dirname(__FILE__) . '/mainfile.php'); 40 global $name; 41 42 if ($name) { 43 /*****[BEGIN]****************************************** 44 [ Mod: Lock Modules v1.0.0 ] 45 ******************************************************/ 46 global $db, $prefix, $user, $lock_modules; 47 if(($lock_modules && $name != 'Your_Account') && !is_admin() && !is_user() && ($name != 'Profile' && $mode == 'register' && (isset($check_num) || isset($HTTP_POST_VARS['submit'])))) { 48 include(NUKE_MODULES_DIR.'Your_Account/index.php'); 49 } 50 /*****[END]******************************************** 51 [ Mod: Lock Modules v1.0.0 ] 52 ******************************************************/ 53 $module = $db->sql_ufetchrow('SELECT `title`, `active`, `view`, `blocks`, `custom_title`, `groups` FROM `'.$prefix.'_modules` WHERE `title`="'.Fix_Quotes($name).'"'); 54 $module_name = $module['title']; 55 if ($module_name == 'Your_Account' || $module_name == main_module()) { 56 $module['active'] = true; 57 $view = 0; 58 } else { 59 $view = $module['view']; 60 } 61 if ($name == 'Technocrat') { 62 die('Sleep alittle, Drink alot'); 63 } 64 if ($module['active'] || is_mod_admin($module_name)) { 65 if (!isset($file) OR $file != $_REQUEST['file']) $file='index'; 66 if (isset($open)) { 67 if ($open != $_REQUEST['open']) $open = ''; 68 } 69 if ((isset($file) && stristr($file,"..")) || (isset($mop) && stristr($mop,"..")) || (isset($open) && stristr($open,".."))) die('You are so cool...'); 70 $showblocks = $module['blocks']; 71 $module_title = ($module['custom_title'] != '') ? $module['custom_title'] : str_replace('_', ' ', $module_name); 72 $modpath = isset($module['title']) ? NUKE_MODULES_DIR.$module['title']."/$file.php" : NUKE_MODULES_DIR.$name."/$file.php"; 73 $groups = (!empty($module['groups'])) ? $groups = explode('-', $module['groups']) : ''; 74 if(!empty($open)) { 75 $modpath = isset($module['title']) ? NUKE_MODULES_DIR.$module['title']."/$open.php" : NUKE_MODULES_DIR.$name."/$open.php"; 76 } 77 unset($module, $error); 78 if ($view >= 1 && !is_admin()) { 79 //Must Not be a user 80 if ($view == 2 AND is_user()) { 81 $error = _MVIEWANON; 82 //Must Be a user 83 } else if ($view == 3 && !is_user()) { 84 $error = _MODULEUSERS; 85 //Must Be a admin 86 } elseif ($view == 4 && !is_mod_admin($module['title'])) { 87 $error = _MODULESADMINS; 88 //Groups 89 } elseif ($view == 6 && !empty($groups) && is_array($groups)) { 90 $ingroup = false; 91 global $userinfo; 92 foreach ($groups as $group) { 93 if (isset($userinfo['groups'][$group])) { 94 $ingroup = true; 95 } 96 } 97 if (!$ingroup) $error = _MODULESGROUP; 98 } 99 } 100 if(isset($error)) { 101 DisplayError($error); 102 } elseif(file_exists($modpath)) { 103 include($modpath); 104 } else { 105 DisplayError(_MODULEDOESNOTEXIST); 106 } 107 } else { 108 DisplayError(_MODULENOTACTIVE."<br /><br />"._GOBACK); 109 } 110 } else { 111 redirect('index.php'); 112 } 113 114 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jun 6 11:38:01 2007 | Cross-referenced by PHPXref 0.7 |