deleteFile($_POST); break; case "renameFile": renameFile($_POST); break; case "downloadFile": downloadFile($_POST); break; case "extractFile": extractFile($_POST); break; case "uploadFile": uploadFile($_POST); break; case "changePermissions": changePermissions($_POST); break; case "zipnload": zipnload($_POST); break; case "remoteUpload": remoteUpload($_POST); break; case "deleteMultipleFiles": deleteMultipleFiles($_POST); break; default: echo json_encode(array("status" => "ERROR", "message" => "No valid api action given")); break; } } else {
$myArray = array("doc", "docx", "ppt", "pptx", "pages", "key", "pdf"); foreach ($myArray as $v) { if ($pathinfo == $v) { $other_true = true; } } $class_array = array("ATCS_ComputerArchitecture", "AT_ProgrammingLanguages", "AP_CSDS", "AP_CSA", "DigitalWorld", "IntroOOP", "Programming", "English1", "English2", "AP_ArtHistory", "AP_EuropeanHistory", "AP_Microeconomics", "AP_Psychology", "WorldHistory1", "WorldHistory2", "AlgebraI", "AlgebraII", "AP_Calculus", "Geometry", "PreCalculus", "AP_French", "AP_Japanese", "AP_Latin", "AP_Spanish", "French1", "French2", "French3", "French4", "Japanese1", "Japanese2", "Japanese3", "Japanese4", "Latin1", "Latin2", "Latin3", "Latin4", "Physics", "AP_Chem", "Chem", "AP_Physics", "AP_WorldHistory"); //check if the form has been set if (isset($_POST['upload'])) { //check if the description and option fields have been set if (isset($_POST['description'])) { if (isset($_POST['name'])) { if (isset($_POST['subject'])) { if ($other_true == true) { if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { changePermissions($target_path, 999); $query = "INSERT INTO classes (username, class, fileName, description) VALUES ('{$name}', '{$class}', '{$new_file_name}', '{$description}')"; mysql_query($query); } } } } } } ?> <html> <head> <title> </title> </head> <body> <form id="uploadForm" name="uploadForm" method="post" action="" enctype="multipart/form-data">
function securityManager() { // set directories and files // $installRootRead = getSystemRoot(RAZOR_ADMIN_FILENAME); $installRootPath = ''; // change permissions // if (isset($_GET['permissions'])) { changePermissions($installRootPath); } // read all file and dir permissions // $permSafe = readPermissions($installRootRead); // display permissions // displayPerm($permSafe); }