Example #1
0
function error($from, $text = '')
{
    if (C_DEBUG) {
        $html = '
		<html>
			<head>
				<title>[WATCHR DEBUG] ERRO!</title>
				<meta charset="utf-8" />
				<style>
					body {
						background-color: #282828;
						color: #ccc;
						font-family: Arial, Helvetica, sans-serif;
						font-size: 12px;
					}
					.center {
						width:500px;
						min-height: 50px;
						display:table;
						margin:auto;
						background-color: #222;
						border:2px dotted #212121;
						padding:20px;
						margin-top:10%;
					}
				</style>
			</head>
			<body>
				<div class="center">
					<p style="color:#CD3333; font-weight: bold;margin-top:0px; margin-bottom: 0px;">Putz cara, erro!</p>
					<p style="color:#EFEFEF; font-weight: bold;margin-top:2px;margin-bottom: 0px;">Método: <span style="color:#AAA">' . $from . '</span></p>
					<p style="color:#EFEFEF; font-weight: bold;margin-top:2px">Descrição:  <span style="color:#AAA">' . $text . '</span></p>
				</div>
				' . genStats() . '
			</body>
		</html>';
        echo $html;
        exit;
    } else {
        header('Location: ./');
        echo "";
        exit;
    }
}
Example #2
0
 public function writeOutput()
 {
     echo C_DEBUG ? str_replace('</body>', genStats() . '</body>', $this->GetOutput()) : $this->GetOutput();
 }