Revision 286
Added by stefan almost 20 years ago
| comment_page.php | ||
|---|---|---|
| 24 | 24 | 
    */  | 
| 25 | 25 | 
     | 
| 26 | 26 | 
    // Make sure page cannot be accessed directly  | 
| 27 | 
    if(!defined('WB_URL')) { header('Location: ../index.php'); }
   | 
|
| 27 | 
    if(!defined('WB_URL')) { 
   | 
|
| 28 | 
    	header('Location: ../index.php');
   | 
|
| 29 | 
    exit(0);  | 
|
| 30 | 
    }  | 
|
| 28 | 31 | 
     | 
| 29 | 32 | 
    // Get comments page template details from db  | 
| 30 | 33 | 
    $query_settings = $database->query("SELECT comments_page,use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
   | 
| 31 | 34 | 
    if($query_settings->numRows() == 0) {
   | 
| 32 | 35 | 
    	header('Location: '.WB_URL.'/pages/');
   | 
| 36 | 
    exit(0);  | 
|
| 33 | 37 | 
    } else {
   | 
| 34 | 38 | 
    $settings = $query_settings->fetchRow();  | 
| 35 | 39 | 
    // Print comments page  | 
Also available in: Unified diff
Added an exit call after every heading("Location:...") redirector to prevent unwanted execution of code.