Ignore:
Timestamp:
Jan 12, 2014, 12:55:14 AM (10 years ago)
Author:
ddtddt
Message:

[extensions] - see_photos_by_user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/see_photos_by_user/pagespba.php

    r26635 r26643  
    55global $page, $conf, $user, $template;
    66$page['section'] = 'See_photos_by_author';
    7 
    87 
    98//read auteur list
     
    1716
    1817while ($row = pwg_db_fetch_assoc($result))
    19         {
     18 {
    2019  $groups[$row['id']] = $row['username'];
    21         }
    22 
    23     $selected = 0;
     20}
     21  $selected = 0;
    2422        $options[] = l10n('select user');
    2523        $options['a'] = '----------------------';
     
    2725  foreach ($groups as $metalist => $metalist2)
    2826        {
    29     $options[$metalist] = $metalist2;
     27   $options[$metalist] = $metalist2;
    3028        }
    3129  $template->assign(
     
    3735       
    3836if (isset($_POST['submitchoixauteur']))
    39         {
    40                 $forbidden = get_sql_condition_FandF(
    41               array( 'visible_images' => 'id' ),
    42               'AND'
     37 {
     38     $forbidden = get_sql_condition_FandF(
     39     array( 'visible_images' => 'id' ),
     40    'AND'
    4341          );
    4442         
    45 $page['section'] = 'See_photos_by_author';
     43  $page['section'] = 'See_photos_by_author';
    4644
    4745    $query = '
    48 SELECT DISTINCT(id)
     46  SELECT DISTINCT(id)
    4947  FROM '.IMAGES_TABLE.'
    5048  INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
     
    5250    '.$forbidden.'
    5351    '.$conf['order_by'].'
    54 ;';
     52  ;';
    5553
    56     $page = array_merge(
    57       $page,
    58       array(
    59         'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'.l10n('See photos by author').'</a>',
    60         'items' => array_from_query($query, 'id'),
    61         )
    62       );
     54   $page = array_merge(
     55  $page,
     56  array(
     57    'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'.l10n('See photos by author').'</a>',
     58    'items' => array_from_query($query, 'id'),
     59      )
     60     );
    6361         
    6462//read auteur list
    6563$groups = array();
    6664$query = '
    67 select id,username
     65 select id,username
    6866  FROM ' . USERS_TABLE . '
    6967  WHERE id<>2
     
    7573  $groups[$row['id']] = $row['username'];
    7674        }
    77 
    78     $selected = $_POST['metalist'];
     75  $selected = $_POST['metalist'];
    7976
    8077  foreach ($groups as $metalist => $metalist2)
     
    8582    'gestionA',
    8683    array(
    87       'OPTIONS' => $options,
    88       'SELECTED' => $selected
    89       ));
    90          
    91          
    92         }
    93          
    94          
    95          
    96          
    97           $template->assign('SPBA2', 'toto');
     84     'OPTIONS' => $options,
     85     'SELECTED' => $selected
     86     ));
     87 }
     88$template->assign('SPBA2', 'toto');
    9889$template->set_filename('SPBA', realpath(SPBA_PATH.'pagespba.tpl'));
    9990$template->assign_var_from_handle('CONTENT', 'SPBA');
    10091
    101 
    102 
    10392?>
Note: See TracChangeset for help on using the changeset viewer.