-
Notifications
You must be signed in to change notification settings - Fork 6
/
generate.php
29 lines (25 loc) · 1.49 KB
/
generate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<? if (isset($_POST["submit"]) && isset($_POST["numcard"]) && ($_POST["numcard"]>1) && ($_POST["numcard"]<$MAX_LIMIT)) {
restart(); //clears winners and draws
@unlink("sets/set.".$setid.".dat");
generate_cards($_POST["numcard"], isset($_POST["freesquare"])?$_POST["freesquare"]:2);
echo '<p><img src="images/gc.gif"><br><br><font size="4"><b>'.$_POST["numcard"]. ' cards generated!</b></font></p>';
} else {
?>
<p><img src="images/gc.gif"><br><br>(Set ID: <? echo $setid; ?>) <a href="javascript:explain('Set ID')">help?</a></p>
<form action="index.php?action=generate" method="post">
Enter the number of Bingo cards desired (between 1 and <? echo $MAX_LIMIT; ?>):
<input type="text" name="numcard" maxlength="5" size="4" onkeypress="return entsub(this.form)"><br>
<br>
Free Squares Mode: <a href="javascript:explain('Free Squares')">help?</a><br>
<table border="1"><tr><td>
<input type="radio" name="freesquare" value="0"> No "Free" Squares
<br>
<input type="radio" name="freesquare" value="1" checked> "Free" Squares in the center of every card
<br>
<input type="radio" name="freesquare" value="2"> "Free" Squares randomly placed on every card
</td></tr></table>
<br><input type="submit" value="Generate!" name="submit">
</form>
<?
}
?>