Changeset 9200 for extensions/ContestResults/admin/manage.php
- Timestamp:
- Feb 13, 2011, 11:12:58 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContestResults/admin/manage.php
r6768 r9200 3 3 4 4 // +-----------------------------------------------------------------------+ 5 // Suppression d'un concours5 // Suppression d'un concours 6 6 // +-----------------------------------------------------------------------+ 7 if (isset($_GET['delete'])){8 pwg_query('DELETE FROM ' . CR_TABLE_1 . ' WHERE id = ' . $_GET['delete '] . ';');9 pwg_query('DELETE FROM ' . CR_TABLE_2 . ' WHERE contest_id = ' . $_GET['delete '] . ';');7 if (isset($_GET['delete_contest'])) { 8 pwg_query('DELETE FROM ' . CR_TABLE_1 . ' WHERE id = ' . $_GET['delete_contest'] . ';'); 9 pwg_query('DELETE FROM ' . CR_TABLE_2 . ' WHERE contest_id = ' . $_GET['delete_contest'] . ';'); 10 10 redirect(CR_ADMIN); 11 11 } 12 12 13 13 // +-----------------------------------------------------------------------+ 14 // Affichage des concours14 // Affichage des concours 15 15 // +-----------------------------------------------------------------------+ 16 foreach (array('pending','finished') AS $status){17 $ query ="SELECT id, name, visible, date_begin, date_end, logo16 foreach (array('pending','finished') AS $status) { 17 $result = pwg_query("SELECT id, name, visible, date_begin, date_end, logo 18 18 FROM " . CR_TABLE_1 . " 19 19 WHERE status = '" . $status . "' 20 ORDER BY date_begin DESC;"; 21 $result = pwg_query($query); 20 ORDER BY date_begin DESC;"); 22 21 23 while ($contest = pwg_db_fetch_assoc($result)){22 while ($contest = pwg_db_fetch_assoc($result)) { 24 23 $template->append('contests_'.$status, array( 25 24 'NAME' => trigger_event('render_CR_content', $contest['name']), … … 28 27 'DATE_END' => format_date($contest['date_end']), 29 28 'LOGO' => $contest['logo'], 30 'U_RESULTS' => CR_ADMIN . '& tab=results&contest_id=' . $contest['id'],31 'U_EDIT' => CR_ADMIN . '& tab=edit&contest_id=' . $contest['id'],32 'U_DELETE' => CR_ADMIN . '& delete=' . $contest['id'],29 'U_RESULTS' => CR_ADMIN . '&tab=results&contest_id=' . $contest['id'], 30 'U_EDIT' => CR_ADMIN . '&tab=edit&contest_id=' . $contest['id'], 31 'U_DELETE' => CR_ADMIN . '&delete_contest=' . $contest['id'], 33 32 'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])), 34 33 ));
Note: See TracChangeset
for help on using the changeset viewer.