Changeset 1643 for trunk/include/functions_html.inc.php
- Timestamp:
- Dec 8, 2006, 1:12:44 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_html.inc.php
r1641 r1643 482 482 $menu.= '</span>'; 483 483 } 484 $child_date_last = isset($category['date_last']) 485 and $category['max_date_last']>$category['date_last'] ; 484 $child_date_last = @$category['max_date_last']> @$category['date_last']; 486 485 $menu.= get_icon($category['max_date_last'], $child_date_last); 487 486 } … … 610 609 else 611 610 { 612 header('HTTP/1.1 401 Authorization required'); 613 header('Status: 401 Authorization required'); 611 set_status_header(401); 614 612 redirect($login_url); 615 613 } … … 623 621 function page_not_found($msg, $alternate_url=null) 624 622 { 625 header('HTTP/1.1 404 Not found'); 626 header('Status: 404 Not found'); 623 set_status_header(404); 627 624 if ($alternate_url==null) 628 625 $alternate_url = make_index_url(); … … 681 678 return $title; 682 679 } 680 681 /** 682 Sets the http status header (200,401,...) 683 */ 684 function set_status_header($code, $text='') 685 { 686 if (empty($text)) 687 { 688 switch ($code) 689 { 690 case 200: $text='OK';break; 691 case 301: $text='Moved permanently';break; 692 case 302: $text='Moved temporarily';break; 693 case 304: $text='Not modified';break; 694 case 400: $text='Bad request';break; 695 case 401: $text='Authorization required';break; 696 case 403: $text='Forbidden';break; 697 case 404: $text='Not found';break; 698 } 699 } 700 header("HTTP/1.1 $code $text"); 701 header("Status: $code $text"); 702 } 683 703 ?>
Note: See TracChangeset
for help on using the changeset viewer.