<?php
$path="../../";
include("../../map.php");
if($_GET["durum"]=="cfolder"){
	if (!file_exists("../../".$_GET["folder"]."/".$_POST["q"]."")) {
		mkdir("../../".$_GET["folder"]."/".$_POST["q"]."", 0777, true);
	}
	echo "url:".$weburl."/".$crmpath."?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&folder=".$_GET["folder"]."&durum=ok";
}elseif($_GET["durum"]=="ufile"){
	$kaynak = $_FILES['q']['tmp_name'];
	$isim   = $_FILES['q']['name'];
	$rand   = substr(md5(uniqid(rand())),0,5);
	$yeni   = $_FILES['q']['name'];
	move_uploaded_file ($_FILES['q']['tmp_name'], "../../".$_GET["folder"]."" . "/".$yeni);
	echo "url:".$weburl."/".$crmpath."?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&folder=".$_GET["folder"]."&durum=ok";
}elseif($_GET["durum"]=="dfile"){
	unlink("../../".$_GET["file"]."");
	echo "url:".$weburl."/".$crmpath."?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&folder=".$_GET["folder"]."&durum=ok";
}elseif($_GET["durum"]=="dfolder"){
	rrmdir("../../".$_GET["file"]."");
	echo "url:".$weburl."/".$crmpath."?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&folder=".$_GET["folder"]."&durum=ok";
}elseif($_GET["durum"]=="rfolder"){
	rename("../../".$_GET["folder"]."/".$_GET["nfolder"]."","../../".$_GET["folder"]."/".$_POST["q"]."");
	echo "url:".$weburl."/".$crmpath."?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&folder=".$_GET["folder"]."&durum=ok";
}elseif($_GET["durum"]=="rfile"){
	rename("../../".$_GET["folder"]."/".$_GET["nfile"]."","../../".$_GET["folder"]."/".$_POST["q"]."");
	echo "url:".$weburl."/".$crmpath."?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&folder=".$_GET["folder"]."&durum=ok";
}
?>