Changeset 1288 for trunk/include
- Timestamp:
- Apr 28, 2006, 7:12:25 AM (19 years ago)
- Location:
- trunk/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_category.inc.php
r1113 r1288 119 119 ;'; 120 120 $row = mysql_fetch_array(pwg_query($query)); 121 if (empty($row)) 122 return null; 121 123 122 124 $cat = array(); -
trunk/include/functions_html.inc.php
r1276 r1288 592 592 } 593 593 } 594 595 /** 596 * exits the current script with 404 code when a page cannot be found 597 * @param string msg a message to display 598 * @param string alternate_url redirect to this url 599 */ 600 function page_not_found($msg, $alternate_url=null) 601 { 602 header('HTTP/1.1 404 Not found'); 603 header('Status: 404 Not found'); 604 if ($alternate_url==null) 605 $alternate_url = make_index_url(); 606 redirect( $alternate_url, 607 '<div style="text-align:left; margin-left:5em;margin-bottom:5em;"> 608 <h1 style="text-align:left; font-size:36px;">Page not found</h1><br/>' 609 .$msg.'</div>', 610 5 ); 611 } 594 612 ?> -
trunk/include/section_init.inc.php
r1229 r1288 198 198 if ( empty($page['tags']) ) 199 199 { 200 die('Fatal: no existing tag');200 page_not_found('Requested tag does not exist', get_root_url().'tags.php' ); 201 201 } 202 202 } … … 317 317 { 318 318 $result = get_cat_info($page['category']); 319 if (empty($result)) 320 { 321 page_not_found('Requested category does not exist' ); 322 } 319 323 320 324 $page = array_merge(
Note: See TracChangeset
for help on using the changeset viewer.