Preview: edit-customerlist.php
Size: 10.06 KB
/home/urbanman/roadkaraja.in/admin/edit-customerlist.php
<?php
error_reporting(0);
@session_start();
include("common-left-cl.php");
include("config.php");
$branch =$_GET[b];
?>
<!-- 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">Customer Management</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"> Edit Customer</h4>
</div>
<div class="card-content">
<div class="card-body py-5">
<?php
error_reporting(0);
$id = $_GET[id];
$data="select * from customer where id='$id'";
if(!($rowees=mysql_query($data))){echo mysql_error($data); exit;}
$row=mysql_fetch_assoc($rowees);
?>
<form class="form-row" action="submit-customer.php" method="post">
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputCity">Driver Name</label>
<input type="text" required value="<?php echo $row[customer_name];?>" style="text-transform: uppercase;" name="cname" class="form-control" placeholder="Enter Driver Name" id="cname">
</div>
<div class="form-group col-md-3">
<label for="inputCity">Driver Mobile Number 1 </label>
<input type="text" maxlength="10" name="mobile" onkeypress="return isNumberKey(event)" class="form-control" value="<?php echo $row[customer_mobile];?>" 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 $row[mobile2];?>" 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 $row[vehicle_number];?>" 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" 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($rowshow=mysql_fetch_array($page1)){?>
<option value="<?php echo $rowshow['vtype'];?>"<?php if($rowshow['vtype']==$row['vehicletyp']){echo 'selected="selected"';}?>><?php echo $rowshow['vtype'];?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-3">
<label for="inputCity">Birth Date </label>
<input type="date" value="<?php echo $row[dob];?>" name="bdate" style="width:200px" class="form-control" id="dob">
</div>
<div class="form-group col-md-6">
<label for="inputCity">Route – From and To </label>
<input type="text" value="<?php echo $row[routefrom];?>" name="routefrom" style="height:33px;border-radius:4px;border:1px solid #ddd;" placeholder="Enter Route From " id="routefrom">
<input type="text" value="<?php echo $row[routeto];?>" name="routeto" style="height:33px;border-radius:4px;border:1px solid #ddd;" placeholder="Enter Route To" id="routeto">
</div>
<div class="form-group col-md-6">
Urea Required
<select name="urea" style="width:200px" id="urea" class="form-control" required>
<option value="">Select Urea Required</option>
<option value="Yes" <?php if ($row[urea]=="Yes") echo 'selected="selected"';?>>Yes </option>
<option value="No" <?php if ($row[urea]=="No") echo 'selected="selected"';?>>No </option>
</select>
</div>
</div>
<div class="form-group col-md-4">
<label for="inputCity">Company Name</label>
<input type="text" value="<?php echo $row[companyname];?>" name="companyname" class="form-control" placeholder="Enter Company Name" id="companyname">
</div>
<div class="form-group col-md-4">
<label for="inputCity">Owner Name</label>
<input type="text" value="<?php echo $row[owner];?>" name="owner" class="form-control" placeholder="Enter Owner Name" id="owner">
</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" value="<?php echo $row[ownermobile];?>" id="ownermobile">
</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="hidden" name="branch" value="<?php echo $branch;?>">
<input type="submit" class="btn btn-primary" value="Submit"> </button>
<?php $id = $row[id];
if($id==""){?>
<input type="hidden" value="add" name="mode" >
<?php }else{?>
<input type="hidden" value="<?php echo $id;?>" name="id" >
<?php }?>
</div>
</div>
</form>
</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>
<!-- END: APP JS-->
<style>
.btn4{
padding:8px;
background-color:#00bcd4;
color:#fff;
border-radius:20px;
padding-left:20px;padding-right:20px;
border:2px solid #00bcd4;
box-shadow:0 4px 10px 0 rgba(0,0,0,0.3);
}
</style>
</body>
</html>
Directory Contents
Dirs: 4 × Files: 78