<?php
/**
 * Struktura menu 
 * 
 *
 */
class UploaderController extends MainController implements ControllerInterface {
	/**
	 * strona glowna
	 *
	 */
	public function IndexAction($param) {
	}

	public function UploaderAction($param) {

		//Utils::ArrayDisplay($_FILES);
		if (isset($_FILES['file'])) {
			move_uploaded_file ( $_FILES['file']['tmp_name'], PATH_STATIC_CONTENT.'temp/'.$_FILES['file']['name'] );
		}

	}

	public function preDispatch($param) {

		$this->AddScript("prototype.js");

		$this->AddScript("GetContent.js");

		$this->AddScript('structure.js');
		$this->AddScript('Dosia.js');

		$this->AddScript('drag-drop-folder-tree.js');

		$this->AddScript('calendar.js');

		//Utils::ArrayDisplay($param);

		//$this->Run($param);


		$arrayModuleName = MfModuleDAL::GetArrayModuleName();
		$this->smarty->assign( 'arrayModuleName' ,$arrayModuleName);
		$this->smarty->assign('showIcon', true);
		//Utils::ArrayDisplay(Utils::ArrayDisplay(SessionProxy::GetValue(EnumSessionValue::USER_OBJECT)));
		//$this->RunShared('Auth', array());
		//$this->smarty->assign("menuSelected", "");
		$this->smarty->assign('activeTab', 'index');
		$this->AddScript("formAction.js");
		$this->Run($param);
		$this->RunShared('Structure', $param);
		$this->smarty->assign('titleAdmin', 'Struktura strony');

	}

	/**
	 * 
	 *
	 */
	public function postDispatch($param) {
	}
}
?>
