<?php include "../../root.class.php";
$html = new html();
$html->add_styles_page();
$db = new db_safeguard();

session_start();

try {

    $target_file = $_POST['file_save_path'];

    if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
        echo "OK";
    } else {
        echo "Failed to move uploaded file.";
    }

} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}