예제 #1
0
function bit_display_error($pLogMessage, $pSubject, $pFatal = TRUE)
{
    global $gBitSystem;
    if ($pFatal) {
        header($_SERVER["SERVER_PROTOCOL"] . ' ' . HttpStatusCodes::getMessageForCode(HttpStatusCodes::HTTP_INTERNAL_SERVER_ERROR));
    }
    error_log($pLogMessage);
    if (!defined('IS_LIVE') || !IS_LIVE) {
        print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
			<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
			<head>
				<title>bitweaver - White Screen of Death</title>
			</head>
			<body style="background:#fff; font-family:monospace;">';
        // 		print "<h1>Upgrade Beta 1 to Beta 2</h1>If you are getting this error because you just upgraded your bitweaver from Beta 1 to Beta 2, please follow this link to the installer, which will guide you through the upgrade process: <a href='".BIT_ROOT_URL."install/install.php?step=4'>Upgrade Beta 1 to Beta 2</a>";
        print "<h1 style=\"color:#900; font-weight:bold;\">You are running bitweaver in TEST mode</h1>\n";
        print "\n\t\t\t<ul>\n\t\t\t\t<li><a href='http://sourceforge.net/tracker/?func=add&amp;group_id=141358&amp;atid=749176'>Click here to log a bug</a>, if this appears to be an error with the application.</li>\n\t\t\t\t<li><a href='" . BIT_ROOT_URL . "install/install.php'>Go here to begin the installation process</a>, if you haven't done so already.</li>\n\t\t\t\t<li>To hide this message, please <strong>set the IS_LIVE constant to TRUE</strong> in your config/kernel/config_inc.php file.</li>\n\t\t\t</ul>\n\t\t\t<hr />\n\t\t";
        print "<pre>" . $pLogMessage . "</pre>";
        print "<hr />";
        print "</body></html>";
    } else {
        bit_error_email($pSubject, $pLogMessage);
        if (defined('AUTO_BUG_SUBMIT') && AUTO_BUG_SUBMIT && !empty($gBitSystem) && $gBitSystem->isDatabaseValid()) {
            mail('*****@*****.**', "{$pSubject}", $pLogMessage);
        }
    }
    if ($pFatal) {
        die;
    }
}
예제 #2
0
 public function outputHeader()
 {
     // see if we have a custom status other than 200 OK
     header($_SERVER["SERVER_PROTOCOL"] . ' ' . HttpStatusCodes::getMessageForCode($this->mHttpStatus));
 }