<?php
    $id  = $_GET['sessionId'];
    $dir = $_REQUEST['dir'];
    $id = trim($id);

    session_name($id);
    session_start();
    $inputName = $_GET['userfile'];
    $fileName  = $_FILES[$inputName]['name'];
    $tempLoc   = $_FILES[$inputName]['tmp_name'];
    echo $_FILES[$inputName]['error'];
    $target_path = '../../logos/';
	if(!is_dir($target_path))
		mkdir($target_path);
    $target_path = $target_path . basename($fileName);
    if(move_uploaded_file($tempLoc,$target_path))
    {
        $_SESSION['dhxvlt_state'] = -1;
    } else {
        $_SESSION['dhxvlt_state'] = -3;
    }
?>