comparison admajax.php @ 116:a95facb41c86

Some preliminary work on the votekey administration backend.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 22 Oct 2013 12:41:30 +0300
parents 671330b7f5d1
children 5837b9333964
comparison
equal deleted inserted replaced
115:87d3ce535834 116:a95facb41c86
84 case "attendees": 84 case "attendees":
85 $sql = "SELECT * FROM attendees ORDER BY regtime DESC"; 85 $sql = "SELECT * FROM attendees ORDER BY regtime DESC";
86 break; 86 break;
87 87
88 case "voters": 88 case "voters":
89 $sqlJoins = "";
90 switch (stGetSetting("voteKeyMode"))
91 {
92 case VOTE_FREELY:
93 break;
94
95 case VOTE_ACTIVATE:
96 break;
97
98 case VOTE_ASSIGN:
99 $sqlJoins = "LEFT JOIN attendees ON votekeys.voter_id=attendees.id ";
100 break;
101 }
102 $sql = "SELECT * FROM votekeys ".$sqlJoins."ORDER BY votekeys.id ASC";
89 break; 103 break;
90 104
91 case "compos": 105 case "compos":
92 $sql = "SELECT * FROM compos ORDER BY id DESC"; 106 $sql = "SELECT * FROM compos ORDER BY id DESC";
93 break; 107 break;
242 " <td>".stGetFormButtonInput("add", "", $prefix, " Add new ", "addAttendee()")."</td>\n". 256 " <td>".stGetFormButtonInput("add", "", $prefix, " Add new ", "addAttendee()")."</td>\n".
243 " </tr>\n". 257 " </tr>\n".
244 "</table>\n"; 258 "</table>\n";
245 } 259 }
246 else 260 else
261 if ($type == "voters")
262 {
263 switch (stGetSetting("voteKeyMode"))
264 {
265 case VOTE_FREELY:
266 break;
267
268 case VOTE_ACTIVATE:
269 break;
270
271 case VOTE_ASSIGN:
272 break;
273 }
274 // List of votekeys
275 echo
276 "<table class=\"attendees\">\n".
277 " <tr>\n".
278 " <th class=\"name\">Name</th>\n".
279 " <th class=\"groups\">Groups</th>\n".
280 " <th class=\"email\">E-mail</th>\n".
281 " <th class=\"\">Key</th>\n".
282 " </tr>\n";
283 $row = 0;
284
285 echo
286 "</table>\n";
287 }
288 else
247 if ($type == "compos") 289 if ($type == "compos")
248 { 290 {
249 foreach ($res as $item) 291 foreach ($res as $item)
250 { 292 {
251 $id = $item["id"]; 293 $id = $item["id"];