forked from rpitv/rpits
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathim_title_list.php
48 lines (44 loc) · 2.17 KB
/
im_title_list.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
<?
include("include.php");
$event = $_GET["event"];
$team = $_GET["team"];
$thing = $_GET["thing"];
$result;
if($thing == "billboards")
{
echo("<h1>Not Implemented</h1>");
/*$result = dbquery("SELECT * from billboards");
while ($row = mysql_fetch_array($result)) {
echo("<li type=\"billboard\" id=\"" . $row["id"] . "\"><img src=\"billboards\\" . $row["file_name"] . "\" width=\"40\" />" . $row["title"] . "</li>\n");
}*/
}
else if($event > 0)
{
$result = dbquery("SELECT *, event_title.id as etid, titles.filename as Tfilename, templates.name as template_name, titles.name as title_name, titles.id as title_id FROM event_title LEFT JOIN titles on titles.id = event_title.title JOIN templates ON titles.template = templates.id WHERE event_title.event = $event ORDER BY titles.id ASC");
while ($row = mysql_fetch_array($result)) {
echo("<li type=\"general\" id=\"" . $row["title_id"] . "\"><img src=\"thumbs/" . $row["Tfilename"] . ".png\" path=\"out/" . $row["Tfilename"] . ".png\" height=\"38\" />" . $row["title_name"] . " (". $row["template_name"].")</li>\n");
}
}
else if ($event == -1)
{
$result = dbquery("SELECT *, titles.id as title_id, titles.filename as Tfilename, templates.name as template_name, titles.name as title_name FROM titles JOIN templates ON titles.template = templates.id");
while ($row = mysql_fetch_array($result)) {
echo("<li type=\"general\" id=\"" . $row["title_id"] . "\"><img src=\"thumbs/" . $row["Tfilename"] . ".png\" path=\"out/" . $row["Tfilename"] . ".png\" height=\"38\" />" . $row["title_name"] . " (". $row["template_name"].")</li>\n");
}
}
else
{
//echo("<h1>Not Implemented</h1>");
mysql_select_db("rpihockey");
$result = dbquery("SELECT * from players WHERE team='$team' ORDER BY num ASC");
while ($row = mysql_fetch_array($result))
{
$num = $row["num"];
$first = $row["first"];
$last = $row["last"];
$title_name = "$num - $first $last";
echo("<li type=\"player\" id=\"" . $row["id"] . "\"><img path=\"out/".$num.$first.$last .".png\" src=\"thumbs/".$num.$first.$last .".png\" width=\"40\" />" . $title_name . "</li>\n");
}
mysql_select_db("rpits");
}
?>