• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Some php help

Skyline_GTR

New Member
HI, I am using vbportal
I wonder what you need to edit in order only members who have activate their account can have only access to download areas? I don't want member who didn't actvate their account can have access to the area. The usergroupid that I don't want to have access is "3"
here is the code.
PHP:
<?php
// global $nozip;
// $nozip=1;
// ob_start("ob_gzhandler");
// ----------------------------------------------------------------------
// vbPortal a Content Management System for vBulletin
// Copyright (C) 2001 by the phpPortals Development Team.
// [url]http://www.phpportals.com/[/url]
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - [url]http://phpnuke.org/[/url]
/* Copyright (c) 2002 by Francisco Burzi                                */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

require_once("mainfile.php");
$module = 1;
/**********************************/
/* Configuration                  */
/*                                */
/* You can change this:           */
/* $index = 0; (right side off)   */
/**********************************/
if ($noindex == 1) {
	$index = 0;
} else {
	$index = 1;
}
global $DB_site;
if (isset($name)) {
	$result = $DB_site->query("select title, custom_title, active, view from ".$prefix."_modules where title='$name'");
	list($module_title, $custom_title, $mod_active, $view) = $DB_site->fetch_array($result);
	if (($mod_active == 1) OR ($mod_active == 0 AND is_admin($admin))) {
		if (!isset($mop)) { $mop="modload"; }
		if (!isset($file)) { $file="index"; }
		if (ereg("\.\.",$name) || ereg("\.\.",$file)) {
	    	echo "You are so cool...";
		} else {
		    if ($view == 0) {
				$modpath .= "modules/$name/$file.php";
	    		if (file_exists($modpath)) {
					include($modpath);
    			} else {
					die ("Sorry, such file doesn't exist...");
				}
			}
			if ($view == 1 AND is_user($user) || is_admin($admin)) {
				$modpath .= "modules/$name/$file.php";
    			if (file_exists($modpath)) {
					include($modpath);
    			} else {
					die ("Sorry, such file doesn't exist...");
				}
			} elseif ($view == 1 AND !is_user($user) || !is_admin($admin)) {
				global $bbdir, $P_displaythis;
				$module_title = $custom_title;
				eval("\$P_displaythis = \"".gettemplate('P_nopermission')."\";");
				include ("header.php");
				include ("footer.php");
				exit;
			}
			if ($view == 2 AND is_admin($admin)) {
				$modpath .= "modules/$name/$file.php";
    			if (file_exists($modpath)) {
					include($modpath);
    			} else {
					die ("Sorry, such file doesn't exist...");
				}
			} elseif ($view == 2 AND !is_admin($admin)) {
				$pagetitle = "- "._ACCESSDENIED."";
				include("header.php");
				title("$sitename: "._ACCESSDENIED."");
				OpenTable();
				echo "<center><b>"._RESTRICTEDAREA."</b><br><br>"
				.""._MODULESADMINS.""
				.""._GOBACK."";
				CloseTable();
				include("footer.php");
				die();
	    	}
		}
	} else {
		include("header.php");
		OpenTable();
		echo "<center>"._MODULENOTACTIVE."<br><br>"
		.""._GOBACK."</center>";
		CloseTable();
		include("footer.php");
	}
} else {
	die ("Sorry, you can't access this file directly...");
}
?>
Thanks
 
Back
Top