Location: PHPKode > scripts > Bingoware > bingoware/configure.php
	   <body onLoad="document.configForm.setidform.focus()">
	   <? if ($submit) {
	   		
				function stripit(&$a) {
				        $a=stripslashes($a);
				}
				
				if (get_magic_quotes_gpc())
				{
				  stripit($setidform);
				  stripit($viewheaderform);
				  stripit($viewfooterform);
				  stripit($printheaderform);
				  stripit($printfooterform);
				}
	   		
	   		
	   		if (@file_exists("settings.php")){
					$filearray=file("settings.php");
					@$fp=fopen("settings.php","w");
	
					while (list ($line_num,$line) = each ($filearray)) {
						//sequence all replacements.
						//There will be only one replacements completed, but
						//ereg_replace will return the original line in any other cases.
						
						
						
						$line = ereg_replace("(setid=').*'","\\1".$setidform."'",$line);
						$line = ereg_replace("(winningpattern=).*;","\\1".$winningpatternform.";",$line);
						$line = ereg_replace("(viewheader=').*;","\\1".$viewheaderform."';",$line);
						$line = ereg_replace("(viewfooter=').*;","\\1".$viewfooterform."';",$line);
						$line = ereg_replace("(printheader=').*;","\\1".$printheaderform."';",$line);
						$line = ereg_replace("(printfooter=').*;","\\1".$printfooterform."';",$line);
						$line = ereg_replace("(drawmode=').*'","\\1".$drawmodeform."'",$line);
						fwrite($fp, trim($line)."\n");
					}
					fclose($fp);
					restart();
					echo '<p><font size="4"><b>Configuration Accepted!</b></font></p>';
				} else {
					echo '<p><font size="4"><b>Configuration not Accepted!</b></font></p>';
				}
	   	
		   	
	   	} else {
	   ?>
	   <p><font size="5"><b>Configuration Screen</b></font></p>
	   <form name="configForm" action="index.php?action=config&pagetitle=<?echo $pagetitle;?>&numberinplay=<?echo $numberinplay;?>" method="post" onSubmit="return ConfigConfirmation()">
	   Enter the Set ID: 
	   &nbsp;&nbsp;&nbsp;<input type="text" name="setidform" value="<? echo $setid; ?>" maxlength="10" size="4" align="right">&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:explain('Set ID')">help?</a><br>
	   <br><table border="1"><tr><td>
		   <table border="0"><tr><td colspan="2">
		   Choose the Winning Pattern: &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:explain('Winning Pattern')">help?</a><br><br></td></tr>
		   <tr><td width="400" colspan="2">
		   	<input type="radio" name="winningpatternform" value="0" <? echo ($winningpattern==0)?"checked":""; ?>>
		   	&nbsp;&nbsp;&nbsp;Normal Bingo (any row, column or diagonal)
		   	
		   </td></tr>
		   <tr><td>
		   	<input type="radio" name="winningpatternform" value="1" <? echo ($winningpattern==1)?"checked":""; ?>>
		   	&nbsp;&nbsp;&nbsp;Full Card
		   </td><td>
			   <a href="interactive.php?cardnumber=1" target=_blank>customize!</a>
	   	</td></tr>
	   	<tr><td>
	   		<input type="radio" name="winningpatternform" value="2" <? echo ($winningpattern==2)?"checked":""; ?>>
	   		&nbsp;&nbsp;&nbsp;Square (Perimeter of the Card)
	   	</td><td>
	   		<a href="interactive.php?cardnumber=2" target=_blank>customize!</a>
	   	</td></tr>
	   	<tr><td>
	   		<input type="radio" name="winningpatternform" value="3" <? echo ($winningpattern==3)?"checked":""; ?>>
	   		&nbsp;&nbsp;&nbsp;Cross-Shaped
		   </td><td>
			   <a href="interactive.php?cardnumber=3" target=_blank>customize!</a>
	   	</td></tr>
	   	<tr><td>
			   <input type="radio" name="winningpatternform" value="4" <? echo ($winningpattern==4)?"checked":""; ?>>
			   &nbsp;&nbsp;&nbsp;T-Shaped
	      </td><td>
			   <a href="interactive.php?cardnumber=4" target=_blank>customize!</a>
	   	</td></tr>
	   	<tr><td>
			   <input type="radio" name="winningpatternform" value="5" <? echo ($winningpattern==5)?"checked":""; ?>>
			   &nbsp;&nbsp;&nbsp;Z-Shaped
		   </td><td>
				<a href="interactive.php?cardnumber=5" target=_blank>customize!</a>
	   	</td></tr>
	   	<tr><td>
	   		<input type="radio" name="winningpatternform" value="6" <? echo ($winningpattern==6)?"checked":""; ?>>
	   		&nbsp;&nbsp;&nbsp;N-Shaped
		   </td><td>
			   <a href="interactive.php?cardnumber=6" target=_blank>customize!</a>
	   	</td></tr>
	   	<tr><td>
			   <input type="radio" name="winningpatternform" value="7" <? echo ($winningpattern==7)?"checked":""; ?>>
			   &nbsp;&nbsp;&nbsp;"+"-Shaped
		   </td><td>
			   <a href="interactive.php?cardnumber=7" target=_blank>customize!</a>
	   	</td></tr>
	   	<tr><td>
	   		<input type="radio" name="winningpatternform" value="8" <? echo ($winningpattern==8)?"checked":""; ?>>
	   		&nbsp;&nbsp;&nbsp;X-Shaped
		   </td><td>
			   <a href="interactive.php?cardnumber=8" target=_blank>customize!</a>
	   	</td></tr>
		   <tr><td >
		   	<input type="radio" name="winningpatternform" value="9" <? echo ($winningpattern==9)?"checked":""; ?>>
		   	&nbsp;&nbsp;&nbsp;Box-Shaped
		   </td><td>
			   <a href="interactive.php?cardnumber=9" target=_blank>customize!</a>
	   	</td></tr>
		   <tr><td >
		   	<input type="radio" name="winningpatternform" value="10" <? echo ($winningpattern==10)?"checked":""; ?>>
		   	&nbsp;&nbsp;&nbsp;User-defined
		   </td><td>
			   <a href="interactive.php?cardnumber=10" target=_blank>customize!</a>
	   	</td></tr>
	   
	   </table>
	   </td></tr></table>
		<br>		
		<br>
		<table border="1" width="30%"><tr><td><table border="0"> 
			<tr>
				<td>Draw Mode: &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:explain('Draw Mode')">help?</a>
				</td>
			</tr><tr>
				<td>Automatic
				</td><td>
					<input type="radio" name="drawmodeform" value="automatic" <? echo ($drawmode=="automatic")?"checked":""; ?>>
				</td>
			</tr><tr>
				<td>Manual
				</td><td>
					<input type="radio" name="drawmodeform" value="manual" <? echo ($drawmode=="manual")?"checked":""; ?>>
				</td>
			</tr></table>
			</tr></table>
		<br>
	   
	   <br>Page Title: <input type="text" name="pagetitle" value="<? echo $pagetitle; ?>" size="55"><br>
	   
	   <br>When viewing one card (HTML codes allowed):&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:explain('Hint')">hint?</a><br><br>
	   Header: <input type="text" name="viewheaderform" value='<? echo $viewheader; ?>' size="55"><br>
	   Footer: <input type="text" name="viewfooterform" value='<? echo $viewfooter; ?>' size="55"><br><br>
	   When printing four card per page (HTML codes allowed):<br><br>
	   Header: <input type="text" name="printheaderform" value='<? echo $printheader; ?>' size="55"><br>
	   Footer: <input type="text" name="printfooterform" value='<? echo $printfooter; ?>' size="55"><br>
		<br>

		
	   &nbsp;&nbsp;&nbsp;<br><input type="submit" value="Change!" name="submit">
	   
	   </form>
	   
	   <?
	}
	?>
	</body>
Return current item: Bingoware