Location: PHPKode > scripts > Top Games Script > upload/index.php
<?php

include 'config.php';
 
$con = mysql_connect($dbserver,$dbuser,$dbpassword);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db($dbname, $con);


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title><?php echo $siteName; ?></title>
</head>
<body>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td width="50%" style="background:url('images/table_bg.gif') repeat-x left top; ">
        <img src="images/spacer.gif" width="1" height="1" /></td>
		<td>
<table width="1000" cellpadding="0" cellspacing="0" border="0" align="center">
	<tr valign="top">
		<td height="510" rowspan="5" width="33">
        <img src="images/left.gif" width="33" height="510" /></td>
		<td width="942" height="46" style="background:url('images/top_bg.gif') repeat-x left top; " colspan="3">
        <font face="Impact" size="6" color="#FFFFFF">
        <img src="images/spacer.gif" width="1" height="1" /> <?php echo $siteName; ?></font></td>
		<td height="510" rowspan="5" width="25">
        <img src="images/right.gif" width="25" height="510" /></td>
	</tr>
	<tr style="background:url('images/top2.gif') repeat-x left; ">
		<td height="39" width="16">
        <img src="images/top1.gif" width="12" height="39" /></td>
		<td align="right" width="900"><a href="index.php">
        <img src="images/img1.gif" border="0" width="26" height="26" /></a><a href="mailto:<?php echo $email ?>" target="_blank"><img src="images/img2.gif" border="0" hspace="3" width="26" height="26" /></a><a href="sitemap.php" target="_blank"><img src="images/img3.gif" border="0" width="26" height="26" /></a></td>
		<td align="right" width="26">
        <img src="images/top3.gif" width="8" height="39" /></td>
	</tr>
	<tr>
		<td height="41" align="center" width="16">&nbsp;</td>
		<td align="left" width="900"><span class="mainminu"><font color="#FFFFFF" face="Verdana" size="2"><b><a href="index.php" class="mainminu">Home</a> | <a href="cat.php?id=1">Multiplayer</a> | <a href="cat.php?id=2">Premium</a> | <a href="cat.php?id=3">Action</a> | <a href="cat.php?id=4">Adventure</a> | <a href="cat.php?id=5">Strategy</a> | <a href="cat.php?id=6">Puzzles</a> | <a href="cat.php?id=7">Fighting</a> | <a href="cat.php?id=8">Driving</a> | <a href="cat.php?id=9">Board</a> | <a href="cat.php?id=10">Education</a> | <a href="cat.php?id=11">Sports</a></b></font></span></td>
		<td align="center" width="26">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="3" valign="top" width="942">
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td height="26"><img src="images/logo.jpg" width="942" height="337" /></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="3" valign="top" bgcolor="#f8f8f7" width="942">
			<table width="942" cellpadding="0" cellspacing="0" border="0" height="721">
				<tr>
					<td height="679" colspan="2" align="center" valign="top">
                    <img src="images/spacer.gif" width="1" height="1" />
					  <img src="images/spacer.gif" width="1" height="1" />
						<table width="100%" cellpadding="0" cellspacing="0" border="0">
		              </table>					
                    <p><img src="images/spacer.gif" width="1" height="1" /></p>
                    
                    <p>
                    <?php include 'ads468x60.php'; ?>
                    <table class="hovertable" width="686" height="600" border="0">
				      <tr>
                      <?php
					    $mygSQL="SELECT * FROM games WHERE myg = 99 ORDER BY RAND() LIMIT 16";
						$counter=0;
					  	$result = mysql_query($mygSQL);

						while($row = mysql_fetch_array($result))
  						{
							$counter = $counter + 1;
							$gameTitle = $row['gamename'];
							if (strlen($gameTitle) > 20)
							{
								$gameTitle = substr($gameTitle,0,17) . "...";
							}
						?>
                        <td  onmouseover="this.style.backgroundColor='#ffffff';" onmouseout="this.style.backgroundColor='#d4e3e5';" onClick="document.location.href='play.php?gid=<?php echo $row['gameid']; ?>';" style="cursor:pointer;" width="170" align="center" valign="top"><p><?php echo $gameTitle; ?></p>
			              <p><a href="play.php?gid=<?php echo $row['gameid']; ?>"><img src="<?php echo $row['thumb']; ?>" width=                           "100" height="100" alt="<?php echo $row['gamename']; ?>" /></a></p></td>
                          <?php
						  	if($counter % 4 == 0 )
							{
								echo "</tr><tr>";
							}
						  }
					  ?>
                        </tr>
				      </table>

                     <table class="hovertable" width="686" height="600" border="0">
				      <tr>
                      <?php
					  	$agSQL="SELECT * FROM games ORDER BY RAND() LIMIT 20";
						$counter2=0;
					  	$result2 = mysql_query($agSQL);

						while($row2 = mysql_fetch_array($result2))
  						{
							$counter2 = $counter2 + 1;
							$gameTitle = $row2['gamename'];
							if (strlen($gameTitle) > 20)
							{
								$gameTitle = substr($gameTitle,0,17) . "...";
							}
						?>
                        <td onmouseover="this.style.backgroundColor='#ffffff';" onmouseout="this.style.backgroundColor='#d4e3e5';" onClick="document.location.href='play.php?gid=<?php echo $row2['gameid']; ?>';" style="cursor:pointer;"  width="170" align="center" valign="top"><p><?php echo $gameTitle; ?></p>
			              <p><a href="play.php?gid=<?php echo $row2['gameid']; ?>"><img src="<?php echo $row2['thumb']; ?>" width=                           "100" height="100" alt="<?php echo $row2['gamename']; ?>" /></a></p></td>
                          <?php
						  	if($counter2 % 4 == 0 )
							{
								echo "</tr><tr>";
							}
						  }
					  ?>
                        </tr>
				      </table>
                    
                     </p></td>
					<td width="202" valign="top" height="679">
						<table width="100%" cellpadding="0" cellspacing="0" border="0" height="422">
							<tr>
								<td width="180" height="610" align="center" valign="top"><p>&nbsp;</p>
							    <p><?php include 'ads160x600.php'; ?></p></td>
							</tr>
							<tr>
								<td height="34" bgcolor="#C0C0C0">
                                <p align="center"><b>
                                <font face="Verdana" size="2">Link Exchange</font></b></td>
							</tr>
							<tr>
								<td height="34"><font face="Verdana" size="2">
                                <a target="_blank" href="http://topgames.ws/">
                                Top Games</a></font></td>
							</tr>
							<tr>
								<td height="34">&nbsp;</td>
							</tr>
						</table>					</td>
					<td width="14" height="679">
                    <img src="images/spacer.gif" width="1" height="1" /></td>
				</tr>
				<tr valign="bottom">
					<td height="42" width="719">
                    <img src="images/left_bottom.gif" width="9" height="10" /></td>
					<td colspan="3" align="right" width="223" height="42">
                    <img src="images/right_bottom.gif" width="9" height="10"/></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="100" colspan="5" align="center" width="1000"><div class="hom6"><span class="mainminu"><font color="#FFFFFF" face="Verdana" size="2"><b><a href="index.php" class="mainminu">Home</a> | <a href="cat.php?id=1">Multiplayer</a> | <a href="cat.php?id=2">Premium</a> | <a href="cat.php?id=3">Action</a> | <a href="cat.php?id=4">Adventure</a> | <a href="cat.php?id=5">Strategy</a> | <a href="cat.php?id=6">Puzzles</a> | <a href="cat.php?id=7">Fighting</a> | <a href="cat.php?id=8">Driving</a> | <a href="cat.php?id=9">Board</a> | <a href="cat.php?id=10">Education</a> | <a href="cat.php?id=11">Sports</a></b></font></span></div><div class="hom7"> 
		  <p>Copyright &copy; 2012 
		    <?php echo $siteName; ?>. All rights reserved<br />
		    Powered By
		    <a target="_blank" href="http://topgames.ws/" style="text-decoration: none">
		      <font color="#FFFFFF">TopGames.ws</font></a>		</p>
		  <p><!-- Histats.com  START  (standard)-->
<script type="text/javascript">document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15.js%27 type=%27text/javascript%27%3E%3C/script%3E"));</script>
<a href="http://www.histats.com" target="_blank" title="best tracker" ><script  type="text/javascript" >
try {Histats.start(1,1964076,4,511,95,18,"00000000");
Histats.track_hits();} catch(err){};
</script></a>
<noscript><a href="http://www.histats.com" target="_blank"><img  src="http://sstatic1.histats.com/0.gif?1964076&101" alt="best tracker" border="0"></a></noscript>
<!-- Histats.com  END  --></p>
		</div></td>
	</tr>
</table>
		</td>
		<td width="50%" style="background:url('images/table_bg.gif') repeat-x left top; ">
        <img src="images/spacer.gif" width="1" height="1" /></td>
	</tr>
</table>
</body>
</html>
<?php 
mysql_close($con);
?>
Return current item: Top Games Script