- Timestamp:
- Feb 24, 2006, 2:16:30 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/rating.php
r1042 r1056 224 224 get_query_string_diff(array('del')); 225 225 226 $del_param = 'e='.$image[ id].226 $del_param = 'e='.$image['id']. 227 227 '&u='.$row['user_id']. 228 228 '&a='.$row['anonymous_id']; -
trunk/category.php
r1051 r1056 86 86 { 87 87 $nav_url .= 'cat='.$page['cat'].'&'; 88 } 89 90 switch ($page['cat']) 91 { 92 case 'search': 88 89 switch ($page['cat']) 93 90 { 94 $nav_url.= 'search='.$_GET['search'].'&'; 95 break; 91 case 'search': 92 { 93 $nav_url.= 'search='.$_GET['search'].'&'; 94 break; 95 } 96 case 'list': 97 { 98 $nav_url.= 'list='.$_GET['list'].'&'; 99 break; 100 } 96 101 } 97 case 'list': 98 { 99 $nav_url.= 'list='.$_GET['list'].'&'; 100 break; 101 } 102 } 102 } 103 103 104 if ( isset($_GET['calendar']) ) 104 105 { … … 402 403 } 403 404 404 if ($page['cat_nb_images']>0 and 405 if ( ( isset($page['cat_nb_images']) and $page['cat_nb_images']>0 ) 406 and 405 407 ( !isset($page['cat']) 406 408 or ($page['cat'] != 'most_visited' and $page['cat'] != 'best_rated') ) -
trunk/identification.php
r1052 r1056 45 45 if (isset($_POST['login'])) 46 46 { 47 $redirect_to = $_POST['redirect'];47 $redirect_to = isset($_POST['redirect']) ? $_POST['redirect'] : ''; 48 48 $username = mysql_escape_string($_POST['username']); 49 49 // retrieving the encrypted password of the login submitted -
trunk/include/calendar_base.class.php
r1055 r1056 163 163 $url_base, 164 164 $level_items, 165 $requested[$level],165 isset($requested[$level]) ? $requested[$level] : null, 166 166 'cal', 167 167 true, -
trunk/include/calendar_monthly.class.php
r1055 r1056 74 74 $this->build_nav_bar2($view_type, $requested, 1, 'MONTH', $lang['month']); // month 75 75 if (count($requested)>1) 76 $this->build_nav_bar2($view_type, $requested, 2, 'DAYOF WEEK' ); // days76 $this->build_nav_bar2($view_type, $requested, 2, 'DAYOFMONTH' ); // days 77 77 } 78 78 return false; … … 152 152 function build_global_calendar(&$requested) 153 153 { 154 assert( count($requested) == 0 ); 154 155 $query='SELECT DISTINCT(DATE_FORMAT('.$this->date_field.',"%Y%m")) as period, 155 156 COUNT(id) as count'; 156 157 $query.= $this->inner_sql; 157 $query.= $this->get_date_where($requested , 0);158 $query.= $this->get_date_where($requested); 158 159 $query.= ' 159 160 GROUP BY period'; … … 189 190 190 191 $url_base .= '-'; 191 $nav_bar .= $this->get_nav_bar_from_items( $url_base, $year_data['children'], $requested[0], 'calCal', false, $lang['month'] ); 192 $nav_bar .= $this->get_nav_bar_from_items( $url_base, 193 $year_data['children'], null, 'calCal', false, $lang['month'] ); 192 194 193 195 $template->assign_block_vars( 'calendar.calbar', … … 200 202 function build_year_calendar(&$requested) 201 203 { 204 assert( count($requested) == 1 ); 202 205 $query='SELECT DISTINCT(DATE_FORMAT('.$this->date_field.',"%m%d")) as period, 203 206 COUNT(id) as count'; 204 207 $query.= $this->inner_sql; 205 $query.= $this->get_date_where($requested , 1);208 $query.= $this->get_date_where($requested); 206 209 $query.= ' 207 210 GROUP BY period'; … … 243 246 $url_base .= '-'; 244 247 $nav_bar .= $this->get_nav_bar_from_items( $url_base, 245 $month_data['children'], $requested[1], 'calCal', false );248 $month_data['children'], null, 'calCal', false ); 246 249 247 250 $template->assign_block_vars( 'calendar.calbar', -
trunk/include/category_default.inc.php
r1053 r1056 86 86 if (isset($page['cat'])) 87 87 { 88 $url_link.= ' cat='.$page['cat'].'&';88 $url_link.= '&cat='.$page['cat']; 89 89 90 90 if ($page['cat'] == 'search') … … 126 126 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 127 127 } 128 if ( $page['cat'] == 'best_rated')128 if ( isset($page['cat']) ) 129 129 { 130 $name = '('.$row['average_rate'].') '.$name; 131 } 132 else 133 if ($page['cat'] == 'most_visited') 134 { 135 $name = '('.$row['hit'].') '.$name; 136 } 137 138 if ($page['cat'] == 'search') 139 { 140 $name = replace_search($name, $_GET['search']); 130 if ($page['cat'] == 'best_rated') 131 { 132 $name = '('.$row['average_rate'].') '.$name; 133 } 134 elseif ($page['cat'] == 'most_visited') 135 { 136 $name = '('.$row['hit'].') '.$name; 137 } 138 139 if ($page['cat'] == 'search') 140 { 141 $name = replace_search($name, $_GET['search']); 142 } 141 143 } 142 144 -
trunk/include/functions_calendar.inc.php
r1055 r1056 76 76 77 77 $cal_styles = array( 78 // Weekly style78 // Monthly style 79 79 array( 80 80 'link' => 'm', … … 84 84 'view_calendar' => true, 85 85 ), 86 // Monthly style86 // Weekly style 87 87 array( 88 88 'link' => 'w', … … 90 90 'name' => l10n('Weekly'), 91 91 'include' => 'calendar_weekly.class.php', 92 'view_calendar' => false, 92 93 ), 93 94 ); -
trunk/picture.php
r1052 r1056 380 380 } 381 381 382 if ( $page['cat'] == 'search' ) 383 { 384 $url_up.= '&search='.$_GET['search']; 385 } 386 if ( $page['cat'] == 'list' ) 387 { 388 $url_up.= '&list='.$_GET['list']; 382 if ( isset($page['cat']) ) 383 { 384 if ( $page['cat'] == 'search' ) 385 { 386 $url_up.= '&search='.$_GET['search']; 387 } 388 if ( $page['cat'] == 'list' ) 389 { 390 $url_up.= '&list='.$_GET['list']; 391 } 389 392 } 390 393 391 394 $url_admin = 392 395 PHPWG_ROOT_PATH.'admin.php?page=picture_modify' 393 .'&cat_id='. $page['cat']396 .'&cat_id='. ( isset($page['cat']) ? $page['cat'] : '' ) 394 397 .'&image_id='.$_GET['image_id']; 395 398 … … 414 417 $result = pwg_query( $query ); 415 418 } 416 if ( !$_GET['add_fav'] and $page['cat'] == 'fav')419 if ( !$_GET['add_fav'] and isset($page['cat']) and 'fav'==$page['cat'] ) 417 420 { 418 421 if (!isset($page['previous_item']) and !isset($page['next_item'])) … … 538 541 539 542 $title_img = $picture['current']['name']; 540 if (is_numeric( $page['cat'] )) 541 { 542 $title_img = replace_space(get_cat_display_name($page['cat_name'])); 543 } 544 else if ( $page['cat'] == 'search' ) 545 { 546 $title_img = replace_search( $title_img, $_GET['search'] ); 543 if ( isset( $page['cat'] ) ) 544 { 545 if (is_numeric( $page['cat'] )) 546 { 547 $title_img = replace_space(get_cat_display_name($page['cat_name'])); 548 } 549 else if ( $page['cat'] == 'search' ) 550 { 551 $title_img = replace_search( $title_img, $_GET['search'] ); 552 } 547 553 } 548 554 $title_nb = ($page['current_rank'] + 1).'/'.$page['cat_nb_images']; … … 681 687 } 682 688 // button to set the current picture as representative 683 if ('admin' == $user['status'] and is_numeric($page['cat'])) 689 if ('admin' == $user['status'] and 690 isset($page['cat']) and is_numeric($page['cat'])) 684 691 { 685 692 $template->assign_block_vars(
Note: See TracChangeset
for help on using the changeset viewer.