<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
include_once('./admin_header.php');
if (!$_POST['submit'])
{
	// Navigation Links
	$arcade_home = "<a href='./index.php'><font size=+1>Arcade Admin</font></a>";
	echo $arcade_home.'&nbsp;<font size=+1> >> </font>&nbsp;<font size=+1>'._CONFIGURATION.'</font><br><br>';
    echo "<br>";
?>
<form method="post" action="config.php">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" width="25%"><?php echo _MDA_GAMES_LATEST;?>:</td>
<td valign="top"><input type='text' class='text' name='games_latest' value='<?php echo intval($options['games_latest']); ?>'></td>
</tr>
<tr>
<td valign="top" width="25%"><?php echo _MDA_GAMES_PER_PAGE;?>:</td>
<td valign="top"><input type='text' class='text' name='games_per_page' value='<?php echo intval($options['games_per_page']); ?>'></td>
</tr>
<tr>
<td colspan="2" align="center">
<br>
<input type="hidden" name="mode" value="config">
<input type="submit" class="button" name="submit" value="<?php echo _SAVE;?>">
</td>
</tr>
</form></table>
<?php
} else {
$content  = "<?php\n";
$content .= "\$options['games_latest'] = ".intval($_POST['games_latest']).";\r\n";
$content .= "\$options['games_per_page'] = ".intval($_POST['games_per_page']).";\r\n";
$content .= "?>";
$filename = "../cache/config.php";
if ( $file = fopen($filename, "w") ) {
	fwrite($file, $content);
	fclose($file);
	} else {
		redirect_header("index.php", 1, _NOTUPDATED);
		exit();
	}
redirect_header("index.php", 1, _UPDATED);
exit();
}
CloseTable();
xoops_cp_footer();
exit();
?>
