2019-05-09 18:54:39 +12:00
<?php
2021-07-18 06:59:54 +12:00
$development = $this->getParam('development', false);
2023-08-01 07:55:02 +12:00
$type = $this->getParam('type', 'general_server_error');
2019-05-09 18:54:39 +12:00
$code = $this->getParam('code', 500);
$errorID = $this->getParam('errorID', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
$message = $this->getParam('message', '');
2021-07-18 06:59:54 +12:00
$trace = $this->getParam('trace', []);
2019-05-09 18:54:39 +12:00
$projectName = $this->getParam('projectName', '');
$projectURL = $this->getParam('projectURL', '');
2022-11-18 01:37:59 +13:00
$title = $this->getParam('title', '')
2019-05-09 18:54:39 +12:00
?>
2022-11-18 01:37:59 +13:00
<!DOCTYPE html>
< html lang = "en" >
< head >
2023-08-01 07:55:02 +12:00
< meta charset = "utf-8" / >
< meta name = "description" content = "" / >
< link rel = "icon" href = "/favicon.png" / >
< link
rel="preload"
href="/fonts/inter/inter-v8-latin-600.woff2"
as="font"
type="font/woff2"
crossorigin />
< link
rel="preload"
href="/fonts/inter/inter-v8-latin-regular.woff2"
as="font"
type="font/woff2"
crossorigin />
< link
rel="preload"
href="/fonts/poppins/poppins-v19-latin-500.woff2"
as="font"
type="font/woff2"
crossorigin />
< link
rel="preload"
href="/fonts/poppins/poppins-v19-latin-600.woff2"
as="font"
type="font/woff2"
crossorigin />
< link
rel="preload"
href="/fonts/poppins/poppins-v19-latin-700.woff2"
as="font"
type="font/woff2"
crossorigin />
< link
rel="preload"
href="/fonts/source-code-pro/source-code-pro-v20-latin-regular.woff2"
as="font"
type="font/woff2"
crossorigin />
< link rel = "stylesheet" href = "https://unpkg.com/@appwrite.io/pink" / >
< link rel = "preload" as = "style" type = "text/css" href = "/fonts/main.css" / >
< link rel = "stylesheet" href = "/fonts/main.css" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< meta http-equiv = "content-security-policy" content = "" >
< title > <?php echo $this -> print ( $title , self :: FILTER_ESCAPE ); ?> </ title >
< style >
@media(min-width:768px) {
article.card {
padding: 2rem !important;
}
}
< / style >
2022-11-18 01:37:59 +13:00
< / head >
< body >
2023-08-01 07:55:02 +12:00
< div class = "container u-margin-block-start-24" >
< article class = "card u-padding-16" >
< div class = "u-flex u-flex-vertical u-gap-16" >
< h1 class = "heading-level-4 u-trim-1" > Error <?php echo $this -> print ( $code , self :: FILTER_ESCAPE ); ?> </ h1 >
< p class = "text" > <?php echo $this -> print ( $message , self :: FILTER_ESCAPE ); ?> </ p >
< div class = "u-flex u-flex-vertical u-gap-8" >
< p class = "text" > Type< / p >
< p >< code class = "inline-code" > <?php echo $this -> print ( $type , self :: FILTER_ESCAPE ); ?> </ code ></ p >
< / div >
<?php if ( $development ) : ?>
< h2 class = "heading-level-5 u-trim-1" > Error Trace< / h2 >
<?php foreach ( $trace as $log ) : ?>
< div class = "table-with-scroll" >
< div class = "table-wrapper" >
< table class = "table is-remove-outer-styles" >
< tbody class = "table-tbody" >
<?php foreach ( $log as $key => $value ) : ?>
< tr >
< td class = "table-col" style = "width: 120px" > <?php echo $this -> print ( $key , self :: FILTER_ESCAPE ); ?> </ td >
< td class = "table-col" > < code class = "grid-code u-max-height-200 u-overflow-x-auto u-overflow-y-auto" >
<?php if ( is_array ( $value )) : ?>
< pre > <?php echo $this -> print ( var_export ( $value , true ), self :: FILTER_ESCAPE ); ?> </ pre >
<?php else : ?>
< pre > <?php echo $this -> print ( $value , self :: FILTER_ESCAPE ); ?> </ pre >
<?php endif ; ?>
< / code >
< / td >
< / tr >
2022-11-18 01:37:59 +13:00
2023-08-01 07:55:02 +12:00
<?php endforeach ; ?>
< / tbody >
< / table >
< / div >
< / div >
<?php endforeach ; ?>
<?php endif ; ?>
< / div >
< / article >
< / div >
<!-- section>
< h1 > Error <?php echo $this -> print ( $code , self :: FILTER_ESCAPE ); ?> </ h1 >
2022-11-18 01:37:59 +13:00
2023-08-01 07:55:02 +12:00
< p > <?php echo $this -> print ( $message , self :: FILTER_ESCAPE ); ?> </ p >
2022-11-18 01:37:59 +13:00
2023-08-01 07:55:02 +12:00
< small > Error ID: <?php echo $this -> print ( $errorID , self :: FILTER_ESCAPE ); ?> </ small >
2022-11-18 01:37:59 +13:00
<?php if ( ! empty ( $projectURL )) : ?>
< hr / >
2023-08-01 07:55:02 +12:00
< p >< a href = " <?php echo $this -> print ( $projectURL , self :: FILTER_ESCAPE ); ?> " rel = "noopener" > Back to <?php echo $this -> print ( $projectName , self :: FILTER_ESCAPE ); ?> </ a ></ p >
2022-11-18 01:37:59 +13:00
<?php endif ; ?>
<?php if ( $development ) : ?>
< div >
< h2 > Error Trace< / h2 >
<?php foreach ( $trace as $log ) : ?>
< table >
<?php foreach ( $log as $key => $value ) : ?>
< tr >
2023-08-01 07:55:02 +12:00
< td style = "width: 120px" > <?php echo $this -> print ( $key , self :: FILTER_ESCAPE ); ?> </ td >
2022-11-18 01:37:59 +13:00
< td >
<?php if ( is_array ( $value )) : ?>
2023-08-01 07:55:02 +12:00
<?php echo $this -> print ( var_export ( $value , true ), self :: FILTER_ESCAPE ); ?>
2022-11-18 01:37:59 +13:00
<?php else : ?>
2023-08-01 07:55:02 +12:00
<?php echo $this -> print ( $value , self :: FILTER_ESCAPE ); ?>
2022-11-18 01:37:59 +13:00
<?php endif ; ?>
< / td >
< / tr >
2021-07-18 06:59:54 +12:00
<?php endforeach ; ?>
2023-08-09 09:25:48 +12:00
< / table >
<?php endforeach ; ?>
< / div >
<?php endif ; ?>
2022-11-18 01:37:59 +13:00
2023-08-01 07:55:02 +12:00
< / section-- >
< script type = "text/javascript" >
const app = (JSON.parse(localStorage.getItem('appwrite')) ?? {});
const theme = app.theme ?? 'auto';
if (theme === 'auto') {
const darkThemeMq = window.matchMedia('(prefers-color-scheme: dark)');
if (darkThemeMq.matches) {
document.body.setAttribute('class', `theme-dark`);
} else {
document.body.setAttribute('class', `theme-light`);
}
} else {
document.body.setAttribute('class', `theme-${theme}`);
}
< / script >
2022-11-18 01:37:59 +13:00
< / body >
2021-07-18 06:59:54 +12:00
2022-11-18 01:37:59 +13:00
< / html >