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/wecareindustry.in/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u451330669/domains/wecareindustry.in/public_html/admin/manage_application.php
<?php
require('top.inc.php');
$gallary='';
$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 gallary where id='$id'");
	$check=mysqli_num_rows($res);
	if($check>0){
		$row=mysqli_fetch_assoc($res);
		$gallary=$row['gallary'];	
		
	}else{
		header('location:application.php');
		die();
	}
}
if(isset($_POST['submit'])){
	$gallary=get_safe_value($con,$_POST['gallary']);
	$res=mysqli_query($con,"select * from gallary where id='$id'");
	$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="gallary already   exist";
			}
		}else{
			$msg="gallary 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 gallary set gallary='$gallary',image='$image' where id='$id'";
		}else{
		   $update_sql="update gallary set gallary='$gallary'  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 gallary(gallary,status,image)values('$gallary',1,'$image')");
		}
		header('location:application.php');
		die();
	}
}
?>
<div class="content pb-0">
            <div class="animated fadeIn">
               <div class="row">
                  <div class="col-lg-12">
                     <div class="card">
                        <div class="card-header"><strong>gallary</strong><small> Form</small></div>
                        <form method="post" enctype="multipart/form-data">
							<div class="card-body card-block">
							   <div class="form-group">
									<label for="gallary" class=" form-control-label">gallary</label>
									<input type="text" name="gallary" placeholder="Enter gallary name" class="form-control"  value="<?php echo $gallary?>">
								</div>
								<div class="form-group">
									<label for="gallary" class=" form-control-label">Image</label>
									<input type="file" name="image" class="form-control" <?php echo  $image_required?>>
								</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>
							</div>
						</form>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         
<?php
require('footer.inc.php');
?>

Al-HUWAITI Shell