Permalink
Browse files

Stop-gap until events / title list editor is done. Only one event at …

…a time
  • Loading branch information...
1 parent 7a7f122 commit a97d8de1cc136c06eb3e65deb69e205ff96ee0d8 @hamilr2 hamilr2 committed Oct 19, 2012
Showing with 29 additions and 10 deletions.
  1. +8 −1 im_title_list.php
  2. +20 −8 im_ui.php
  3. +1 −1 index.php
View
@@ -15,12 +15,19 @@
echo("<li type=\"billboard\" id=\"" . $row["id"] . "\"><img src=\"billboards\\" . $row["file_name"] . "\" width=\"40\" />" . $row["title"] . "</li>\n");
}*/
}
-else if(!$team && $event)
+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
{
View
@@ -16,10 +16,12 @@
<h2>Select an event</h2>
<ul>
<?
- $result = dbquery("SELECT * FROM events");
- while($row = mysql_fetch_array($result)) {
+ /*$result = dbquery("SELECT * FROM events");
+ while($row = mysql_fetch_array($result))
+ {
echo('<li><a href="im_ui.php?eventId=' . $row["id"] . '">'.$row["name"].' (' . $row["team1"] . ' vs. ' . $row["team2"] . ')</a></li>');
- }
+ }*/
+ echo('<li><a href="im_ui.php?eventId=-1">No Events, click this for now</a></li>')
?>
</ul>
</div>
@@ -28,12 +30,22 @@
else
{
-$result = dbquery("SELECT * FROM events WHERE events.id = $eventId");
-$row = mysql_fetch_array($result);
+if ($eventId > 0)
+{
+ $result = dbquery("SELECT * FROM events WHERE events.id = $eventId");
+ $row = mysql_fetch_array($result);
-$eventName = $row["name"];
-$team1 = $row["team1"];
-$team2 = $row["team2"];
+ $eventName = $row["name"];
+ $team1 = $row["team1"];
+ $team2 = $row["team2"];
+}
+else
+{
+ $eventName = "Football"; // EDIT THIS LINE
+ $team1 = "rpif";
+ $team2 = "hobartf";
+}
+
?>
View
@@ -14,7 +14,7 @@
<h1>RPI TV Hockey Title Management System</h1>
<h2>List of Current Pages</h2>
<ul>
- <li><a href="im_ui.php">Titles UI (ImageMagick based)</a> - Send titles to keyer, edit general titles. Optimized for 1680x1050 full screen</li>
+ <li><a href="im_ui.php?eventId=-1">Titles UI (ImageMagick based)</a> - Send titles to keyer, edit general titles. Optimized for 1680x1050 full screen</li>
<li><a href="genall.php">Player Title Generator</a> - Generate the player titles for an entire team (or two), clear the cache</li>
<li><a href="peditor.php">Player/Roster Editor</a> - Edit individual players' details and stats, control which players are on which teams</li>
<li><a href="teamedit.php">Teams List Editor</a> - Edit the details (colors, logos) associated with each team, update stats from CHN</li>

0 comments on commit a97d8de

Please sign in to comment.