42 lines
		
	
	
		
			919 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			919 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/*****************************************************************************
 | 
						|
 * ErrorPage.php
 | 
						|
 * Defines the template class ErrorPage.
 | 
						|
 *
 | 
						|
 * Kabuki CMS (C) 2013-2025, Aaron van Geffen
 | 
						|
 *****************************************************************************/
 | 
						|
 | 
						|
class ErrorPage extends Template
 | 
						|
{
 | 
						|
	private $debug_info;
 | 
						|
	private $message;
 | 
						|
	private $title;
 | 
						|
 | 
						|
	public function __construct($title, $message, $debug_info = null)
 | 
						|
	{
 | 
						|
		$this->title = $title;
 | 
						|
		$this->message = $message;
 | 
						|
		$this->debug_info = $debug_info;
 | 
						|
	}
 | 
						|
 | 
						|
	public function html_main()
 | 
						|
	{
 | 
						|
		echo '
 | 
						|
				<div class="content-box container">
 | 
						|
					<h2>', $this->title, '</h2>
 | 
						|
					<p>', nl2br(htmlspecialchars($this->message)), '</p>';
 | 
						|
 | 
						|
		if (isset($this->debug_info))
 | 
						|
		{
 | 
						|
			echo '
 | 
						|
				</div>
 | 
						|
				<div class="content-box container">
 | 
						|
					<h4>Debug Info</h4>
 | 
						|
					<pre>', htmlspecialchars($this->debug_info), '</pre>';
 | 
						|
		}
 | 
						|
 | 
						|
		echo '
 | 
						|
				</div>';
 | 
						|
	}
 | 
						|
}
 |