Changeset 9572 for extensions/ContestResults/include/cr_page.php
- Timestamp:
- Mar 8, 2011, 1:19:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContestResults/include/cr_page.php
r9200 r9572 15 15 if (pwg_db_num_rows($contest)) { 16 16 $contest = pwg_db_fetch_assoc($contest); 17 $contest['finished'] = is_date_passed($contest['date_end']); 17 18 18 19 // Concours non-publique … … 25 26 'ID' => $contest['id'], 26 27 'NAME' => trigger_event('render_CR_content', $contest['name']), 27 'STATUS' => $contest['status'],28 28 'VISIBLE' => $contest['visible'], 29 'FINISHED' => $contest['finished'], 29 30 'DATE_BEGIN' => format_date($contest['date_begin']), 30 31 'DATE_END' => format_date($contest['date_end']), … … 32 33 'BANNER' => $contest['banner'], 33 34 'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])), 35 'DAYS' => DateDiff($contest['date_end'], date('Y-m-d')), 34 36 )); 35 37 36 38 // Les quatre zones texte 37 foreach (array('presentation','rules','prices','final') AS $key) { 38 $template->assign(strtoupper($key), trigger_event('render_CR_content', $contest[$key])); 39 if (!empty($contest['description'])) { 40 $contest['description'] = unserialize(base64_decode($contest['description'])); 41 foreach ($contest['description'] as $desc) { 42 $template->append('description', array( 43 'NAME' => trigger_event('render_CR_content', stripslashes($desc['name'])), 44 'CONTENT' => trigger_event('render_CR_content', stripslashes($desc['content'])), 45 )); 46 } 39 47 } 40 48 41 49 // Affichage des résultats 42 if ($contest[' status'] == 'finished') {50 if ($contest['finished'] == true) { 43 51 // Infos des résultats 44 52 $results = pwg_query("SELECT * FROM " . CR_TABLE_2 . " WHERE contest_id=" . $contest['id'] . " ORDER BY rank ASC;");
Note: See TracChangeset
for help on using the changeset viewer.