<?PHP

class model_Model{

	var $call_controller = array('model');
	var $call_helper = array('position', 'title');

	function menu(){

		$this->model->POST('add_menu')->method();
		$this->model->POST('update_admin_menu')->method();
		$this->model->GET('action=dragAndDrop')->method();

		$this->model->get_menu_data()->Page('menu');
	}
	function elements(){

		$this->model->POST('update_element')->method();

		$this->model->get_elements_data()->Page('elements');
	}
	function export_db(){

		$this->model->get_export_db_data()->Page('export_db');
	}
	function plugins(){

		$this->init();
		$this->model->get_plugins_data()->Page('plugins');
	}
	function queue(){

		$this->model->POST('update_queue')->method();

		$this->model->get_queue_data()->Page('queue');
	}

	function database(){

		$this->model->GET('action=create_table_php')->method('create_table_php');

		$this->model->get_database_data()->Page('database');
	}

	function manage(){

		$this->model->POST('add_model_from_file')->method();

		$this->model->GET('action=install')->method();
		$this->model->GET('action=create_install')->method();
		$this->model->GET('action=remove_model')->method('remove_model');

		$this->model->get_manage_data()->Page('manage');
	}

	function init(){

		$this->model->GET('action=activate')->method('activate');
		$this->model->GET('action=delete')->method('delete');
		$this->model->GET('action=delete_model')->method('delete_model');
		$this->model->GET('action=update')->method('update_model');
		$this->model->GET('action=get_table_columns')->method();

		$this->model->POST('add')->method();
		$this->model->POST('update')->method();
		$this->model->POST('set_permission')->method();
		$this->model->POST('models_access')->method();
	}

	function model(){

		$this->init();
		$this->model->models()->Page('model');
	}
}
?>