Пример #1
0
 /**
  * Prints an error dialogue
  * @param  string  $msg  Message that'll be displayed
  * @param  integer $line Line number of the original error
  * @param  string  $file File where the error originated
  * @param  string  $type Type of error we should display (May be block (small) or full (full screen))
  * @return void
  */
 static function printError($msg, $line, $file, $type = 'block')
 {
     switch ($type) {
         case 'full':
             echo Tpl::includeSystem();
             echo "<title>Fatal error!</title>";
             echo "<div class=\"sonicwulf_overlay\"></div>";
             echo "<div class=\"sonicwulf_fatal animated fadeInDown\">";
             echo "<div class=\"info\"><h1>FATAL EHRROHR!!!!11</h1>";
             echo "<b>Dump:</b><br><pre>Fatal error near line {$line} in file {$file}<br><br>";
             echo "SonicWulf said: " . $msg . "";
             echo "<br><br>PHP " . PHPV . " (" . OS . ")<br /><br>";
             echo "Host: " . HOST . "<br>Requested from: " . REF;
             echo "</pre>Powered by <b>" . SWVER . "</b></div>";
             exit(1);
             break;
         case 'block':
             echo "<div class=\"sonicwulf_msg\"><b>Error!</b> {$msg} on line {$line} in file {$file}</div>";
             break;
     }
 }