Location: PHPKode > projects > php Strategy Game Engine X > phpsgex/templates/sgex/register.php
<?php
if( isset($secure) ){
	$body="<form action='index.php' method='post' name='frmreg' onSubmit='return cfrm();'>
                                               <input type='hidden' name='act' value='register'>
                                                ".$lang['reg_language'].": <select name='lang'>";

                                                $dir = './lang';
                                                  $handle = opendir($dir);
                                                  // Lettura...
                                                while( $files = readdir($handle) ) {
                                                    // Escludo gli elementi '.' e '..' e stampo il nome del file...
                                                    if ($files != '.' && $files != '..'){  
														$body.= '<option ';
														if( LANG==substr($files,0,-4) ) $body.= 'selected';
														$body.= '>'.substr($files,0,-4).'</option>';
													}
                                                }

                                                $body.="</select>
                                                </p>
                                                <p>".$lang['reg_nickname'].": 
                                                  &nbsp; <input type='text' name='rnik' id='rnik'>
                                                  <span class='Stile1'></span></p> ".$lang['reg_password']."
                                                  <input type='password' name='rpass' id='rpass'>
                                                </p>
                                                <p>E-mail: 
                                                 <input type='email' name='email' id='email'>
                                                </p>
                                                <p>".$lang['reg_city'].": 
                                                  <input type='text' name='rcct' id='rcct'>
                                                </p>
                                                <h2 class='news-title'><span class='news-date'></span>".$lang['reg_race']."</h2>
                                                <div class='race-list'>
                                                <br>
												<table width='200' border='1' cellspacing='0' cellpadding='9'>";
                                                
												//mostra razze
												$sris="SELECT * FROM ".TB_PREFIX."races";
												$qris=mysql_query($sris);
	
                                                $i=1;
                                                while ( $riga=mysql_fetch_array($qris) ) {
                                                    if ($i==1){
                                                    $body.= "<tr><td><div align='center'><input name='rac' type='radio' id='r1' value='1' checked></div></td><td><div align='center'> <img src='".IRACE.$riga['img']."'></div></td><td><div align='center'>".$riga['rname']."</div></td><td><div align='center'> ".$riga['rdesc']."</div></td></tr>";
                                                    }
                                                    else {
                                                    	$body.= "<tr><td><div align='center'><input name='rac' type='radio' id='r1' value='".$i."'></div></td><td><div align='center'> <img src='".IRACE.$riga['img']."'></div></td><td><div align='center'>".$riga['rname']."</div></td><td><div align='center'> ".$riga['rdesc']."</div></td></tr>";
                                                    }
                                                    $i = $i + 1;
                                                }
												
												$body.="
                                                </table>
                                                <p>
                                                  <center><input type='submit' name='reg' id='reg' value='".$lang['reg_register']."' /></center>
                                                </p>
												
												</form></div>
   "; 
}
?>
Return current item: php Strategy Game Engine X