Location: PHPKode > projects > Quantum Game Library for PHP > Quantum_Star_SE-2.2.0-RC2/game_vars.php
<?
require("common.inc.php");

print_header("Game Variables");
$rs = "<p><a href=javascript:history.back()>Back</a></b></blockquote>";
echo $rs."<br /><br />";
$link = mysql_connect("$database_host","$database_user","$database_password");
mysql_select_db(__FILE__,__LINE__,$database);

$db_name = $HTTP_GET_VARS['db_name'];

db(__FILE__,__LINE__,"select name,value,descript from ${db_name}_db_vars order by name");

echo "<table border=0 cellspacing=1 width=350>";
$delta=0;

while($var = dbr()) {
	if($var[name] == "admin_var_show" && $var[value]==0){
		echo "Admin has disabled public viewing of game vars";
		$delta=1;
		break;
	}
	$out_text .= "<tr bgcolor=#333333><td width=220>$var[name] = ${var[value]}</td>";
	$out_text .="<tr bgcolor=#555555><td><blockquote>${var[descript]}<br /></td>";
	$out_text .= "<tr bgcolor=#000000><td colspan=2>&nbsp;</td></tr>";
}

if($delta==0){
	echo $out_text;
}

echo "</table>";
print_footer();
?>
Return current item: Quantum Game Library for PHP