Changeset 26643 for extensions/see_photos_by_user/pagespba.php
- Timestamp:
- Jan 12, 2014, 12:55:14 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/see_photos_by_user/pagespba.php
r26635 r26643 5 5 global $page, $conf, $user, $template; 6 6 $page['section'] = 'See_photos_by_author'; 7 8 7 9 8 //read auteur list … … 17 16 18 17 while ($row = pwg_db_fetch_assoc($result)) 19 18 { 20 19 $groups[$row['id']] = $row['username']; 21 } 22 23 $selected = 0; 20 } 21 $selected = 0; 24 22 $options[] = l10n('select user'); 25 23 $options['a'] = '----------------------'; … … 27 25 foreach ($groups as $metalist => $metalist2) 28 26 { 29 27 $options[$metalist] = $metalist2; 30 28 } 31 29 $template->assign( … … 37 35 38 36 if (isset($_POST['submitchoixauteur'])) 39 40 41 42 37 { 38 $forbidden = get_sql_condition_FandF( 39 array( 'visible_images' => 'id' ), 40 'AND' 43 41 ); 44 42 45 $page['section'] = 'See_photos_by_author';43 $page['section'] = 'See_photos_by_author'; 46 44 47 45 $query = ' 48 SELECT DISTINCT(id)46 SELECT DISTINCT(id) 49 47 FROM '.IMAGES_TABLE.' 50 48 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id … … 52 50 '.$forbidden.' 53 51 '.$conf['order_by'].' 54 ;';52 ;'; 55 53 56 57 58 59 60 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 ); 63 61 64 62 //read auteur list 65 63 $groups = array(); 66 64 $query = ' 67 select id,username65 select id,username 68 66 FROM ' . USERS_TABLE . ' 69 67 WHERE id<>2 … … 75 73 $groups[$row['id']] = $row['username']; 76 74 } 77 78 $selected = $_POST['metalist']; 75 $selected = $_POST['metalist']; 79 76 80 77 foreach ($groups as $metalist => $metalist2) … … 85 82 'gestionA', 86 83 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'); 98 89 $template->set_filename('SPBA', realpath(SPBA_PATH.'pagespba.tpl')); 99 90 $template->assign_var_from_handle('CONTENT', 'SPBA'); 100 91 101 102 103 92 ?>
Note: See TracChangeset
for help on using the changeset viewer.