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

	global $_CONF;


	switch ($_GET["upload-action"]) {
		case "image-upload":
			External::Load("fileupload");
			//validate session
			$upload_handler = new UploadHandler(
				array(
			        'upload_dir' => "../upload/tmp/",
			        'upload_url' => $_CONF["url"] . "/upload/tmp/",
				)			
			);
			die();
			
		break;

		case "file-upload":
			External::Load("fileupload");
			$upload_handler = new UploadHandler(
				array(
			        'upload_dir' => "../upload/tmp/",
			        'upload_url' => $_CONF["url"] . "/upload/tmp/",
				)							
			);
		break;
	}
	

?>