Ignore:
Timestamp:
Mar 17, 2011, 8:25:13 PM (13 years ago)
Author:
mistic100
Message:

[extensions] Contest Results

  • New bloc for PWG Stuffs
  • Use new admin links and javascript implementation
  • Distinguish pending and running contests (both pending before)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContestResults/include/cr_main.php

    r9572 r9745  
    1717
    1818while ($contest = pwg_db_fetch_assoc($contests)) {
     19        $contest = array_merge($contest, get_contest_status($contest['date_begin'],$contest['date_end']));
     20               
    1921        if ($contest['visible'] OR is_admin()) {
    20                 $contest['finished'] = is_date_passed($contest['date_end']);
    21                
    2222                // infos sur le concours
    2323                $item =  array(
     
    2525                        'NAME' => trigger_event('render_CR_content', $contest['name']),
    2626                        'VISIBLE' => $contest['visible'],
    27                         'FINISHED' => $contest['finished'],
     27                        'STATUS' => $contest['status'],
    2828                        'DATE_END' => format_date($contest['date_end']),
    2929                        'DATE_BEGIN' => format_date($contest['date_begin']),
    3030                        'LOGO' => $contest['logo'],
    31                         'SUMMARY' => CR_cut_string(trigger_event('render_CR_content', $contest['summary']), 350),
     31                        'SUMMARY' => CR_cut_string(trigger_event('render_CR_content', $contest['summary']), $conf['ContestResults']['truncate_summary']),
    3232                        'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])),
    33                         'DAYS' => DateDiff($contest['date_end'], date('Y-m-d')),
     33                        'DAYS' => $contest['days'],
    3434                );
    3535               
    3636                // podium si terminé
    37                 if ($contest['finished'] == true) {
     37                if ($contest['status'] == 'finished') {
    3838                        $results = pwg_query("SELECT
    3939                                        i.id,
Note: See TracChangeset for help on using the changeset viewer.