Ignore:
Timestamp:
Nov 26, 2009, 12:57:43 AM (14 years ago)
Author:
tiico
Message:

[ConcoursPhoto] Correct some bug, update database and add audit page (Need to be completed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ConcoursPhoto/publish.php

    r3905 r4368  
    1313$concours = new Concours($id_concours);
    1414
     15                $template->assign( 'CONCOURS', array(
     16                                'ID'    => $concours->concours_infos['id'],
     17                                'NAME'  => $concours->concours_infos['name'],
     18                                'DESCR' => $concours->concours_infos['descr'],
     19                                'BEGIN_DATE'    => $concours->concours_infos['begin_date'],
     20                                'END_DATE'      => $concours->concours_infos['end_date'],
     21                                'METHOD'        => l10n("concours_method".$concours->concours_infos['method'])
     22                                ));
     23
     24
    1525$category = $concours->concours_infos['category'];
    1626
    17 $query = 'SELECT DISTINCT(img.id), img.name, img.file, img.path, img.tn_ext,
    18                   ic.category_id, cat.name AS catname, conc.note'
     27$query = 'SELECT DISTINCT(img.id), img.name, img.file, img.path, img.tn_ext,img.author,
     28                  ic.category_id, cat.name AS catname, conc.note, conc.moyenne, conc.nbvotant'
    1929                .' FROM ' . IMAGES_TABLE.' AS img'
    2030                .' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
     
    6070                        'name'  => $row['name'],
    6171                        'file'  => $row['file'],
     72                        'author'        => $row['author'],
    6273                        'rang'  => $rang,
    6374                        'thumb' => get_thumbnail_url($row),
    6475                        'url'   => $url,
    65                         'note'  => ($row['note'] == 0 ? 'N/A' :$row['note'])
     76                        'note'  => ($row['note'] == 0 ? 'N/A' :$row['note']),
     77                        'moyenne'       => ($row['moyenne'] == 0 ? 'N/A' :$row['moyenne']),
     78                        'nbvotant'      => $row['nbvotant'],
     79                        'usernote'      => $concours->get_img_globalnote_user($row['id'])
     80                       
    6681                ));
    6782        $rang ++;
Note: See TracChangeset for help on using the changeset viewer.