<div class="container text-justify margicso"  >
<div class="row" >






<!-----------java for selection------->
<style type="text/css">
    .box{
        padding: 20px;
        display: none;
        margin-top: 20px;
		border:1px solid #cccccc; background-color:#FFF;border-radius: 5px;
      
    }
    .red{  }
    .green{  }
    
</style>

<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $('input[name="offer"]').click(function(){
        if($(this).attr("value")=="1"){
            $(".box").not(".red .box").hide();
            $(".red .box").show();
        }
        if($(this).attr("value")=="2"){
            $(".box").not(".green .box").hide();
            $(".green .box").show();
        }
		else {}
 
    });
});
</script>
<!-----------java for selection------->




<div class="col-md-12">

<!--
<a href="#" class="pro_per" >Add New Property</a>
<a href="#" class="pro_per" >Your Properties</a>
<a href="#" class="pro_per" >Edit Contact Details</a>
<a href="#" class="pro_per" >Change Password</a>
<a href="#" class="pro_per" >Log Out</a>-->



<div class="clr2"></div>
<div class="err_msg" >
<?php
echo validation_errors();
echo $str;
?>



</div>


<form name="form1" method="post" action="" enctype="multipart/form-data">




<div class="col-md-12 add_pro_box box_shadow" >
<div class="row" >

<?php if($reg_id!=''){ ?><h3 style="text-align:left; width:100%;"><?php echo $reg_id; ?></h3><?php } ?>
<?php if($reg_date!=''){ ?><p style="text-align:left;width:100%;"><?php echo $reg_date; ?></p><?php } ?>
<h3 style="text-align:left;width:100%;">Property Description and Price</h3>

<div class="col-md-12" style="padding:0px;">

<label> Property  Tittle *</label><br />
<input type="text" name="title" class="form-control" value="<?=$title?>"  required />

</div>

<div class="clr"></div>


<div class="col-md-12" style="padding:0px;">
<div class="row" >
<div class="col-md-4">

<p>
<label>Transaction Type * &nbsp;</label><br>
<input type="radio" name="code" value="1" <?php if($code==1)echo 'checked'; ?> required />Sell
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="code" value="2" <?php if($code==2)echo 'checked'; ?> required />Rent
</p>

</div>

<div class="col-md-3" style="display:none">
<p>
<label>Featured * </label><br>
<input type="radio" name="featured" value="1" <?php if($featured==1)echo 'checked'; ?> required />Yes
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="featured" value="0" <?php if($featured==0)echo 'checked'; ?> required />No
</p>
</div>

<div class="col-md-4 padd_not">
<p>
<label>Ready to Move * </label><br>
<input type="radio" name="ready" value="1" <?php if($ready==1)echo 'checked'; ?> required />Yes
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="ready" value="0" <?php if($ready==0)echo 'checked'; ?> required />No
</p>
</div>

<div class="col-md-4">
<p>
<label>Constructed Year  </label><br>
<input type="number" name="c_year" class="form-control" value="<?=$c_year?>" />
</p>
</div>


</div>
</div>



<div class="clr"></div>



<div class="col-md-12" style="padding:0px;">
<div class="row" >
<div class="col-md-3">

<p>
<label>Category *</label><br>
<select name="category_id" class="form-control inpu_ht"  id="category_id" required >
<option value="">Select Category</option>
<?php foreach($category_result as $row_cat):?>
<option value="<?php echo $row_cat['id'] ; ?>" <?php if($category_id==$row_cat['id'])echo 'selected="selected"'; ?> >
<?=$row_cat['title']?>
</option>
<?php endforeach; ?>
</select>
</p>

</div>

<div class="col-md-3">
<p>
<label>Subcategory *</label><br />
<select name="subcategory_id" class="form-control inpu_ht"  id="subcategory_id" required >
<option value="">Select Subcategory</option>
<?php foreach($subcategory_result as $row_subcat):?>
<option value="<?php echo $row_subcat['id'] ; ?>" <?php if($subcategory_id==$row_subcat['id'])echo 'selected="selected"'; ?> >
<?=$row_subcat['title']?>
</option>
<?php endforeach; ?>
</select>
</p>

</div>

<div class="col-md-3">
<p>
<label>Ownership Type * </label><br>
<select name="brand_id" class="form-control inpu_ht" id="brand_id" required >
<option value="">Select Ownership Type</option>
<?php foreach($brand_result as $row_brand):?>
<option value="<?php echo $row_brand['id'] ; ?>" <?php if($brand_id==$row_brand['id'])echo 'selected="selected"'; ?> >
<?=$row_brand['title']?>
</option>
<?php endforeach; ?>
</select>
</p>

</div>

<div class="col-md-3">
<p>
<!--<label>Order * </label><br>-->
<input type="hidden" name="order" class="form-control" value="0"   />

<label>Total Property Cost ( <i class="fa fa-inr" aria-hidden="true"></i> ) *</label><br />
<input type="number" name="price" class="form-control" value="<?=$price?>" required />



<!--
<select class="form-control border-radius-3 field-total-price" id="price" name="price" required >
<option value="">-- Select --</option>
<?php foreach($unit_result as $row_unit):?>
<option value="<?php echo $row_unit['id'] ; ?>" <?php if($price==$row_unit['id'])echo 'selected="selected"'; ?> >
<?=$row_unit['title']?>
</option>
<?php endforeach; ?>
</select>
</p>-->
</div>

</div>
</div>



<div class="clr"></div>


</div>
</div>



<div class="col-md-12 add_pro_box2 box_shadow" >
<div class="row" >
<div class="col-md-12">
<h3 style="text-align:left;">Extra Information</h3>
</div>


<div class="col-md-3">


<p>

<label>How many Cent/Acre land?  </label><br />
<?php if($land==0) { $land='';} ?>
<input type="text" name="land" class="form-control" value="<?=$land?>"  />

</p>

</div>


<div class="col-md-3">
<p>
<label>Land Unit</label><br>
<select name="land_unit" class="form-control inpu_ht" id="land_unit"  >
<option value="">Select Unit</option>
<option value="1" <?php if($land_unit==1)echo 'selected="selected"'; ?> >cent</option>
<option value="1" <?php if($land_unit==2)echo 'selected="selected"'; ?> >acre</option>
</select>
</p>

</div>


<div class="col-md-3">


<p>

<label>Building Area </label><br />
<?php if($stock2==0) { $stock2='';} ?>
<input type="text" name="stock2" class="form-control" value="<?=$stock2?>"  />

</p>

</div>


<div class="col-md-3">
<p>
<label>building Area Unit</label><br>
<select name="unit_id" class="form-control inpu_ht" id="unit_id"  >
<option value="">Select Unit</option>
<option value="1" <?php if($unit_id==1)echo 'selected="selected"'; ?> >Sq-Ft</option>
<option value="2" <?php if($unit_id==2)echo 'selected="selected"'; ?> >Sq-M</option>
<option value="3" <?php if($unit_id==3)echo 'selected="selected"'; ?> >Sq-Yrd</option>
</select>
</p>

</div>






<div class="clr"></div>

<div class="col-md-12" >
<div class="row">
<div class="col-md-3">
<p>
<label>Bed Rooms  </label><br />
<select name="bed"  class="form-control inpu_ht"   >
<option value="">-Select-</option>
<?php for($i=1;$i<=20;$i++): ?>
<option value="<?=$i?>" <?php if($i==$bed){echo 'selected="selected"';}?> ><?=$i?></option>
<?php endfor; ?>
</select>
</p>
</div>
<div class="col-md-3">

<p>
<label>Bath rooms </label><br>
<select name="bath"  class="form-control inpu_ht"   >
<option value="">-Select-</option>
<?php for($i=1;$i<=20;$i++): ?>
<option value="<?=$i?>" <?php if($i==$bath){echo 'selected="selected"';}?> ><?=$i?></option>
<?php endfor; ?>

    
    </select>
</p>
</div>


<div class="col-md-6">
<!--<p>
<label>Youtube URL Link (Like https://www.youtube.com/watch?v=8zAiTMoYvQ0)</label><br>

</p>-->
<input type="hidden" class="form-control" name="offer_det" value="<?=$offer_det?>" />


</div>


</div>
</div>






<div class="col-md-12">

<p>
<label>Description </label><br />
<textarea name="text" class="form-control" style="height:100px"  ><?=$text?></textarea>
</p>

</div>



<div class="clr"></div>

</div>
</div>


<div class="col-md-12 add_pro_box2 box_shadow" >
<div class="row">


<div class="col-md-12" >
<h3 style="text-align:left;">property Location</h3>
</div>

<div class="col-md-12" style="padding:0px;">
<div class="row">




<div class="col-md-4">
<p>
<label>Property(House) Name / Number</label><br>
<input type="text" name="pname"  value="<?=$pname?>" class="form-control"  />
</p>
</div>



<div class="col-md-4">
<p>
<label> Property  Street</label><br>
<input type="text" name="pstreet1"   value="<?=$pstreet1?>" class="form-control"  />
</p>
</div>


<div class="col-md-4">
<p>
<label>Property  Locality</label><br>
<input type="text" name="pstreet2" value="<?=$pstreet2?>" class="form-control"  />
</p>
</div>





<div class="col-md-3">
<p>
<label>State *</label><br>
<select name="state_id" class="form-control inpu_ht" id="state_id" required >
<option value="18">Kerala</option>

</select>
</p>
</div>


<div class="col-md-3">
<p>
<label>District *</label><br>
<select name="dist_id" class="form-control inpu_ht" id="dist_id" required >
<option value="">District</option>
<?php foreach($dist_result as $row_dist):?>
<option value="<?php echo $row_dist['id'] ; ?>" <?php if($dist_id==$row_dist['id'])echo 'selected="selected"'; ?> >
<?=$row_dist['name']?>
</option>
<?php endforeach; ?>
</select>
</p>
</div>




<div class="col-md-3">
<p>
<label>Property City *</label><br>


<select name="city_mainid" class="form-control inpu_ht" id="city_mainid" required >
<option value="">City</option>
<?php foreach($city_result as $row_city):?>
<option value="<?php echo $row_city['id'] ; ?>" <?php if($city_mainid==$row_city['id'])echo 'selected="selected"'; ?> >
<?=$row_city['title']?>
</option>
<?php endforeach; ?>
</select>


<!--<input type="text"  name="city_mainid" value="<?=$city_mainid?>" class="form-control" id="city_mainid"  />-->
</p>
</div>



<div class="col-md-3">
<p>
<label>Property Post Office </label><br>
<select name="post_id" class="form-control inpu_ht" id="post_id"  >
<option value="">Post Office</option>
<?php foreach($post_result as $row_post):?>
<option value="<?php echo $row_post['id'] ; ?>" <?php if($post_id==$row_post['id'])echo 'selected="selected"'; ?> >
<?=$row_post['officename']?>
</option>
<?php endforeach; ?>
</select>
</p>
</div>



</div>
</div>


</div>
</div>


<div class="clr"></div>


<div class="col-md-12 add_pro_box2 box_shadow" >

<div class="col-md-12 padd_not">
<h3 style="text-align:left;">property Media</h3>
</div>


<div class="col-md-12 padd_not">

</div>
<div class="clr"></div>



<div class="col-md-12 padd_not">
<div class="row">
<div class="col-md-6">

<div class="col-md-12 padd_not">
<label>Image1 (  Maxsize 5 MB )</label><br />
<input type="file" name="img" class="form-control" />&nbsp;&nbsp;&nbsp;
<?php if($img!=''){?>

<img src="<?php echo base_url('assets/images/'.$img) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/1/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
<br/><br />
</div>

<div class="col-md-12 padd_not"   >

<label>Image2 (  Maxsize 5 MB)</label><br />

<input type="file" name="img2"  class="form-control"  />&nbsp;&nbsp;&nbsp;

<?php if($img2!=''){?>
<img src="<?php echo base_url('assets/images/'.$img2) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/2/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />

</a> 

<?php } ?>
<br/><br />
</div>

<div class="col-md-12 padd_not" >

<label>Image3 (  Maxsize 5 MB)</label><br />
<input type="file" name="img3"  class="form-control"  />&nbsp;&nbsp;&nbsp;

<?php if($img3!=''){?>
<img src="<?php echo base_url('assets/images/'.$img3) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/3/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />

</a> 

<?php } ?>
<br/><br />
</div>


<div class="col-md-12 padd_not">
<label>Image4 (  Maxsize 5 MB )</label><br />
<input type="file" name="img4"  class="form-control"  />&nbsp;&nbsp;&nbsp;
<?php if($img4!=''){?>

<img src="<?php echo base_url('assets/images/'.$img4) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/4/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
<br/><br />
</div>

</div>



<div class="col-md-6">



<div class="col-md-12 padd_not"   >

<label>Image5 (  Maxsize 5 MB)</label><br />

<input type="file" name="img5"  class="form-control" />&nbsp;&nbsp;&nbsp;

<?php if($img5!=''){?>
<img src="<?php echo base_url('assets/images/'.$img5) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/5/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />

</a> 

<?php } ?>
<br/><br />
</div>

<div class="col-md-12 padd_not" >
<label>Image6 (  Maxsize 5 MB)</label><br />
<input type="file" name="img6"  class="form-control"  />&nbsp;&nbsp;&nbsp;
<?php if($img6!=''){?>
<img src="<?php echo base_url('assets/images/'.$img6) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/6/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
<br/><br />
</div>



<div class="col-md-12 padd_not" >
<label>Image7 (  Maxsize 5 MB)</label><br />
<input type="file" name="img7"  class="form-control"  />&nbsp;&nbsp;&nbsp;
<?php if($img7!=''){?>
<img src="<?php echo base_url('assets/images/'.$img7) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/7/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
<br/><br />
</div>


<div class="col-md-12 padd_not" >
<label>Image8 (  Maxsize 5 MB)</label><br />
<input type="file" name="img8"  class="form-control"  />&nbsp;&nbsp;&nbsp;
<?php if($img8!=''){?>
<img src="<?php echo base_url('assets/images/'.$img8) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('Property/image_delete/'.$aid.'/8/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
<br/><br />
</div>




</div>
</div>
</div>

<div class="col-md-6" style="display:none;">
<h4 style="margin-top:0px;"> For SEO  </h4>


<div class="row">
<div class="col-md-12 padd_not">

<label> Title </label><br />

<input type="text" name="titl" class="form-control" value="<?=$titl?>" />

</div> 

</div>



<div class="row">
<div class="col-md-12 padd_not">

<label>Keyword </label><br />

<input type="text" name="keyword" class="form-control"  value="<?=$keyword?>" />

</div>

</div>





<div class="row">
<div class="col-md-12">



<label> Description </label><br />

<!--<input type="text" name="desc" class="form-control" value="<?=$desc?>" />-->

<textarea name="desc" class="form-control" rows="5"  ><?=$desc?></textarea>




</div>
</div>


</div>

</div>


<div class="col-md-12 add_pro_box2 box_shadow" >
<div class="row">

<div class="col-md-12">
<h3 style="text-align:left;">Contact Information</h3>
</div>


<div class="col-md-4">
<p>
<label>Contact Person</label><br>
<input type="text" name="cperson"  value="<?=$cperson?>" class="form-control "  />
</p>
</div>


<div class="col-md-4">
<p>
<label>Contact Number</label><br>
<input type="text" name="cnumber"  value="<?=$cnumber?>"  class="form-control "  />
</p>
</div>


<div class="col-md-4">
<p>
<label>Contact Person Email</label><br>
<input type="text"  name="cemail" value="<?=$cemail?>" class="form-control "  />
</p>
</div>

</div>
</div>










<p>&nbsp;</p>
<p><input name="submit" class="btn btn-lg btn-primary btn-block btn2" value="Submit Property" type="submit" style="width:200px;" ></p>


</form>


</div>




















</div>
</div>