Mercurial > hg > fapweb
comparison ajax.php @ 61:e85ed35585fc
Work on attendee editing, etc.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 05 Oct 2013 12:33:59 +0300 |
parents | e5e38ed4e837 |
children | 230aacc22cb4 |
comparison
equal
deleted
inserted
replaced
60:4e09327ed4d0 | 61:e85ed35585fc |
---|---|
230 " <tr>\n". | 230 " <tr>\n". |
231 " <th class=\"rname\">Name</th>\n". | 231 " <th class=\"rname\">Name</th>\n". |
232 " <th class=\"oneliner\">Oneliner</th>\n". | 232 " <th class=\"oneliner\">Oneliner</th>\n". |
233 " <th class=\"email\">E-mail</th>\n". | 233 " <th class=\"email\">E-mail</th>\n". |
234 " <th>Actions</th>\n". | 234 " <th>Actions</th>\n". |
235 " <th class=\"vkey\">User key</th>\n". | 235 " <th class=\"vkey\">Vote key</th>\n". |
236 " <th class=\"vactive\">Active</th>\n". | 236 " <th class=\"vactive\">Active</th>\n". |
237 " </tr>\n"; | 237 " </tr>\n"; |
238 $row = 0; | 238 $row = 0; |
239 foreach ($res as $item) | 239 foreach ($res as $item) |
240 stPrintAttendee($item, $row++, TRUE); | 240 stPrintAttendee($item, $row++, TRUE); |
241 echo "</table>\n"; | 241 |
242 $prefix = "ne"; | |
243 echo | |
244 "</table>\n". | |
245 "<hr />\n". | |
246 "<table>\n". | |
247 " <tr>\n". | |
248 " <th>Name</th>\n". | |
249 " <th>Groups</th>\n". | |
250 " <th>E-mail</th>\n". | |
251 " <th>Oneliner</th>\n". | |
252 " <th>Actions</th>\n". | |
253 " </tr>\n". | |
254 " <tr>\n". | |
255 " <td>".stGetFormTextInput(20, 64, "name", "x", $prefix, "")."</td>\n". | |
256 " <td>".stGetFormTextInput(20, 64, "groups", "x", $prefix, "")."</td>\n". | |
257 " <td>".stGetFormTextInput(20, 64, "email", "x", $prefix, "")."</td>\n". | |
258 " <td>".stGetFormTextInput(30, 64, "oneliner", "x", $prefix, "")."</td>\n". | |
259 " <td>".stGetFormButtonInput("add", "", $prefix, " Add new ", "addAttendee()")."</td>\n". | |
260 " </tr>\n". | |
261 "</table>\n"; | |
242 } | 262 } |
243 else | 263 else |
244 if ($type == "compos") | 264 if ($type == "compos") |
245 { | 265 { |
246 foreach ($res as $item) | 266 foreach ($res as $item) |
338 else | 358 else |
339 if ($type == "entry" && stChkRequestItem("name") && | 359 if ($type == "entry" && stChkRequestItem("name") && |
340 stChkRequestItem("author") && stChkRequestItem("compo_id")) | 360 stChkRequestItem("author") && stChkRequestItem("compo_id")) |
341 { | 361 { |
342 $sql = stPrepareSQL( | 362 $sql = stPrepareSQL( |
343 "INSERT INTO entries (name,author,compo_id) VALUES (%S,%Q,%D)", | 363 "INSERT INTO entries (name,author,compo_id,filename) VALUES (%S,%S,%D,%S)", |
344 "name", "author", "compo_id", "filename"); | 364 "name", "author", "compo_id", "filename"); |
345 | 365 |
346 execSQLCond($sql, "OK, entry added."); | 366 execSQLCond($sql, "OK, entry added."); |
347 } | 367 } |
348 else | 368 else |