if(isset($_POST["chgperms-file"])){chgperms_file();exit;} if(isset($_GET["remove-file-js"])){remove_file_js();exit;} if(isset($_POST["remove-file"])){remove_file();exit;} if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["browse-folder"])){browse_folder();exit;} if(isset($_GET["folder-infos"])){folder_infos();exit;} if(isset($_GET["top-bar"])){top_bar();exit;} if(isset($_GET["file-info"])){file_info();exit;} if(isset($_GET["download-file"])){download_file();exit;} if(isset($_GET["create-folder"])){create_folder();exit;} if(isset($_GET["delete-folder"])){delete_folder();exit;} if(isset($_GET["share-folder"])){share_folder();exit;} if(isset($_GET["unshare-rsync"])){rsync_unshare();exit;} if(isset($_GET["upload-file"])){upload_file_popup();exit;} if(isset($_GET["form-upload"])){upload_file_iframe();exit;} if( isset($_GET['TargetpathUploaded']) ){upload_form_perform();exit();} if(isset($_GET["loupe-js"])){loupe_js();exit;} if(isset($_GET["loupe-popup"])){loupe_popup();exit;} js(); function IsPriv(){ if(!is_object($GLOBALS["USERMENUS"])){$users=new usersMenus();$GLOBALS["USERMENUS"]=$users;}else{$users=$GLOBALS["USERMENUS"];} $users=new usersMenus(); if($users->AsArticaAdministrator){return "/";} if($users->AsSambaAdministrator){return "/";} if($users->AsSystemAdministrator){return "/";}
function upload_form_perform() { while (list($num, $line) = each($_POST)) { writelogs("_POST:: receive {$num}={$line}", __FUNCTION__, __FILE__, __LINE__); } while (list($num, $line) = each($_FILES['fichier'])) { writelogs("_FILES:: receive {$num}={$line}", __FUNCTION__, __FILE__, __LINE__); } reset($_FILES['fichier']); $error = $_FILES['fichier']['error']; $tmp_file = $_FILES['fichier']['tmp_name']; $content_dir = dirname(__FILE__) . "/ressources/conf/upload"; if (!is_dir($content_dir)) { mkdir($content_dir); } if (!is_uploaded_file($tmp_file)) { $error = "<table style='width:100%'>"; while (list($num, $val) = each($_FILES['fichier'])) { $error = $error . "<tr><td align='right' style='font-size:11px'>{$num}:</td><td style='font-size:11px'><b>{$val}</b></td></tr>"; } upload_file_iframe("{error_unable_to_upload_file}{$error}</table>"); exit; } $type_file = $_FILES['fichier']['type']; $name_file = $_FILES['fichier']['name']; $ext = file_ext($name_file); if ($_POST["select-file"] != null) { if ($_POST["select-file"] != '*') { if ($ext != $_POST["select-file"]) { upload_file_iframe("{error_file_extension_not_match} :\"{$ext}\" is not \"{$_POST["select-file"]}\""); return; } } } if (file_exists($content_dir . "/" . $name_file)) { @unlink($content_dir . "/" . $name_file); } if (!move_uploaded_file($tmp_file, $content_dir . "/" . $name_file)) { upload_file_iframe("{error_unable_to_move_file} : " . $content_dir . "/" . $name_file); exit; } $_GET["moved_file"] = $content_dir . "/" . $name_file; include_once "ressources/class.sockets.inc"; $sock = new sockets(); $rettun = $sock->getFrameWork("cmd.php?move_uploaded_file='{$_POST["target_path"]}&src=" . base64_encode("{$content_dir}/{$name_file}")); upload_file_iframe($_POST["database_name"] . "<br>{success}<br>{$rettun}"); }
exit; } if (isset($_GET["share-folder"])) { share_folder(); exit; } if (isset($_GET["unshare-rsync"])) { rsync_unshare(); exit; } if (isset($_GET["upload-file"])) { upload_file_popup(); exit; } if (isset($_GET["form-upload"])) { upload_file_iframe(); exit; } if (isset($_GET['TargetpathUploaded'])) { upload_form_perform(); exit; } if (isset($_GET["loupe-js"])) { loupe_js(); exit; } if (isset($_GET["loupe-popup"])) { loupe_popup(); exit; } js();