Preview: add-customer.php
Size: 12.53 KB
/home/urbanman/roadkaraja.in/employee/add-customer.php
<?php
error_reporting(0);
include("common.php");
include("config.php");
$mb = $_GET[mnumber];
?>
<script type="text/javascript">
function EnableDisableTextBox(ddlModels) {
var selectedValue = ddlModels.options[ddlModels.selectedIndex].value;
var txtOther = document.getElementById("txtOther");
txtOther.disabled = selectedValue == 5 ? false : true;
if (!txtOther.disabled) {
txtOther.focus();
}
}
</script>
<!-- START: Main Content-->
<main>
<div class="container-fluid">
<!-- START: Breadcrumbs-->
<div class="row ">
<div class="col-12 align-self-center">
<div class="sub-header mt-3 py-3 px-3 align-self-center d-sm-flex w-100 rounded">
<div class="w-sm-100 mr-auto"><h4 class="mb-0">Welcome to <?php echo ucwords($_SESSION['empname']);?>/<?php echo ucwords($_SESSION['branch']);?></h4></div>
</div>
</div>
</div>
<!-- END: Breadcrumbs-->
<!-- START: Card Data-->
<div class="row row-eq-height">
<div class="col-12 mt-3">
<div class="card h-100">
<div class="card-header">
<h4 class="card-title"> Customer Management <?php if($_GET[flag]=='exist'){?> <b> <font color="yellow"> Sorry. mobile number already registered.</font></b> <?php }?> </h4>
</div>
<div class="card-content">
<div class="card-body py-5">
<form class="form-row" action="submit-customer.php" method="POST">
<input type="hidden" name="empname" id="empname" class="form-control" value="<?php echo ucwords($_SESSION['empname']);?>" >
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputCity">Driver Name</label>
<input type="text" required style="text-transform: uppercase;" id="alpha-only-input" name="cname" class="form-control" placeholder="Enter Driver Name">
</div>
<div class="form-group col-md-3">
<label for="inputCity">Driver Mobile Number 1 </label>
<input type="text" required maxlength="10" name="mobile" onkeypress="return isNumberKey(event)" class="form-control" value="<?php echo $mb;?>" placeholder="Enter 10 digit Mobile Number" id="mobile">
</div>
<div class="form-group col-md-3">
<label for="inputCity">Driver Mobile Number 2 (optional) </label>
<input type="text" maxlength="10" name="mobile2" onkeypress="return isNumberKey(event)" class="form-control" value="<?php echo $_GET[mnumber2];?>" placeholder="Enter 10 digit Mobile Number 2" id="mobile2">
</div>
<div class="form-group col-md-6">
<label for="inputCity">Vehicle Number <font color="blue"><small>(format: MH31CS8367)</small> </font> </label> <br>
<input type="text" required maxlength="10" name="vnumber" value="<?php echo $_GET[vnumber];?>" style="text-transform:uppercase;color:blue;font-weight:bold;" placeholder="Enter Vehicle Number" class="form-control" id="vnumber">
</div>
<div class="form-group col-md-3">
Vehicle Type
<select name="vehicletyp" style="width:200px;text-transform:uppercase;" id="vehicletyp" class="form-control" required>
<option value="">Select </option>
<?php
$que2=sprintf("select * from vtype");
if (!($page1 = mysql_query($que2))) { echo "FOR QUERY: $strsql<BR>".mysql_error(); exit;}
while($row=mysql_fetch_array($page1)){?>
<option value="<?php echo $row['vtype'];?>"><?php echo $row['vtype'];?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-3">
<?php
date_default_timezone_set("Asia/Kolkata");
?>
<label for="inputCity">Registraton Date/Time </label>
<input type="text" readonly name="rdte" value="<?php echo date("d/m/Y");?> <?php echo date('h:i:s A');?>" style="width:200px;background-color:#eff2f5;" class="form-control" id="rdte">
<input type="hidden" name="regdate" value="<?php echo date("Y/m/d");?>" style="width:200px" class="form-control" id="regdate">
<input type="hidden" name="rtime" value="<?php echo date('h:i:s A');?>" style="width:200px" class="form-control" id="rtime">
</div>
<div class="form-group col-md-6">
<label for="inputCity">Route – From and To </label>
<input type="text" name="routefrom" id="alpha-only-input1" style="height:33px;border-radius:4px;border:1px solid #ddd;text-transform:uppercase;" placeholder="Enter Route From " >
<input type="text" name="routeto" id="alpha-only-input2" style="height:33px;border-radius:4px;border:1px solid #ddd;text-transform:uppercase;" placeholder="Enter Route To" >
</div>
<div class="form-group col-md-6">
<select name="urea" style="width:200px;text-transform:uppercase;" id="urea" class="form-control" required>
<option value="">Select Urea Required</option>
<option value="Yes ">Yes </option>
<option value="No">No </option>
</select>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputCity">Company Name</label>
<input type="text" name="companyname" class="form-control" style="text-transform:uppercase;" placeholder="Enter Company Name" id="alpha-only-input3">
</div>
<div class="form-group col-md-4">
<label for="inputCity">Owner Name</label>
<input type="text" name="owner" class="form-control" style="text-transform:uppercase;" placeholder="Enter Owner Name" id="alpha-only-input4">
</div>
<div class="form-group col-md-4">
<label for="inputCity">Owner Mobile</label>
<input type="text" maxlength="10" name="ownermobile" onkeypress="return isNumberKey(event)" class="form-control" placeholder="Enter Owner Mobile" >
</div>
<div class="form-group input-primary col-sm-12 mb-4">
<input type="radio" hidden checked name="cardtyp" value="Regular Card" id="cardtyp">
<input type="hidden" name="fueltyp" value="Petrol/Disel">
<input type="submit" class="btn btn-primary" value="Submit"> </button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- END: Card DATA-->
</div>
</main>
<!-- END: Content-->
<!-- START: Back to top-->
<a href="#" class="scrollup text-center">
<i class="icon-arrow-up"></i>
</a>
<!-- END: Back to top-->
<!-- START: Template JS-->
<script src="dist/vendors/jquery/jquery-3.3.1.min.js"></script>
<script src="dist/vendors/jquery-ui/jquery-ui.min.js"></script>
<script src="dist/vendors/moment/moment.js"></script>
<!-- <script src="dist/vendors/bootstrap/js/bootstrap.bundle.min.js"></script> -->
<script src="dist/vendors/slimscroll/jquery.slimscroll.min.js"></script>
<script src="dist/vendors/flag-select/js/jquery.flagstrap.min.js"></script>
<!-- END: Template JS-->
<!-- START: APP JS-->
<script src="dist/js/app.js"></script>
<script>
function isNumberKey(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode;
if (charCode != 46 && charCode > 31
&& (charCode < 48 || charCode > 57))
return false;
return true;
}
</script>
<script>
const alphaOnlyInput = document.getElementById('alpha-only-input'),
alphaOnlyPattern = new RegExp('^[a-zA-Z ]+$')
let previousValue = ''
alphaOnlyInput.addEventListener('input', (e) => {
let currentValue = alphaOnlyInput.value
if (e.inputType.includes('delete') || alphaOnlyPattern.test(currentValue)) {
previousValue = currentValue
}
alphaOnlyInput.value = previousValue
})
const alphaOnlyInput1 = document.getElementById('alpha-only-input1'),
alphaOnlyPattern1 = new RegExp('^[a-zA-Z ]+$')
let previousValue1 = ''
alphaOnlyInput1.addEventListener('input', (e) => {
let currentValue1 = alphaOnlyInput1.value
if (e.inputType.includes('delete') || alphaOnlyPattern1.test(currentValue1)) {
previousValue1 = currentValue1
}
alphaOnlyInput1.value = previousValue1
})
const alphaOnlyInput2 = document.getElementById('alpha-only-input2'),
alphaOnlyPattern2 = new RegExp('^[a-zA-Z ]+$')
let previousValue2 = ''
alphaOnlyInput2.addEventListener('input', (e) => {
let currentValue2 = alphaOnlyInput2.value
if (e.inputType.includes('delete') || alphaOnlyPattern2.test(currentValue2)) {
previousValue2 = currentValue2
}
alphaOnlyInput2.value = previousValue2
})
const alphaOnlyInput3 = document.getElementById('alpha-only-input3'),
alphaOnlyPattern3 = new RegExp('^[a-zA-Z ]+$')
let previousValue3 = ''
alphaOnlyInput3.addEventListener('input', (e) => {
let currentValue3 = alphaOnlyInput3.value
if (e.inputType.includes('delete') || alphaOnlyPattern3.test(currentValue3)) {
previousValue3 = currentValue3
}
alphaOnlyInput3.value = previousValue3
})
const alphaOnlyInput4 = document.getElementById('alpha-only-input4'),
alphaOnlyPattern4 = new RegExp('^[a-zA-Z ]+$')
let previousValue4 = ''
alphaOnlyInput4.addEventListener('input', (e) => {
let currentValue4 = alphaOnlyInput4.value
if (e.inputType.includes('delete') || alphaOnlyPattern4.test(currentValue4)) {
previousValue4 = currentValue4
}
alphaOnlyInput4.value = previousValue4
})
</script>
<!-- END: APP JS-->
</body>
</html>
Directory Contents
Dirs: 4 × Files: 18