Example #1
0
<?php

require_once '../../includes/config.php';
//Place at top of all pages before all other includes.
$fileInfo = array('title' => 'Error Report', 'fileName' => 'errors/report.php');
$debug->newFile($fileInfo['fileName']);
$buildPage = new Adrlist_BuildPage();
$buildPage->addIncludes('errorReportingMethods.php');
$buildPage->addJs(array('errorReporting.js', 'jquery/jquery.datetimepicker.js'));
$buildPage->addCss(array('jquery.datetimepicker.css'));
echo $buildPage->output(), '
<div class="layout" id="main">
	<div class="textCenter textXlarge">
		', $fileInfo['title'], '
	</div>
	<div class="textCenter" id="dailyDigestHolder">
		', buildDailyDigest(), '
	</div>
</div>
', $buildPage->buildFooter();
<?php

/*
This script and site designed and built by Mark O'Russa, Mark Pro Audio Inc. Copyright 2008-2013.
This file and it's functions are to be used solely by ../errors/ in conjunction with ../js/error.js.

All functions are listed in alphabetical order.
*/
$fileInfo = array('fileName' => 'includes/errorReportingMethods.php');
$debug->newFile($fileInfo['fileName']);
$success = false;
global $errorDbc;
$errorDbc = new Adrlist_Dbc(ERRORDBC);
if (MODE == 'buildDailyDigest') {
    buildDailyDigest();
}
function errorReporting($httpResponseStatusCode)
{
    global $debug, $message, $errorDbc;
    //die(var_dump($errorDbc));
    foreach ($_SERVER as $key => $value) {
        $_SERVER[$key] = empty($key) ? '' : $value;
    }
    $httpResponseStatusCode = empty($httpResponseStatusCode) ? '' : $httpResponseStatusCode;
    $_SERVER['HTTP_REFERER'] = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
    $errorDebug = 'Debug information follows:<br>
' . $debug->output() . "<br>";
    // . variables();
    try {
        $errorReportingStmt = $errorDbc->prepare("INSERT INTO\n\terrorReporting\nSET\n\terrorDatetime = ?,\n\tserverName = ?,\n\thttpHost = ?,\n\thttpResponseStatusCode = ?,\n\tuserAgent = ?,\n\trequestUri = ?,\n\tremoteAddress = ?,\n\thttpReferrer = ?,\n\tdebug = ?");
        $errorReportingStmt->execute(array(DATETIME, $_SERVER['SERVER_NAME'], $_SERVER['HTTP_HOST'], $httpResponseStatusCode, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REQUEST_URI'], $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_REFERER'], $errorDebug));