Mercurial > hg > fapweb
comparison admajax.php @ 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 | a95facb41c86 |
comparison
equal
deleted
inserted
replaced
112:91660a9d50f0 | 113:671330b7f5d1 |
---|---|
140 " <table class=\"misc\">\n". | 140 " <table class=\"misc\">\n". |
141 " <tr>\n". | 141 " <tr>\n". |
142 " <th colspan=\"5\">#".$id." - ".chentities($compo["name"])."</th>\n". | 142 " <th colspan=\"5\">#".$id." - ".chentities($compo["name"])."</th>\n". |
143 " </tr>\n". | 143 " </tr>\n". |
144 " <tr>\n". | 144 " <tr>\n". |
145 " <th style=\"width:1%;\">Compo</th>\n". | 145 " <th style=\"width:4%;\">ID#</th>\n". |
146 " <th style=\"width:1%;\">#</th>\n". | 146 " <th style=\"width:4%;\">S#</th>\n". |
147 " <th>Title</th>\n". | 147 " <th>Title</th>\n". |
148 " <th>Author(s)</th>\n". | 148 " <th>Author(s)</th>\n". |
149 " <th>Filename</th>\n". | 149 " <th>Filename</th>\n". |
150 " <th>Actions</th>\n". | 150 " <th>Actions</th>\n". |
151 " </tr>\n"; | 151 " </tr>\n"; |
152 | 152 |
153 $prefix = "en"; | 153 $prefix = "en"; |
154 $index = 1; | |
155 foreach ($compo["entries"] as $eid => $entry) | 154 foreach ($compo["entries"] as $eid => $entry) |
156 { | 155 { |
157 echo | 156 echo |
158 " <tr id=\"entry".$eid."\">\n". | 157 " <tr id=\"entry".$eid."\">\n". |
159 " <td>".stGetFormTextInput(5, 5, "compo_id", $eid, "en", $id)."</td>\n". | 158 " <td>".$eid."</td>\n". |
160 " <td>".$index."</td>\n". | 159 " <td>".($entry["show_id"] > 0 ? $entry["show_id"] : "-")."</td>\n". |
161 " <td>".stGetFormTextInput(30, 64, "name", $eid, "en", $entry["name"])."</td>\n". | 160 " <td>".stGetFormTextInput(30, 64, "name", $eid, "en", $entry["name"])."</td>\n". |
162 " <td>".stGetFormTextInput(30, 64, "author", $eid, "en", $entry["author"])."</td>\n". | 161 " <td>".stGetFormTextInput(30, 64, "author", $eid, "en", $entry["author"])."</td>\n". |
163 " <td>".stGetFormTextInput(20, 64, "filename", $eid, "en", $entry["filename"])."</td>\n". | 162 " <td>".stGetFormTextInput(20, 64, "filename", $eid, "en", $entry["filename"])."</td>\n". |
164 " <td>". | 163 " <td>". |
164 stGetFormButtonInput("delete", $eid, $prefix, " Del ", "deleteEntry(".$eid.")"). | |
165 stGetFormTextInput(3, 3, "compo_id", $eid, "en", $id). | |
165 stGetFormButtonInput("update", $eid, $prefix, " Upd ", "updateEntry(".$eid.")"). | 166 stGetFormButtonInput("update", $eid, $prefix, " Upd ", "updateEntry(".$eid.")"). |
166 stGetFormButtonInput("delete", $eid, $prefix, " Del ", "deleteEntry(".$eid.")"). | |
167 "</td>\n". | 167 "</td>\n". |
168 " </tr>\n"; | 168 " </tr>\n"; |
169 $index++; | 169 $index++; |
170 } | 170 } |
171 | 171 |
172 $prefix = "ne"; | 172 $prefix = "ne"; |
173 echo | 173 echo |
174 " <tr>\n". | 174 " <tr>\n". |
175 " <td></td>\n". | 175 " <td></td>\n". |
176 " <td>".$index."</td>\n". | 176 " <td></td>\n". |
177 " <td>".stGetFormTextInput(30, 64, "name", $id, "ne", "")."</td>\n". | 177 " <td>".stGetFormTextInput(30, 64, "name", $id, "ne", "")."</td>\n". |
178 " <td>".stGetFormTextInput(30, 64, "author", $id, "ne", "")."</td>\n". | 178 " <td>".stGetFormTextInput(30, 64, "author", $id, "ne", "")."</td>\n". |
179 " <td>".stGetFormTextInput(20, 64, "filename", $id, "ne", "")."</td>\n". | 179 " <td>".stGetFormTextInput(20, 64, "filename", $id, "ne", "")."</td>\n". |
180 " <td>".stGetFormButtonInput("add", $id, $prefix, " Add new ", "addEntry(".$id.")")."</td>\n". | 180 " <td>".stGetFormButtonInput("add", $id, $prefix, " Add new ", "addEntry(".$id.")")."</td>\n". |
181 " </tr>\n". | 181 " </tr>\n". |