Mercurial > hg > fapweb
changeset 113:671330b7f5d1
Add "show_id" to compo entries, to designate the position they were shown at
in the competition.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Oct 2013 12:09:32 +0300 |
parents | 91660a9d50f0 |
children | b5981168ed85 |
files | admajax.php createdb.php |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.php Tue Oct 22 12:08:27 2013 +0300 +++ b/admajax.php Tue Oct 22 12:09:32 2013 +0300 @@ -142,8 +142,8 @@ " <th colspan=\"5\">#".$id." - ".chentities($compo["name"])."</th>\n". " </tr>\n". " <tr>\n". - " <th style=\"width:1%;\">Compo</th>\n". - " <th style=\"width:1%;\">#</th>\n". + " <th style=\"width:4%;\">ID#</th>\n". + " <th style=\"width:4%;\">S#</th>\n". " <th>Title</th>\n". " <th>Author(s)</th>\n". " <th>Filename</th>\n". @@ -151,19 +151,19 @@ " </tr>\n"; $prefix = "en"; - $index = 1; foreach ($compo["entries"] as $eid => $entry) { echo " <tr id=\"entry".$eid."\">\n". - " <td>".stGetFormTextInput(5, 5, "compo_id", $eid, "en", $id)."</td>\n". - " <td>".$index."</td>\n". + " <td>".$eid."</td>\n". + " <td>".($entry["show_id"] > 0 ? $entry["show_id"] : "-")."</td>\n". " <td>".stGetFormTextInput(30, 64, "name", $eid, "en", $entry["name"])."</td>\n". " <td>".stGetFormTextInput(30, 64, "author", $eid, "en", $entry["author"])."</td>\n". " <td>".stGetFormTextInput(20, 64, "filename", $eid, "en", $entry["filename"])."</td>\n". " <td>". + stGetFormButtonInput("delete", $eid, $prefix, " Del ", "deleteEntry(".$eid.")"). + stGetFormTextInput(3, 3, "compo_id", $eid, "en", $id). stGetFormButtonInput("update", $eid, $prefix, " Upd ", "updateEntry(".$eid.")"). - stGetFormButtonInput("delete", $eid, $prefix, " Del ", "deleteEntry(".$eid.")"). "</td>\n". " </tr>\n"; $index++; @@ -173,7 +173,7 @@ echo " <tr>\n". " <td></td>\n". - " <td>".$index."</td>\n". + " <td></td>\n". " <td>".stGetFormTextInput(30, 64, "name", $id, "ne", "")."</td>\n". " <td>".stGetFormTextInput(30, 64, "author", $id, "ne", "")."</td>\n". " <td>".stGetFormTextInput(20, 64, "filename", $id, "ne", "")."</td>\n".
--- a/createdb.php Tue Oct 22 12:08:27 2013 +0300 +++ b/createdb.php Tue Oct 22 12:09:32 2013 +0300 @@ -133,7 +133,7 @@ "settings" => "key VARCHAR(32) PRIMARY KEY, vtype INT, vstr VARCHAR(128), vtext TEXT, vint INT, desc VARCHAR(128)", "news" => "id INTEGER PRIMARY KEY AUTOINCREMENT, utime INT, title VARCHAR(128), text VARCHAR(4096), author VARCHAR(64), persist INT DEFAULT 0", "compos" => "id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(128), description VARCHAR(4096), visible INT DEFAULT 0, voting INT DEFAULT 0, showAuthors INT DEFAULT 0", - "entries" => "id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(64), author VARCHAR(64), compo_id INT DEFAULT NULL, filename VARCHAR(256) DEFAULT NULL", + "entries" => "id INTEGER PRIMARY KEY AUTOINCREMENT, show_id INT DEFAULT 0, name VARCHAR(64), author VARCHAR(64), compo_id INT DEFAULT NULL, filename VARCHAR(256) DEFAULT NULL", "attendees" => "id INTEGER PRIMARY KEY AUTOINCREMENT, regtime INT, name VARCHAR(64), groups VARCHAR(64), oneliner VARCHAR(64), email VARCHAR(80), key_id INT DEFAULT NULL",