Exemplo n.º 1
0
<?php

// Define default location
if (!defined('BASE_PATH')) {
    die('BASE_PATH not defined!');
}
send_response_status_header(403);
echo '<p>' . $ccms['lang']['system']['error_403content'] . '</p>';
if (0) {
    dump_request_to_logfile(array('invocation_mode' => get_interpreter_invocation_mode(), 'response(404)' => get_response_code_string(404), 'response(403)' => get_response_code_string(403), 'response(302)' => get_response_code_string(302)), true);
}
 function send_response_status_header($response_code)
 {
     $mode = get_interpreter_invocation_mode();
     switch ($mode) {
         default:
         case 'fcgi':
             header('Status: ' . $response_code, true, $response_code);
             break;
         case 'server':
             header('HTTP/1.0 ' . $response_code . ' ' . get_response_code_string($response_code), true, $response_code);
             break;
     }
 }
Exemplo n.º 3
0
             // loop so we use the second round to fetch the error page itself.
         }
     }
     // end of 2-round loop
     if ($content === false || $rcode !== false) {
         // failure occurred! produce a 'response code page' after all!
         if (!$rcode) {
             $rcode = 404;
         }
         setup_ccms_for_40x_error($rcode, $pagereq);
     }
     if (is_http_response_code($ccms['responsecode'])) {
         send_response_status_header($ccms['responsecode']);
     }
     if ($cfg['IN_DEVELOPMENT_ENVIRONMENT']) {
         dump_request_to_logfile(array('invocation_mode' => get_interpreter_invocation_mode()), true, true, true);
     }
 } else {
     /*
      * OPERATION MODE ==
      *
      * 3) Start dynamic sitemap creation used by spiders and various webmaster tools.
      *
      * e.g. You can use this function to submit a dynamic sitemap to Google Webmaster Tools.
      */
     $dir = $cfg['rootdir'];
     // [i_a] the original substr($_SERVER[]) var would fail when called with this req URL: index.php?page=sitemap
     /*
      Start generating sitemap
     
      See also: http://hsivonen.iki.fi/producing-xml/