Hi, I have the same problem to display results in multiple column too, can someone please review my codes and advice where should I insert the code provided by Jasp182 ? Or, should I place it under the system.class.php?
Thank you so much in advance.
<?php
require_once ('global.php');
$title = $mvscript['site_name'] . ' - Flash Games, Free Online Games';
echo $tpl->pull_template("header");
?>
<table class="content-table" width="100%" cellspacing="1" cellpadding="4">
<tr>
<td class="content-header">Games</td>
</tr>
<tr>
<td>Fun Flash Games - The largest source of great free online games including Adventure Games, Action Games, Sports games, Puzzle Games, Shooting Games, Arcade Games and more. All are free to play online.
</td>
</tr>
</table><br />
<table class="content-table" width="100%" cellspacing="1" cellpadding="4">
<tr>
<td class="content-header">All Games List</td>
</tr>
<tr>
<td><a href="http://www.musicvideofun.com/games_adventure.php">Adventure Flash Games</a>
</td>
</tr>
</table><br />
<table class="content-table" width="100%" cellspacing="1" cellpadding="4">
<tr>
<td class="content-header">Games</td>
</tr>
<tr>
<td><center>
<?php require("flash/system.class.php"); ?>
<?php $sys = new GamesSystem();
if(isset($GET['act']) && isset($GET['id']) && $GET['act'] == 'play'){
$sys->addPlay($GET['id']);
}
$sys->Load(); ?>
<div class="wrapper">
<div class="head">
<div class="top" style="height: auto !important; height: 100%">
<div class="image">
<div align="center"></div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="menu">
<div style="float: left;margin-top: 3px;margin-left: 5px;">
<?php
$plays = $sys->getPlaysToday();
if($plays != ''){
?>
There have been <?php echo $plays; ?> games played today.
<?php
} ?>
</div>
<div style="float:right">
<select name="games" id="games" onchange="switchme()">
<option selected>Select a Game</option>
<option class="headname" value="<?php echo $_SERVER['PHP_SELF']; ?>">Games List</option>
<?php
// makes list of options
echo $sys->makeOptionList();
?>
</select>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
<div class="clear"></div>
<div class="body">
<div class="core">
<?php
if(!isset($_GET['act']) || $_GET['act'] != 'play'){
echo $sys->makeGamesList();
} else {
if(isset($_GET['id'])){
echo $sys->makeGameHtml($_GET['id'], $_GET['cid']);
} else {
echo '<div style="margin: 30px;">
<strong>Error: </strong>Invalid Input<br /><br />
<a href="'.$_SERVER['PHP_SELF'].'">Click here to return Home</a>
</div>';
}
}
?>
<div align="center"></div>
</div>
<div class="right">
<?php
echo $sys->doMostPlayed();
/* for most played, you can also use
echo $sys->doMostPlayed(x);
Where x = the ammount of games you wish to display.
This same methods works for doNewestGames()
Default for these functions is 10
*/
echo $sys->doNewestGames();
?>
</div>
<div class="clear"></div>
</div>
</div>
<!-- Script for select box changes -->
<script type="text/javascript">
<!--<![CDATA[
function switchme(){
if(document.getElementById('games').value != ''){
window.location = document.getElementById('games').value;
}
}
//]]>-->
</script>
</td>
</tr></center>
</table><br />
<?php
echo $tpl->pull_template("footer");
?>