<?PHP

class position{

	function get_position(){

		$position[] = array('name' => 'all', 'value' => 'all', 'position' => 'all');
		$position[] = array('name' => '', 'value' => '', 'position' => 'admin');


		//admin
		$content = file_get_contents(_CurrentTemplate.'/'._TemplateGraphicAdmin.'.php');

		preg_match_all('/position\(\'([a-zA-Z0-9\__]+)\'/se', $content, $matches);
		foreach ($matches[1] as $k => $v){

			$position[] = array('name' => $v, 'value' => $v, 'position' => 'admin');
		}


		$position[] = array('name' => '', 'value' => '', 'position' => 'public');


		//public
		$content = file_get_contents(_CurrentTemplate.'/'._TemplateGraphicPublic.'.php');

		preg_match_all('/position\(\'([a-zA-Z0-9\__]+)\'/se', $content, $matches);
		foreach ($matches[1] as $k => $v){

			$position[] = array('name' => $v, 'value' => $v, 'position' => 'public');
		}


		$position[] = array('name' => '', 'value' => '', 'position' => 'ajax');


		//ajax
		$content = file_get_contents(_CurrentTemplate.'/'._TemplateGraphicAjax.'.php');

		preg_match_all('/position\(\'([a-zA-Z0-9\__]+)\'/se', $content, $matches);
		foreach ($matches[1] as $k => $v){

			$position[] = array('name' => $v, 'value' => $v, 'position' => 'admin');
		}


		/*
		$this->pre($position_admin);
		$this->pre($position_public);
		*/

		return $position;
	}
}


?>