| 123456789101112131415161718192021 |
- <?php
- if (isset($_POST["from"]) and $_POST["from"] == "video.cut") {
- require_once ROOT_DIR . "/core/controllers/session.php";
- $execute = fichier::cut();
- if ($execute["success"] == TRUE) {
- unlink(ROOT_DIR . "/video/" . $_POST['md5'] . ".mp4");
- rename(ROOT_DIR . "/video/_" . $_POST['md5'] . ".mp4", ROOT_DIR . "/video/" . $_POST['md5'] . ".mp4");
- $durationInSeconds = fichier::getVideoDuration(ROOT_DIR . "/video/" . $_POST["md5"] . ".mp4");
- fichier::updateTime($_POST["id"], $durationInSeconds);
- } else {
- core::print_r($execute);
- exit();
- }
- header("Location: /edit/" . $_POST["hash"]);
- exit();
- } else {
- header("Location: /");
- exit();
- }
|