<?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 CText extends CPlugin{
	
	var $tplvars; 

	function __construct() {
				//$this->CPlugin($db, $tables , $templates);

		$this->name = "text";
	}

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


		if ($_GET["mod"] == $this->name) {
			//read the module
			$this->tpl_module = $this->module->plugins["modules"]->getModuleInfo($_GET["module_id"]);

			parent::DoEvents();
			$sub = $_GET["sub"];
			$action = $_GET["action"];

			$this->plugins["modules"]->ValidateModule($this->tpl_module);

			switch ($sub) {

				case "landing":
				case "texts":
					return $this->__adminTexts();
				break;
			}
		}
	}

	
	/**
	* description
	*
	* @param
	*
	* @return
	*
	* @access
	*/
	function onCreate($module_data) {

		$this->CreatePageTitleBlock(array(
			"module_id"	=> $module_data["mod_id"],
			"title"		=> $module_data["mod_name"],
			"subtitle"	=> "You can edit this block in the Module Content tab.",
			"show"		=> 1,
		));
	}

}

?>