this is the source code from one of the pages.
<?php require_once('Connections/gidox.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "logout.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "sorry.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
mysql_select_db($database_gidox, $gidox);
$query_news = "SELECT * FROM news ORDER BY `no` ASC";
$news = mysql_query($query_news, $gidox) or die(mysql_error());
$row_news = mysql_fetch_assoc($news);
$totalRows_news = mysql_num_rows($news);
$colname_user = "-1";
if (isset($_SESSION['ID'])) {
$colname_user = (get_magic_quotes_gpc()) ? $_SESSION['ID'] : addslashes($_SESSION['ID']);
}
mysql_select_db($database_gidox, $gidox);
$query_user = sprintf("SELECT * FROM reg WHERE ID = %s", $colname_user);
$user = mysql_query($query_user, $gidox) or die(mysql_error());
$row_user = mysql_fetch_assoc($user);
$totalRows_user = mysql_num_rows($user);
// Trim by length (by FELIXONE.it)
function TrimByLength($str, $len, $word) {
$end = "";
if (strlen($str) > $len) $end = ", ";
$str = substr($str, 0, $len);
if ($word) $str = substr($str,0,strrpos($str," ")+1);
return $str.$end;
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Go-GO Global member downline</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="images/BrightSide1.css" type="text/css" />
<style type="text/css">
<!--
.style3 {color: #CC0000; font-weight: bold; }
.style4 {
color: #000099;
font-style: italic;
}
.style5 {color: #330000}
.style1 { color: #6297BC;
font-weight: bold;
}
-->
</style>
</head>
<body>
<!-- wrap starts here -->
<div id="wrap">
<div id="header">
<h1 id="logo">Gidok<span class="green"> Global</span><span class="gray"> Enterpise</span></h1>
<h2 id="slogan">, giving you a lift.</h2>
<!-- Menu Tabs -->
<ul>
<li><a href="index.html"><span>Home</span></a></li>
<li><a href="admin_area.php"><span>About</span></a></li>
<li><a href="registration.php"><span>Register</span></a></li>
<li><a href="support.php"><span>Support</span></a></li>
<li><a href="contact.php"><span>Contact</span></a></li>
</ul>
</div>
<!-- content-wrap starts here -->
<div id="content-wrap"> <img src="images/headerphoto.jpg" width="820" height="120" alt="headerphoto" class="no-border" />
<div id="sidebar" >
<h1> </h1>
<ul class="sidemenu">
<li><a href="index.html">Home</a></li>
<li><a href="about.php">About us </a></li>
<li><a href="registration.php">Register</a></li>
<li><a href="<?php echo $logoutAction ?>"> Logout</a></li>
<li><a href="services.php">Services</a></li>
</ul>
<h1>Wise Words</h1>
<p>"Men are disturbed, not by the things that happen,
but by their opinion of the things that happen."</p>
<p class="align-right">- Epictetus</p>
</div>
<div id="main">
<h1>Gato <span class="green">Investment <span class="gray">Project</span> </span></h1>
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td colspan="2"><strong>Welcome <span class="style5">
<?php if ($totalRows_user > 0) { // Show if recordset not empty ?>
<?php /*START_PHP_SIRFCIT*/ if ($row_user['ID']=="-1"){ ?>
<?php echo $row_user['firstname']; ?>
<?php } /*END_PHP_SIRFCIT*/ ?>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_user > 0) { // Show if recordset not empty ?>
<?php echo $row_user['surname']; ?>
<?php } // Show if recordset not empty ?></span></strong></td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style4">Below is the status of your downline </div></td>
</tr>
<tr>
<td width="33%"><span class="style3">First Stage </span></td>
<td width="67%"> </td>
</tr>
<tr>
<td><span class="style3">Second Stage </span></td>
<td> </td>
</tr>
<tr>
<td><span class="style3">Third Stage </span></td>
<td> </td>
</tr>
<tr>
<td><span class="style3">Forth Stage </span></td>
<td> </td>
</tr>
<tr>
<td><span class="style3">Fifth Stage </span></td>
<td> </td>
</tr>
<tr>
<td><span class="style3">Sixth Stage </span></td>
<td> </td>
</tr>
<tr>
<td><span class="style3">Seventh Stage </span></td>
<td> </td>
</tr>
</table>
<p><br />
</p>
</div>
<div id="rightbar">
<h1>News</h1>
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td><?php do { ?>
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td valign="top"><p><span class="style1"><?php echo $row_news['subject']; ?></span><br />
<?php echo $row_news['date']; ?><br />
<br />
<?php echo TrimByLength($row_news['news_details'], 100, true); ?></p>
</td>
</tr>
</table>
<?php } while ($row_news = mysql_fetch_assoc($news)); ?></td>
</tr>
</table>
<h1> </h1>
</div>
<!-- content-wrap ends here -->
</div>
<!-- footer starts here -->
<div id="footer">
<div class="footer-left">
<p class="align-left"> © 2008 <strong>Gidok Global Enterprise </strong> |
Design by <a href="
http://www.robertrover.com/">Robert Rover Ent.</a></p>
</div>
</div>
<!-- footer ends here -->
<!-- wrap ends here -->
</div>
</body>
</html>
<?php
mysql_free_result($news);
mysql_free_result($user);
?>
expecting ur reply