Location: PHPKode > projects > php Strategy Game Engine X > phpsgex/adm/xconfig.php
<?php
if( isset($secure) ){
	$cinf= mysql_fetch_array( mysql_query("SELECT * FROM conf LIMIT 1") );
	
	$body.= "<script src='../templates/js/nicEdit2.js' type='text/javascript'></script>
<script type='text/javascript'>bkLib.onDomLoaded(nicEditors.allTextAreas);</script>";
	$body.="<form method='post' action='?pg=xconfig'>
	<textarea name='freeRTE_content' id='textarea' cols='45' rows='5'>".$cinf['news1']."</textarea>
	<br><br>
	Server name: <input name='servernam' type='text' value='".$config['server_name']."'> <br>
	Sub desc: <input name='subdesc' type='text' value='".$config['server_desc_sub']."'> <br>
	Main desc: <input name='maindesc' type='text' value='".$config['server_desc_main']."'> <br>
	Template: <select name='templ'>";
		
	$dir= '../templates';
    $handle= opendir($dir);
    // Lettura...
    while( $files= readdir($handle) ) {
    	// Escludo gli elementi '.' e '..' e stampo il nome del file...
    	if ($files != '.' && $files != '..' && $files != 'js' ){  
			$body.= '<option>'.$files.'</option>';
        }
    }
		
	$body.="</select><br>
	
	Show resource even if you don't have: <input type='checkbox' name='FLAG_SZERORES' ";
	if( $config['FLAG_SZERORES'] ) $body.="checked='checked'";
	$body.= "> <br>
	Show units, buildings and researches even if you cannot build: <input type='checkbox' name='FLAG_SUNAVALB' ";
	if( $config['FLAG_SUNAVALB'] ) $body.="checked='checked'";
	$body.="> <br>
	Show resource icon: <input type='checkbox' name='FLAG_RESICONS' ";
	if( $config['FLAG_RESICONS'] ) $body.="checked='checked'";
	$body.="> <br>
	Show resource label: <input type='checkbox' name='FLAG_RESLABEL' ";
	if( $config['FLAG_RESLABEL'] ) $body.="checked='checked'";
	$body.="> <br>
	<br>
	<h2>RATES</h2>
	Magazine base capacity: <input type='number' name='MG_max_cap' value='".$config['MG_max_cap']."'> <br>
	Barrack time dividier per level: <input type='text' name='baru_tmdl' value='".$config['baru_tmdl']."'> <br>
	Build fast moltiplier: <input type='text' name='buildfast_molt' value='".$config['buildfast_molt']."'> <br>
	Research fast moltiplier: <input type='text' name='researchfast_molt' value='".$config['researchfast_molt']."'> <br>
	
	<br><input type='submit' name='editconfig' value='save'></form>";	
}
?>
Return current item: php Strategy Game Engine X