|
|
@ -42,31 +42,26 @@ class CPHPErrorHandler
|
|
|
|
{
|
|
|
|
{
|
|
|
|
global $locale;
|
|
|
|
global $locale;
|
|
|
|
|
|
|
|
|
|
|
|
$template['error'] = new Templater();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch($this->sErrorType)
|
|
|
|
switch($this->sErrorType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_ERROR:
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_ERROR:
|
|
|
|
$template['error']->Load("errorhandler.error");
|
|
|
|
$template = "errorhandler.error";
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_INFO:
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_INFO:
|
|
|
|
$template['error']->Load("errorhandler.info");
|
|
|
|
$template = "errorhandler.info";
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_WARNING:
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_WARNING:
|
|
|
|
$template['error']->Load("errorhandler.warning");
|
|
|
|
$template = "errorhandler.warning";
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_SUCCESS:
|
|
|
|
case CPHP_ERRORHANDLER_TYPE_SUCCESS:
|
|
|
|
$template['error']->Load("errorhandler.success");
|
|
|
|
$template = "errorhandler.success";
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$template['error']->Localize($locale->strings);
|
|
|
|
return Templater::AdvancedParse($template, $locale->strings, array(
|
|
|
|
$template['error']->Compile(array(
|
|
|
|
|
|
|
|
'title' => $this->sTitle,
|
|
|
|
'title' => $this->sTitle,
|
|
|
|
'message' => $this->sMessage
|
|
|
|
'message' => $this->sMessage
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
return $template['error']->Render();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|