![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/formeditor/api/ |
Upload File : |
<?php session_start(); header("Access-Control-Allow-Origin: *"); // header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); header('Access-Control-Allow-Headers: X-Requested-With, content-type, access-control-allow-origin, access-control-allow-methods, access-control-allow-headers'); $USER_KEY = "EQbwOsCWB2DOAuBDaBjAprCAucwCcAzAIxEDsALOSgLQEUBstArAAwBM1AHFXtQCYt6aTgCMmaRGz71suWCgAWaALaIACgCdIq" ."+JABuaAJIARbBAAOAG0QBPNBogAaCPKWrN2xLoMAVG+bQzYDVrOwdgZ2AAazQbIMISCipaBmZ2Lh5+QWExCSkZCIgAV0g+IKIC" ."ThICeiI8OsryCicIFA0JeDQ+H21A4CwicjxyMiJOAjYavEjrToQe5T6saCLLSwBfSJROADMWBpFqFD4UIlodzl5CPkO2HZQ8ej" ."xOJk4WETL+uUUVdS0dfRGUz9CAiAD2sFgAH0+F5EC1gK5fh4Ab5/EsIIZOsoETE4iDgNs9gcjiczgQLlcCDdqHcHk8Xm8PgiEF" ."4MVA+JY+pFWfBMP0ANoQcgiER4U6IFj8Lqkc5ERiEHaHD5sFAiRAPRBVJgI0i7TgoPaHFgoeiIc4iTjUPB8NjkahENDkLXCThs" ."CTw4AAXS27TZ3V62EGw1G40mpDYm2FovFREl0r4sop8utFOVtrVGrwWqIOq+Lh+7n+XkBJiCVls9hhcKh4MhUJWyhE9hZhb+nm" ."8aD8ASCAGUkPBcbEgiKxRKpXwZXKFWnqCrM5rtQi9IhLEUlmxIqoAB7aIo4/osKPAPUXQ3vagms0Wq02u0Op0uzhuj2yAtuduo" ."oHl0JV2FIatVAAczQBswQ0VRLEgAAvLpWw/FESzRHsCX7Lwh3xLAIFPA0jUvU1zTTW9bXtR1nU4V13UQT1IhXNclhYAA6Jh6Gf" ."UgSA4ziSC3RBd2UfdsCPSIdmeZsCDwWVEBEJVznqDJyCtNgJMqRB5XoCNyDfRE20QzsywJOtoX/Gj32RYtO27dksRUDCghE0Q0" ."HEyTpMOCk5O4BTaWUzhVPodS7RZAd2VKLlAq8fksCFYA3hQJhSDQEQpTYDVXLNGhLhE60mD2BSiBQUhSEQApIklKgRRFahSETR" ."gCCaXhuES6h6HIegRAIFgmD4CYRE071fQ6LoFiWYNyGIIgWE4dSWCEiAYrihKkpS2g0q4PBMrwbKWFy/LCoKHBTKLDtS2BLDgA" ."rMJqwAwyG33Ztwh5HTzMBSy+wHWyCTm+LGuStVlo1Vb1s27aCqK5dV3XbACB4viBMPY9SpQcrDiq0garqjJGua1r2s67rev27S" ."EKegx9NO86/xrWFgNA6BwMgmC4MKQmzKO5D2TQwcmbxIIEaRyrqtodGGqlLG2o6rq2B6sH6MExi2BeUgWA2xpaiYFXob3A8sCP" ."eGUF0MFoEMaBJ23bAmHISIYFZVA0AAaViI2TewUhLbgJAbftmwAAlkE5ewADlEEWIIAFUQ/0h6Px92AFBHMbSEIN0sDteXaufC"; $SOLUTIONS_FOLDER = "../../solutions"; function depthScanDir($path, $entry, $name, $depth){ $res = array(); $res["absolute_path"] = $path; $res["path"] = $entry; $res["name"] = $name; if (is_dir($path)){ $res["type"] = "FOLDER"; if ($depth > 0){ $res["children"] = array(); $files = scandir($path); foreach($files as $file){ if ($file[0] == ".") continue; if ($entry == false){ $newEntry = $file; } else{ $newEntry = $entry."/".$file; } array_push($res["children"], depthScanDir($path."/".$file, $newEntry , $file , $depth -1)); } } } else{ $res["type"] = "FILE"; } return $res; } function depthRemoveDir($dir) { $files = array_diff(scandir($dir), array('.','..')); foreach ($files as $file) { if (is_dir("$dir/$file")) depthRemoveDir("$dir/$file"); else unlink("$dir/$file"); } return rmdir($dir); } function verifyPath($path){ if (strpos('../', $path)) return false; if (strpos('/..', $path)) return false; return true; } function getArgs(){ $content = trim(file_get_contents("php://input")); $ARGS = json_decode($content, true); if ($ARGS == null) $ARGS = array(); return $ARGS; } function writeText($path, $text){ $myfile = fopen($path, "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); fwrite($myfile, $txt); fclose($myfile); } ?>