-
Notifications
You must be signed in to change notification settings - Fork 4
/
genall.php
67 lines (60 loc) · 1.9 KB
/
genall.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<style type="text/css">
.title img {
margin-left:-354px;
margin-top:-797px;
margin-right:-310px;
margin-bottom:-35px;
}
.title {
overflow:hidden;
width:1220px;
height:250px;
}
</style>
<?
include_once("include.php");
$cache = $_GET["cache"];
if ($cache)
{
$query = "TRUNCATE TABLE cache";
$result = mysql_query($query) or die("<b>YOU DID SOMETHING WRONG YOU IDIOT</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
}?>
<h3>genall.php</h3>
<form action="genall.php" method="GET">
Clear Cache?<input type="submit" value="Empty" name="cache">
</form>
<form action="genall.php" method="GET">
Team 1: <select name="team1">
<?
$options = '';
$query = "SELECT * from teams";
$result = dbquery($query);
while($row = mysql_fetch_array($result)){
$team = fetchTeam($row['player_abbrev']);
$options .= '<option value="'.$team['player_abbrev']. '">' . $team["sname"] . " " . $team['sport'] . " - " . $team['abbrev'] . "</option>";
}
echo $options;
?>
</select>
Team 2: <select name="team2">
<?
echo $options;
?>
</select>
<input type="submit" name="Submit">
</form>
<?
if ($team1 = $_GET["team1"]){
$result = dbquery("SELECT * from players WHERE team = '$team1' ORDER BY num");
echo("<h3>Team 1: " . $team1 . "</h3>\n");
while($row = mysql_fetch_array($result)){
echo('<div class="title"><a href="im_render_title.php?player=' . $row["id"] . '&bustCache=true"><img src="im_render_title.php?player=' . $row["id"] . '"></a></div>');
}
}
if ($team2 = $_GET["team2"]){
$result = dbquery("SELECT * from players WHERE team = '$team2' ORDER BY num");
echo("<h3>Team 2: " . $team2 . "</h3>\n");
while($row = mysql_fetch_array($result)){
echo('<div class="title"><a href="im_render_title.php?player=' . $row["id"] . '&bustCache=true"><img src="im_render_title.php?player=' . $row["id"] . '"></a></div>');
}
}