GOOGLE
<?php include("header.php");?>
<script src="../jquery.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker();
} );
$( function() {
$( "#datepicker1" ).datepicker();
} );
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#country').on('change',function(){
var countryID = $(this).val();
if(countryID){
$.ajax({
type:'POST',
url:'ajaxData.php',
data:'country_id='+countryID,
success:function(html){
$('#state').html(html);
$('#city').html('<option value="">Select state first</option>');
}
});
}else{
$('#state').html('<option value="">Select country first</option>');
$('#city').html('<option value="">Select state first</option>');
}
});
$('#state').on('change',function(){
var stateID = $(this).val();
if(stateID){
$.ajax({
type:'POST',
url:'ajaxData.php',
data:'state_id='+stateID,
success:function(html){
$('#city').html(html);
}
});
}else{
$('#city').html('<option value="">Select state first</option>');
}
});
});
</script>
<!-- start: Header -->
<div class="navbar">
<div class="navbar-inner">
<?php include("top_header.php");?>
</div>
</div>
<!-- start: Header -->
<div class="container-fluid-full">
<div class="row-fluid">
<!-- start: Main Menu -->
<?php include("sidebar.php");?>
<!-- end: Main Menu -->
<noscript>
<div class="alert alert-block span10">
<h4 class="alert-heading">Warning!</h4>
<p>You need to have <a href="" target="_blank">JavaScript</a> enabled to use this site.</p>
</div>
</noscript>
<!-- start: Content -->
<div id="content" class="span10">
<ul class="breadcrumb">
<li>
<i class="icon-home"></i>
<a href="index.html">Home</a>
<i class="icon-angle-right"></i>
</li>
<li><a href="#">Dashboard</a></li>
</ul>
<div class="row-fluid sortable">
<div class="box span12">
<div class="box-header" data-original-title>
<h2><i class="halflings-icon edit"></i><span class="break"></span>Edit Listing Here</h2>
<div class="box-icon">
<a href="#" class="btn-setting"><i class="halflings-icon wrench"></i></a>
<a href="#" class="btn-minimize"><i class="halflings-icon chevron-up"></i></a>
<a href="#" class="btn-close"><i class="halflings-icon remove"></i></a>
</div>
</div>
<div class="box-content">
<?php $ListSql = mysql_query("select * from `listing` where `id`='".$_GET['id']."'");
$res = mysql_fetch_array($ListSql);
$imgext = $res['main_image'];
$imgext1 = $res['sub_image1'];
$imgext2 = $res['sub_image2'];
$imgext3 = $res['sub_image3'];?>
<?php
$id = $_GET['id'];
$target_dir = "../upload/listing/";
if($_FILES['main_image']['name'])
{
$RandomAccountNumber = mt_rand(1, 9999999999999999);
$image_name = $_FILES['main_image']['name'];
$ext = pathinfo($image_name, PATHINFO_EXTENSION);
$imgext = $RandomAccountNumber.'.'.$ext;
$target_file = $target_dir . basename($imgext);
move_uploaded_file($_FILES["main_image"]["tmp_name"], $target_file);
}
if($_FILES['sub_image1']['name'])
{
$RandomAccountNumber1 = mt_rand(1, 9999999999999999);
$image_name1 = $_FILES['sub_image1']['name'];
$target_dir = "../upload/listing/";
$ext1 = pathinfo($image_name1, PATHINFO_EXTENSION);
$imgext1 = $RandomAccountNumber1.'.'.$ext1;
$target_file1 = $target_dir . basename($imgext1);
move_uploaded_file($_FILES["sub_image1"]["tmp_name"], $target_file1);
}
if($_FILES['sub_image2']['name'])
{
$RandomAccountNumber2 = mt_rand(1, 9999999999999999);
$image_name2 = $_FILES['sub_image2']['name'];
$target_dir = "../upload/listing/";
$ext2 = pathinfo($image_name2, PATHINFO_EXTENSION);
$imgext2 = $RandomAccountNumber2.'.'.$ext2;
$target_dir = "../upload/listing/";
$target_file2 = $target_dir . basename($imgext2);
move_uploaded_file($_FILES["sub_image2"]["tmp_name"], $target_file2);
}
if($_FILES['sub_image3']['name'])
{
$RandomAccountNumber3 = mt_rand(1, 9999999999999999);
$image_name3 = $_FILES['sub_image3']['name'];
$target_dir = "../upload/listing/";
$ext3 = pathinfo($image_name3, PATHINFO_EXTENSION);
$imgext3 = $RandomAccountNumber3.'.'.$ext3;
$target_dir = "../upload/listing/";
$target_file3= $target_dir . basename($imgext3);
move_uploaded_file($_FILES["sub_image3"]["tmp_name"], $target_file3);
}
if(isset($_POST['submit']))
{
extract($_POST);
if($listing_name!="")
{
$update = mysql_query("update `listing` set `listing_name`='".$listing_name."',`category_name`='".$category_name."',`sub_category_name`='".$sub_category_name."',`plan`='".addslashes($plan)."',`start_date`='".$start_date."',`end_date`='".$end_date."',`mobile`='".$mobile."',`landline`='".$landline."',`site_address`='".addslashes($site_address)."',`c_address`='".addslashes($c_address)."',`google_map`='".addslashes($google_map)."',`main_image`='".$imgext."',`sub_image1`='".$imgext1."',`sub_image2`='".$imgext2."',`sub_image3`='".$imgext3."',`description`='".addslashes($description)."',`plan`='".$plan."',`date_time`= now() where `id`='".$_GET['id']."'");
?>
<script>
window.location.href='view_listing.php?id=<?php echo $_GET['ids']; ?>';
</script>
<?php
}
}
?>
<script src="fSelect.js"></script>
<form class="form-horizontal" method="POST" enctype="multipart/form-data">
<fieldset>
<div class="control-group">
<label class="control-label" for="date01">Listing Name</label>
<div class="controls">
<input type="text" value="<?php echo $res['listing_name'];?>" name="listing_name">
</div>
</div>
<div class="control-group">
<label class="control-label" for="typeahead">Select Category Here </label>
<div class="controls">
<?php $query = $db->query("SELECT * FROM category order by category_name asc");
$rowCount = $query->num_rows;
?>
<?php $Cate = mysql_query("select `category_name`,`id` from `category` where `id`='".$res['category_name']."'");
$SELCate = mysql_fetch_array($Cate);?>
<select id="country" class="form-control" data-rel="chosen" name="category_name">
<option value="<?php echo $SELCate['id'];?>"><?php if($SELCate['category_name']!=""){echo $SELCate['category_name'];}else{?>Select Category<?php } ?></option>
<?php
if($rowCount > 0){
while($row = $query->fetch_assoc()){
echo '<option value="'.$row['id'].'">'.$row['category_name'].'</option>';
}
}else{
echo '<option value="">Category not available</option>';
}
?>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="typeahead">Select Sub Category </label>
<div class="controls">
<select name="sub_category_name" id="state" class="form-control" >
<?php $SubCate = mysql_query("select `sub_cate_name`,`id` from `sub_category` where `id`='".$res['sub_category_name']."'");
$SubSELCate = mysql_fetch_array($SubCate);?>
<option value="<?php echo $SubSELCate['id'];?>"><?php if($SubSELCate['sub_cate_name']!=""){ echo $SubSELCate['sub_cate_name'];}else{?>Select Category first<?php } ?></option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="typeahead">Select Plan</label>
<div class="controls">
<select class="form-control" data-rel="chosen" name="plan">
<option value="<?php echo $res['plan'];?>"><?php if($res['plan']!=""){ echo $res['plan'];}else{?>Select plan
<?php } ?></option>
<option value="basic">BASIC PLAN</option>
<option value="bronze">BRONZE PLAN</option>
<option value="silver">SILVER PLAN</option>
<option value="gold">GOLDEN PLAN</option>
</select>
<!--<input type="text" class="span6 typeahead" id="typeahead" data-provide="typeahead" data-items="4" data-source='["<?php echo $row['category_name'];?>"]'>-->
</div>
</div>
<div class="control-group">
<label class="control-label" for="date01">Start Date</label>
<div class="controls">
<input type="text" id="datepicker" value="<?php echo $res['start_date'];?>" name="start_date">
</div>
</div>
<div class="control-group">
<label class="control-label" for="date01">End Date</label>
<div class="controls">
<input type="text" id="datepicker1" value="<?php echo $res['end_date'];?>" name="end_date">
</div>
</div>
<div class="control-group">
<label class="control-label" for="date01">Mobile Number</label>
<div class="controls">
<input type="text" value="<?php echo $res['mobile'];?>" name="mobile">
</div>
</div>
<div class="control-group">
<label class="control-label" for="date01">Land Line Number</label>
<div class="controls">
<input type="text" value="<?php echo $res['landline'];?>" name="landline">
</div>
</div>
<div class="control-group hidden-phone">
<label class="control-label" for="textarea2">Site Address</label>
<div class="controls">
<textarea class="cleditor" id="textarea2" rows="3" name="site_address"><?php echo $res['site_address'];?></textarea>
</div>
</div>
<div class="control-group hidden-phone">
<label class="control-label" for="textarea2">Correspondence Address</label>
<div class="controls">
<textarea class="cleditor" id="textarea2" rows="3" name="c_address"><?php echo $res['c_address'];?></textarea>
</div>
</div>
<div class="control-group hidden-phone">
<label class="control-label" for="textarea2">Deal In</label>
<div class="controls">
<textarea class="cleditor" id="textarea2" rows="3" name="description"><?php echo $res['description'];?></textarea>
</div>
</div>
<div class="control-group hidden-phone">
<label class="control-label" for="textarea2">Google Map</label>
<div class="controls">
<textarea class="cleditor" id="textarea2" rows="3" name="google_map"><?php echo $res['google_map'];?></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fileInput">Main Image</label>
<div class="controls">
<input class="input-file uniform_on" id="fileInput" type="file" name="main_image">
<img src="../upload/listing/<?php echo $res['main_image'];?>" width="80"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fileInput">Sub Image</label>
<div class="controls">
<input class="input-file uniform_on" id="fileInput" type="file" name="sub_image1">
<img src="../upload/listing/<?php echo $res['sub_image1'];?>" width="80"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fileInput">Sub Image</label>
<div class="controls">
<input class="input-file uniform_on" id="fileInput" type="file" name="sub_image2">
<img src="../upload/listing/<?php echo $res['sub_image2'];?>" width="80"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fileInput">Sub Image</label>
<div class="controls">
<input class="input-file uniform_on" id="fileInput" type="file" name="sub_image3">
<img src="../upload/listing/<?php echo $res['sub_image3'];?>" width="80"/>
</div>
</div>
<!--<div class="control-group hidden-phone">
<label class="control-label" for="textarea2">Information</label>
<div class="controls">
<textarea class="cleditor" id="textarea2" rows="3" name="description"></textarea>
</div>
</div>-->
<div class="form-actions">
<input type="submit" class="btn btn-primary" value="Save changes" name="submit"></button>
<a href="manage_listing.php?id=<?php echo $_GET['ids'];?>" class="btn" name="Cancel" >Cancel</a>
</div>
</fieldset>
</form>
</div>
</div><!--/span-->
</div>
</div><!--/.fluid-container-->
<!-- end: Content -->
</div><!--/#content.span10-->
</div><!--/fluid-row-->
<div class="modal hide fade" id="myModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Settings</h3>
</div>
<div class="modal-body">
<p>Here settings can be configured...</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div>
<div class="clearfix"></div>
<footer>
<p>
<span style="text-align:left;float:left">© 2013 <a href="http://jiji262.github.io/Bootstrap_Metro_Dashboard/" alt="Bootstrap_Metro_Dashboard">Bootstrap Metro Dashboard</a></span>
</p>
</footer>
<script type="text/javascript">
$(document).ready(function(){
$('#countryID').on('change',function(){
var countryID = $(this).val();
if(countryID){
$.ajax({
type:'POST',
url:'ajaxDatalist.php',
data:'country_id='+countryID,
success:function(html){
alert(html);
$('#stateID').html(html);
$('#city').html('<option value="">Select state first</option>');
}
});
}else{
$('#stateID').html('<option value="">Select Category first</option>');
}
});
});
</script>
<style type="text/css">
.fs-wrap {
display: inline-block;
cursor: pointer;
line-height: 1;
width: 577px;
}
.fs-label-wrap {
position: relative;
background-color: #fff;
border: 1px solid #ddd;
cursor: default;
}
.fs-label-wrap,
.fs-dropdown {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.fs-label-wrap .fs-label {
padding: 6px 22px 6px 8px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.fs-arrow {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #333;
position: absolute;
top: 0;
right: 5px;
bottom: 0;
margin: auto;
}
.fs-dropdown {
position: absolute;
background-color: #fff;
border: 1px solid #ddd;
width: 577px;
margin-top: 5px;
z-index: 1000;
}
.fs-dropdown .fs-options {
max-height: 200px;
overflow: auto;
}
.fs-search input {
border: none !important;
box-shadow: none !important;
outline: none;
padding: 4px 0;
width: 100%;
}
.fs-option,
.fs-search,
.fs-optgroup-label {
padding: 6px 8px;
border-bottom: 1px solid #eee;
cursor: default;
}
.fs-option:last-child {
border-bottom: none;
}
.fs-search {
padding: 0 4px;
}
.fs-option {
cursor: pointer;
}
.fs-option.disabled {
opacity: 0.4;
cursor: default;
}
.fs-option.hl {
background-color: #f5f5f5;
}
.fs-wrap.multiple .fs-option {
position: relative;
padding-left: 30px;
}
.fs-wrap.multiple .fs-checkbox {
position: absolute;
display: block;
width: 30px;
top: 0;
left: 0;
bottom: 0;
}
.fs-wrap.multiple .fs-option .fs-checkbox i {
position: absolute;
margin: auto;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 14px;
height: 14px;
border: 1px solid #aeaeae;
border-radius: 2px;
background-color: #fff;
}
.fs-wrap.multiple .fs-option.selected .fs-checkbox i {
background-color: rgb(17, 169, 17);
border-color: transparent;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAABMSURBVAiZfc0xDkAAFIPhd2Kr1WRjcAExuIgzGUTIZ/AkImjSofnbNBAfHvzAHjOKNzhiQ42IDFXCDivaaxAJd0xYshT3QqBxqnxeHvhunpu23xnmAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-position: center;
}
.fs-optgroup-label {
font-weight: bold;
text-align: center;
}
.hidden {
display: none;
}
</style>
<!-- start: JavaScript-->
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery-migrate-1.0.0.min.js"></script>
<script src="js/jquery-ui-1.10.0.custom.min.js"></script>
<script src="js/jquery.ui.touch-punch.js"></script>
<script src="js/modernizr.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src='js/fullcalendar.min.js'></script>
<script src='js/jquery.dataTables.min.js'></script>
<script src="js/excanvas.js"></script>
<script src="js/jquery.flot.js"></script>
<script src="js/jquery.flot.pie.js"></script>
<script src="js/jquery.flot.stack.js"></script>
<script src="js/jquery.flot.resize.min.js"></script>
<script src="js/jquery.chosen.min.js"></script>
<script src="js/jquery.uniform.min.js"></script>
<script src="js/jquery.cleditor.min.js"></script>
<script src="js/jquery.noty.js"></script>
<script src="js/jquery.elfinder.min.js"></script>
<script src="js/jquery.raty.min.js"></script>
<script src="js/jquery.iphone.toggle.js"></script>
<script src="js/jquery.uploadify-3.1.min.js"></script>
<script src="js/jquery.gritter.min.js"></script>
<script src="js/jquery.imagesloaded.js"></script>
<script src="js/jquery.masonry.min.js"></script>
<script src="js/jquery.knob.modified.js"></script>
<script src="js/jquery.sparkline.min.js"></script>
<script src="js/counter.js"></script>
<script src="js/retina.js"></script>
<script src="js/custom.js"></script>
<!-- end: JavaScript-->
</body>
</html>
Copyright © 1945 -