Error page for customer
This commit is contained in:
parent
34482ff0d4
commit
8e2a40d670
@ -129,11 +129,11 @@ try {
|
|||||||
$e->getTraceAsString()
|
$e->getTraceAsString()
|
||||||
);
|
);
|
||||||
if (!Admin::getID()) {
|
if (!Admin::getID()) {
|
||||||
r2(U . 'home', 'e', $e->getMessage());
|
$ui->display('error-user.tpl'); die();
|
||||||
}
|
}
|
||||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
$ui->display('router-error.tpl');
|
$ui->display('error.tpl');
|
||||||
die();
|
die();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Message::sendTelegram(
|
Message::sendTelegram(
|
||||||
@ -142,10 +142,10 @@ try {
|
|||||||
$e->getTraceAsString()
|
$e->getTraceAsString()
|
||||||
);
|
);
|
||||||
if (!Admin::getID()) {
|
if (!Admin::getID()) {
|
||||||
r2(U . 'home', 'e', $e->getMessage());
|
$ui->display('error-user.tpl'); die();
|
||||||
}
|
}
|
||||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
$ui->display('router-error.tpl');
|
$ui->display('error.tpl');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ switch ($action) {
|
|||||||
$ui->assign("error_message", "Radius table not found.<br><br>" .
|
$ui->assign("error_message", "Radius table not found.<br><br>" .
|
||||||
$e->getMessage() .
|
$e->getMessage() .
|
||||||
"<br><br>Download <a href=\"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/Development/install/radius.sql\">here</a> or <a href=\"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/install/radius.sql\">here</a> and import it to database.<br><br>Check config.php for radius connection details");
|
"<br><br>Download <a href=\"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/Development/install/radius.sql\">here</a> or <a href=\"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/install/radius.sql\">here</a> and import it to database.<br><br>Check config.php for radius connection details");
|
||||||
$ui->display('router-error.tpl');
|
$ui->display('error.tpl');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
51
ui/ui/error-user.tpl
Normal file
51
ui/ui/error-user.tpl
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>{ucwords(Lang::T("Error"))} - {$_c['CompanyName']}</title>
|
||||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="hold-transition lockscreen">
|
||||||
|
<div class="lockscreen-wrapper">
|
||||||
|
<div class="panel panel-danger">
|
||||||
|
<div class="panel-heading">{ucwords(Lang::T("Internal Error"))}</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{Lang::T("Sorry, the software failed to process the request, if it still happening, please tell")}
|
||||||
|
{$_c['CompanyName']}
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<a href="{$url}" id="button" class="btn btn-danger btn-block">{Lang::T('Try Again')}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="lockscreen-footer text-center">
|
||||||
|
{$_c['CompanyName']}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{if $_c['tawkto'] != ''}
|
||||||
|
<!--Start of Tawk.to Script-->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var Tawk_API = Tawk_API || {},
|
||||||
|
Tawk_LoadStart = new Date();
|
||||||
|
(function() {
|
||||||
|
var s1 = document.createElement("script"),
|
||||||
|
s0 = document.getElementsByTagName("script")[0];
|
||||||
|
s1.async = true;
|
||||||
|
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
|
||||||
|
s1.charset = 'UTF-8';
|
||||||
|
s1.setAttribute('crossorigin', '*');
|
||||||
|
s0.parentNode.insertBefore(s1, s0);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<!--End of Tawk.to Script-->
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Loading…
x
Reference in New Issue
Block a user