Changeset 6782 for extensions/ContestResults/include/cr_page.php
- Timestamp:
- Aug 20, 2010, 12:33:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContestResults/include/cr_page.php
r6768 r6782 12 12 // Infos du concours 13 13 $query = "SELECT * FROM " . CR_TABLE_1 . " WHERE id=" . $page['contest'] . ";"; 14 $contest = pwg_db_fetch_assoc(pwg_query($query)); 14 $results = pwg_query($query); 15 $contest = pwg_db_fetch_assoc($results); 15 16 16 if( $contest['visible'] OR is_admin()){17 if(pwg_db_num_rows($results) AND ($contest['visible'] OR is_admin())){ 17 18 // Paramètres généraux 18 19 $template->assign(array( … … 56 57 WHERE i.id = " . $result['image_id'] . ";"; 57 58 $image = pwg_db_fetch_assoc(pwg_query($query)); 58 59 // Nom de l'image60 if(empty($image['name']))61 $image['name'] = get_name_from_file($image['file']);62 59 63 60 // retrieving category informations … … 76 73 // Template 77 74 if(in_array($result['rank'], array(1,2,3))){ 78 $ array= array(75 $data = array( 79 76 'RANK' => $result ['rank'], 80 77 'AUTHOR' => $result['author'], 81 78 'IMAGE_SRC' => str_replace('thumbnail/'.$conf['prefix_thumbnail'], null, get_thumbnail_url($image)), 82 79 'IMAGE_URL' => $image['url'], 83 'IMAGE_NAME' => $image['name'],80 'IMAGE_NAME' => (empty($image['name'])) ? get_name_from_file($image['file']) : $image['name'], 84 81 'COMMENT' => CR_cut_string(trigger_event('render_CR_content', $result['comment']), 450), 85 82 ); 86 83 }else{ 87 $ array= array(84 $data = array( 88 85 'RANK' => $result ['rank'], 89 86 'AUTHOR' => $result['author'], 90 87 'TN_SRC' => get_thumbnail_url($image), 91 88 'IMAGE_URL' => $image['url'], 92 'IMAGE_NAME' => $image['name'],89 'IMAGE_NAME' => (empty($image['name'])) ? get_name_from_file($image['file']) : $image['name'], 93 90 ); 94 91 } 95 $template->append('RESULTS', $ array);92 $template->append('RESULTS', $data); 96 93 } 97 94 }
Note: See TracChangeset
for help on using the changeset viewer.