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

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

mysql_select_db($dbname, $con);

$sqlselect="SELECT * FROM games WHERE gameid=" . $gameID;
$result = mysql_query($sqlselect);

$row = mysql_fetch_array($result);
$gwidth =  $row['width'];
$gheight = $row['height'];

if($gwidth > 700)
{
	$gwidth = $gwidth * 0.75;
	$gheight = $gheight * 0.75;
}

?>
<!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" />
<meta name="description" content="<?php echo $row['description']; ?>" />
<meta name="keywords" content="<?php echo $row['gameKeywords']; ?>" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title><?php echo $row['customTitle']; ?></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="119"><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"><p>&nbsp;</p>
					  <p><font color="red" face="Verdana" size="5"><?php echo $row['customTitle']; ?></font> <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Ftop.multiplayer.games&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=438506602843079" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"></iframe><img src="images/spacer.gif" width="1" height="1" />
				    <img src="images/spacer.gif" width="1" height="1" /><img src="images/spacer.gif" width="1" height="1" /></p>
				    <p><?php include 'ads468x60.php'; ?></p>
				    <table width="600" height="389" border="0">
				      <tr>
				        <td align="center" valign="middle">
                        <embed src="<?php echo $row['embed']; ?>" menu="false" quality="high" width="<?php echo $gwidth; ?>" height="<?php echo $gheight; ?>" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
                        </td>
			          </tr>
				      </table>
				    <p><strong><a href="<?php echo $row['zip_url']; ?>">Download This Game</a></strong></p>
				    <table width="694" height="83" border="0">
				      <tr>
				        <td><p><strong>Description:</strong><br />
				          <?php echo $row['description']; ?>
				          </p>
				          <p><br />
			              <strong>Instructions:</strong><br />
				          <?php echo $row['instructions']; ?><br />
				          <br />
			              <strong>Tags:</strong> <?php echo $row['tags']; ?></p></td>
			          </tr>
				      </table>
				    <p>&nbsp;</p>
				    <table class="hovertable" width="686" height="174" border="0">
				      <tr>
                      <?php
					  	$result2 = mysql_query("SELECT * FROM games WHERE myg = 99 ORDER BY RAND() LIMIT 5");

						while($row2 = mysql_fetch_array($result2))
  						{
							$gameTitle = $row2['gamename'];
							if (strlen($gameTitle) > 17)
							{
								$gameTitle = substr($gameTitle,0,14) . "...";
							}
							?>
  							<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 }
					  ?>
			          </tr>
				      </table>
				    <p>&nbsp;</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><?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