Changeset 605 for trunk/include/functions_category.inc.php
- Timestamp:
- Nov 16, 2004, 12:13:24 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_category.inc.php
r603 r605 67 67 * - equals 'recent_cats' 68 68 * - equals 'calendar' 69 * - equals ' random'69 * - equals 'list' 70 70 * 71 71 * The function fills the global var $page['cat'] and returns nothing … … 100 100 or $cat == 'recent_pics' 101 101 or $cat == 'recent_cats' 102 or $cat == 'calendar' 103 or $cat == 'random' ) 102 or $cat == 'calendar' ) 104 103 { 105 104 $page['cat'] = $cat; … … 108 107 { 109 108 $page['cat'] = $cat; 109 } 110 if ($cat == 'list' 111 and isset($_GET['list']) 112 and preg_match('/^\d+(,\d+)*$/', $_GET['list'])) 113 { 114 $page['cat'] = 'list'; 110 115 } 111 116 } … … 435 440 // - best rated pictures 436 441 // - recent pictures 437 // - random pictures442 // - defined list (used for random) 438 443 // 3. determination of the title of the page 439 444 // 4. creation of the navigation bar … … 468 473 else 469 474 { 470 if ( $page['cat'] == 'search' 471 or $page['cat'] == 'most_visited' 472 or $page['cat'] == 'recent_pics' 473 or $page['cat'] == 'recent_cats' 474 or $page['cat'] == 'best_rated' 475 or $page['cat'] == 'calendar' ) 475 if ($page['cat'] == 'search' 476 or $page['cat'] == 'most_visited' 477 or $page['cat'] == 'recent_pics' 478 or $page['cat'] == 'recent_cats' 479 or $page['cat'] == 'best_rated' 480 or $page['cat'] == 'calendar' 481 or $page['cat'] == 'list') 476 482 { 477 483 // we must not show pictures of a forbidden category … … 789 795 } 790 796 } 791 else if ($page['cat'] == ' random')797 else if ($page['cat'] == 'list') 792 798 { 793 799 $page['title'] = $lang['random_cat']; 794 800 801 $page['where'] = 'WHERE 1=1'; 795 802 if (isset($forbidden)) 796 803 { 797 $page['where'] = 'WHERE '.$forbidden; 798 } 799 else 800 { 801 $page['where'] = 'WHERE 1=1'; 802 } 803 804 $conf['order_by'] = ' ORDER BY RAND()'; 805 806 $page['cat_nb_images'] = $conf['top_number']; 807 $page['nb_image_page'] = $page['cat_nb_images']; 804 $page['where'].= ' AND '.$forbidden; 805 } 806 $page['where'].= ' AND image_id IN ('.$_GET['list'].')'; 807 $page['cat_nb_images'] = count(explode(',', $_GET['list'])); 808 808 } 809 809
Note: See TracChangeset
for help on using the changeset viewer.