this is the entire code
<?php require_once('file://C:/apache/Apache/htdocs/Connections/main.php'); ?>
<?php require_once('../Connections/main.php'); ?>
<?php
$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 = "login.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
session_start();
$colname_main = "1";
if (isset($SESSION['username'])) {
$colname_main = (get_magic_quotes_gpc() ? $SESSION['username'] : addslashes($_SESSION['username']));
}
mysql_select_db($database_main, $main);
$query_rounddata = "SELECT * FROM game";
$rounddata = mysql_query($query_rounddata, $main) or die(mysql_error());
$row_rounddata = mysql_fetch_assoc($rounddata);
$totalRows_rounddata = mysql_num_rows($rounddata);
mysql_select_db($database_main, $main);
$query_buildings = "SELECT * FROM buildings";
$buildings = mysql_query($query_buildings, $main) or die(mysql_error());
$row_buildings = mysql_fetch_assoc($buildings);
$totalRows_buildings = mysql_num_rows($buildings);
mysql_select_db($database_main, $main);
$query_alliances = "SELECT * FROM alliances";
$alliances = mysql_query($query_alliances, $main) or die(mysql_error());
$row_alliances = mysql_fetch_assoc($alliances);
$totalRows_alliances = mysql_num_rows($alliances);
$colname_existingships = "1";
if (isset($SESSION['ownerid'])) {
$colname_existingships = (get_magic_quotes_gpc()) ? $SESSION['ownerid'] : addslashes($_SESSION['ownerid']);
}
mysql_select_db($database_main, $main);
$query_existingships = sprintf("SELECT * FROM existingships WHERE ownerid = %s", $colname_existingships);
$existingships = mysql_query($query_existingships, $main) or die(mysql_error());
$row_existingships = mysql_fetch_assoc($existingships);
$totalRows_existingships = mysql_num_rows($existingships);
mysql_select_db($database_main, $main);
$query_galaxies = "SELECT * FROM galaxies";
$galaxies = mysql_query($query_galaxies, $main) or die(mysql_error());
$row_galaxies = mysql_fetch_assoc($galaxies);
$totalRows_galaxies = mysql_num_rows($galaxies);
$colname_messages = "1";
if (isset($SESSION['username'])) {
$colname_messages = (get_magic_quotes_gpc()) ? $SESSION['username'] : addslashes($_SESSION['username']);
}
mysql_select_db($database_main, $main);
$query_messages = sprintf("SELECT * FROM messages WHERE recipitentid = %s", $colname_messages);
$messages = mysql_query($query_messages, $main) or die(mysql_error());
$row_messages = mysql_fetch_assoc($messages);
$totalRows_messages = mysql_num_rows($messages);
mysql_select_db($database_main, $main);
$query_news = "SELECT * FROM news";
$news = mysql_query($query_news, $main) or die(mysql_error());
$row_news = mysql_fetch_assoc($news);
$totalRows_news = mysql_num_rows($news);
mysql_select_db($database_main, $main);
$query_ships = "SELECT * FROM ships";
$ships = mysql_query($query_ships, $main) or die(mysql_error());
$row_ships = mysql_fetch_assoc($ships);
$totalRows_ships = mysql_num_rows($ships);
$colname_galaxy1 = "1";
if (isset($GET['1'])) {
$colname_galaxy1 = (get_magic_quotes_gpc()) ? $GET['1'] : addslashes($_GET['1']);
}
mysql_select_db($database_main, $main);
$query_galaxy1 = sprintf("SELECT * FROM userinfo WHERE galaxy = %s", $colname_galaxy1);
$galaxy1 = mysql_query($query_galaxy1, $main) or die(mysql_error());
$row_galaxy1 = mysql_fetch_assoc($galaxy1);
$totalRows_galaxy1 = mysql_num_rows($galaxy1);
$colname_galaxy2 = "1";
if (isset($SESSION['2'])) {
$colname_galaxy2 = (get_magic_quotes_gpc()) ? $SESSION['2'] : addslashes($_SESSION['2']);
}
mysql_select_db($database_main, $main);
$query_galaxy2 = sprintf("SELECT * FROM userinfo WHERE galaxy = %s", $colname_galaxy2);
$galaxy2 = mysql_query($query_galaxy2, $main) or die(mysql_error());
$row_galaxy2 = mysql_fetch_assoc($galaxy2);
$totalRows_galaxy2 = mysql_num_rows($galaxy2);
mysql_select_db($database_main, $main);
$query_galaxy3 = "SELECT * FROM galaxies WHERE Id = 1";
$galaxy3 = mysql_query($query_galaxy3, $main) or die(mysql_error());
$row_galaxy3 = mysql_fetch_assoc($galaxy3);
$totalRows_galaxy3 = mysql_num_rows($galaxy3);
mysql_select_db($database_main, $main);
$query_galaxy4 = "SELECT * FROM galaxies WHERE Id = 4";
$galaxy4 = mysql_query($query_galaxy4, $main) or die(mysql_error());
$row_galaxy4 = mysql_fetch_assoc($galaxy4);
$totalRows_galaxy4 = mysql_num_rows($galaxy4);
$colname_main = "1";
if (isset($SESSION['username'])) {
$colname_main = (get_magic_quotes_gpc()) ? $SESSION['username'] : addslashes($_SESSION['username']);
}
mysql_select_db($database_main, $main);
$query_main = sprintf("SELECT * FROM userinfo WHERE username = '%s'", $colname_main);
$main = mysql_query($query_main, $main) or die(mysql_error());
$row_main = mysql_fetch_assoc($main);
$totalRows_main = mysql_num_rows($main);
$colname_main = "1";
if (isset($SESSION['username'])) {
$colname_main = (get_magic_quotes_gpc()) ? $SESSION['username'] : addslashes($_SESSION['username']);
}
mysql_select_db($database_main, $main);
$query_main = sprintf("SELECT * FROM userinfo WHERE username = '%s'", $colname_main);
$main = mysql_query($query_main, $main) or die(mysql_error();
$row_main = mysql_fetch_assoc($main);
$totalRows_main = mysql_num_rows($main);
$colname_main = "1";
if (isset($SESSION['username'])) {
$colname_main = (get_magic_quotes_gpc()) ? $SESSION['username'] : addslashes($_SESSION['username']);
}
mysql_select_db($database_main, $main);
$query_main = "SELECT * FROM userinfo WHERE username = '".$colname_main."'";
$main = mysql_query($query_main, $main) or die(mysql_error();
$row_main = mysql_fetch_assoc($main);
$totalRows_main = mysql_num_rows($main);
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<style type="text/css">
<!--
body,td,th {
color: #999999;
}
a:link {
color: #999999;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><table width="770" height="99" border="2" cellpadding="0" cellspacing="0">
<tr>
<th width="182" height="21" scope="col">Credits:<?php echo $row_user['credits']; ?></th>
<th scope="col">Plutonium:<?php echo $row_user['plutonium']; ?></th>
<th scope="col">Metal:<?php echo $row_main['metal']; ?></th>
<th scope="col">Power:<?php echo $row_main['power']; ?></th>
<th scope="col">Networth:<?php echo $row_main['networth']; ?></th>
</tr>
<tr>
<th valign="top" bgcolor="#CCCCCC" scope="row">General</th>
<td width="451" colspan="3" rowspan="20" valign="top"><!-- TemplateBeginEditable name="EditRegion3" -->EditRegion3
<!-- TemplateEndEditable --></td>
<td width="127" rowspan="19" align="left" valign="top"><p>Your Empire is:<?php echo $row_main['username']; ?></p>
<p>You Userid is:<?php echo $row_main['userid']; ?></p>
<p>Your Galaxy is:<?php echo $row_main['galaxy']; ?></p>
<p>Your Land is: <?php echo $row_main['land']; ?></p>
<p>Your Asteroids are:<?php echo $row_main['roids']; ?> </p>
<p> </p></td>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>
</tr>
<tr>
<th valign="top" scope="row"> </th>