| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/views/scripts/airport/ |
Upload File : |
<?php
$customers = $this->customerList;
$form = $this->form;
?>
<!--Page main section start-->
<section id="min-wrapper" class="active">
<div id="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!--Top header start-->
<h3 class="ls-top-header"><?php echo $this->strPageTitle ?></h3>
<!--Top header end -->
<!--Top breadcrumb start -->
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-home"></i></a></li>
<li class="active">Settting</li><li class="active">Add Airport</li>
</ol>
<!--Top breadcrumb start -->
</div>
<!-- Error Msg Row Start -->
<div class="col-md-12">
<?php if (count($this->messages)) { ?>
<div class="alert alert-success" >
<button data-dismiss="alert" class="close" type="button">x</button>
<?php foreach ($this->messages as $message) { ?>
<?php echo $this->escape($message); ?>
<?php } ?>
</div>
<?php } ?>
<?php if (@$this->eMsg != '') { ?>
<div class="alert alert-danger" >
<button data-dismiss="alert" class="close" type="button">x</button>
<?php echo $this->eMsg; ?>
</div>
<?php } ?>
</div>
<!-- Error Msg Row End -->
</div>
<!-- Main Content Element Start-->
<div class="row">
<form action="<?php echo $this->form->getAction(); ?>" method="<?php echo $this->form->getMethod(); ?>" name="<?php echo $this->form->getName(); ?>" id="<?php echo $this->form->getName(); ?>" enctype="multipart/form-data">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Add Airport</h3>
</div>
<div class="panel-body">
<div class="col-md-3">
<div class="form-group">
<label>Country<?php echo MANDATORY_SIGN; ?></label>
<?php echo $form->countryList; ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>City<?php echo MANDATORY_SIGN; ?></label>
<div id="cityNameList">
<select id="cityList" name="cityList" class="demo-default select-country"><option value="">Select City</option></select>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>Airport Title <?php echo MANDATORY_SIGN; ?></label>
<?php echo $form->Title; ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>Airport Code <?php echo MANDATORY_SIGN; ?></label>
<?php echo $form->Code; ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>Latitude</label> : <a href="javascript:void(0);" onclick="getLatLong();" id="getLatLong_anchor">Get Lat Long From Google Map</a>
<?php echo $form->Latitude; ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>Longitude</label>
<?php echo $form->Longitude; ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12 no-padding no-margin">
<div class="panel-footer text-right">
<!--<input type="submit" class="btn btn-success" name="submit" value="Submit"/>-->
<button class="submit btn btn-success" type="submit" name="submit">Submit</button>
<!--<a class="btn btn-success" href="#">Submit</a>-->
<a href="<?php echo $this->baseUrl("airport"); ?>" class="btn btn-default">Cancel</a>
</div>
</div>
</form>
</div>
<!-- Main Content Element End-->
</div>
</div>
<?php echo $this->render('copyrightfooter.phtml'); ?>
</section>
<!-- ********* validation start **************-->
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
<script type="text/javascript">
$(document).ready(function () {
$.validator.setDefaults({
/*OBSERVATION (1): note the options used for "ignore"*/
ignore: ':not(select:hidden, input:visible, textarea:visible)',
/*...other options omitted to focus on the OP...*/
});
$("#addAirportForm").validate({
ignore: '*:not([name])',
// debug: true,
highlight: function (error, element) {
var name = $(element).attr("name");
$("input[name=" + name + "]").removeClass('error');
},
ignore: [],
rules : {
'Title' : {required : true},
'Code' : {required : true},
'countryList' : {required : true},
'cityList' : {required : true}
},
messages : {
Title: "Please enter airport title",
Code : "Please enter airport code",
countryList : "Please select country",
cityList : "Please select city",
}
});
});
function getCityAjax(){
var cid = $('#countryList').val();
$.ajax({
url: '/airport/getcityajax',
data: 'countryid=' + cid,
type: 'POST',
beforeSend: function (data) {
},
success: function (response) {
$("#cityNameList").html(response);
},
error:function(){
alert("fail : Please try after some time");
}
});
}
function getLatLong() {
var address1 = $("#Code").val();
//var address2 = $("#cityList").val();
//var address3 = $("#countryList").val();
//var address = address1 + ' ' + address2 + ' ' + address3;
var address = address1;
/* if(!$.trim(address)) {
alert("Please fill address first.");
return false;
} */
$.ajax({
beforeSend : showLoader, // show loader
url : '/airport/getlocation',
data : {address : address},
type : 'POST',
dataType : 'json',
success : function(response) {
$("#Latitude").val(response.latitude);
$("#Longitude").val(response.longitude);
hideLoader(); // hide loader
}
});
}
function showLoader()
{
$("#getLatLong_anchor").html('<img src="/public/assets/images/loading.gif" alt="Loading..." width="20" />');
}
function hideLoader()
{
$("#getLatLong_anchor").html('Get Lat Long From Google Map');
}
</script>
<!-- ********* validation end **************-->
<!--Page main section end -->
<?php echo $this->render("newfooter.phtml"); ?>