����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 162.0.232.25 / Your IP : 3.135.205.102 Web Server : LiteSpeed System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : kwacuqig ( 988) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/kwacuqig/learn.skilltainment.org/ |
Upload File : |
<?php include './sidebar.php'; include './navbar.php'; if (isset($_GET['pid'],$_GET['vid'])) { if (!empty($_GET['pid']) && !empty($_GET['vid'])) { $pid = mysqli_real_escape_string($conn, $_GET['pid']); $vid = mysqli_real_escape_string($conn, $_GET['vid']); $sql = "SELECT `video_title`,`video_details` FROM `videos` WHERE `vid`=$vid"; if ($query_run = mysqli_query($conn, $sql)) { list($old_title, $old_details) = mysqli_fetch_array($query_run); } else { die(mysqli_error($conn)); } } } ?> <!-- Settings --> <div class="container-fluid pt-4 px-4"> <div class="col-12"> <div class="bg-secondary rounded p-4 my-4"> <?php if (isset($_POST['submit'])) { $pid = mysqli_real_escape_string($conn, htmlentities($_POST['pid'])); $vid = mysqli_real_escape_string($conn, htmlentities($_POST['vid'])); $title = mysqli_real_escape_string($conn, htmlentities($_POST['title'])); $details = mysqli_real_escape_string($conn, htmlentities($_POST['details'])); $sql = "UPDATE `videos` SET `video_title`='$title', `video_details`='$details' WHERE `vid`=$vid"; if (mysqli_query($conn, $sql)) { ?> <script> swal("SUCCESS", "Video was successfully Updated", "success"); setTimeout(function() { window.location = 'playlist.php?id=<?php echo $pid;?>' }, 1000); </script> <?php } else { die(mysqli_error($conn)); } } ?> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']).'?pid='.$pid; ?>" method="POST"> <div class="form-floating mb-3"> <input type="text" name="title" class="form-control" id="floatingText" placeholder="Title" value="<?php echo isset($_GET['vid']) ? $old_title : ''; ?>" required> <label for="floatingText">Video Title</label> </div> <div class="form-floating mb-3"> <textarea class="form-control" name="details" placeholder="Leave a comment here" id="floatingTextarea" style="height: 150px;" required><?php echo isset($_GET['vid']) ? $old_details : ''; ?></textarea> <label for="floatingTextarea">Video Details</label> </div> <input type="hidden" name="pid" value="<?php echo isset($_GET['pid']) ? $pid : null; ?>"> <input type="hidden" name="vid" value="<?php echo isset($_GET['vid']) ? $vid : null; ?>"> <button type="submit" name="submit" class="btn btn-primary py-3 w-100 mb-4">Update</button> </form> </div> </div> </div> <!-- Settings End --> <script> document.querySelector("title").innerText="Edit Video"; document.querySelectorAll(".navbar-nav a")[1].classList.add("active"); </script> <?php include './footer.php'; ?>