<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}

// dependencies

/**
* description
*
* @library	
* @author	
* @since	
*/
class CDenied extends CPlugin{
	
	var $tplvars; 

	function __construct() {
		//$this->CPlugin($db, $tables , $templates);
		$this->name = "denied";
		
	}

	function DoEvents(){
		global $base, $_CONF, $_TSM , $_VARS , $_USER , $_BASE , $_SESS;



		parent::DoEvents();

		if ($_GET["mod"] == "denied") {
		

			switch ($_GET["sub"]) {
				case "404":
					$_TSM["PUB:MODULE_NAME"] = "404 Not Found";			

					return $base->htmlElements->Widget(
						array(
							"title"		=> "Page Not Found",
							"icon"		=> "cogs",
							"skin"		=> "Red",
							"height"	=> "",

							"content"	=> '
								<div class="noteSmall nInfo form-comment" id="XML_BODY_FIELD_{NAME}">
									<span class="sign sign-info"></span>
									<h3>
										<p>
											The page you are trying to access doesn\'t exist or was removed in the meantime.<br>
											Please contact your system administrator for more details.
										</p>
									</h3>
								</div>'
						)
					);

				break;

				default:
					$_TSM["PUB:MODULE_NAME"] = "Access Denied";			

					return $base->htmlElements->Widget(
						array(
							"title"		=> "Not enough permissions",
							"icon"		=> "cogs",
							"skin"		=> "Red",
							"height"	=> "",

							"content"	=> '
								<div class="noteSmall nInfo form-comment" id="XML_BODY_FIELD_{NAME}">
									<span class="sign sign-info"></span>
									<h3>
										<p>
											You don\'t currently have permission to access this link / operation.<br>
											Please contact your system administrator for more details.
										</p>
									</h3>
								</div>'
						)
					);
				break;
			}
			

			return "access denied";

		}
	}



	
	/**
	* description
	*
	* @param
	*
	* @return
	*
	* @access
	*/

	


}

?>