[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: add_delivery_agent.php
<?php include('header.php'); ?> <script src="jquery-1.11.1.min.js"></script> <script> $(document).ready(function(){ $('#phn').blur(function(){ var phn1=$('#phn').val(); //alert(phn1); $.ajax({ type:"POST", url:"ajax_check.php", data:$('#exampleValidation').serialize(), success: function (response){ if(response>0){ $('#error').show(); $('#phn').val(''); // sweetAlert('Phone no given is already in use'); document.getElementById("btn").disabled = true; }else{ // sweetAlert('Oops','Phone no given is already in use','error'); $('#error').hide(); document.getElementById("btn").disabled = false; } } }); }); }); $(document).ready(function(){ $('#email').blur(function(){ var em=$('#email').val(); $.ajax({ type:"POST", url:"ajax_check.php", data:$('#exampleValidation').serialize(), success: function (response){ if(response>0){ $('#error1').show(); $('#email').val(''); document.getElementById("btn").disabled = true; }else{ $('#error1').hide(); document.getElementById("btn").disabled = false; } } }); }); }); </script> <style type="text/css"> #fli,#fli1 { width: 79%; height: 42px; } #display { position:absolute; width:303; margin-left:0; margin-top:0; padding:2px; display:none; border-top:0px; overflow:auto; border:1px #CCC solid; background-color: white; z-index:1000; } .show11,.show12 { padding:7px; border-bottom:1px #999 dashed; font-size:13px; } .show11:hover,.show1:hover { background:#1da1f2; color:#000; cursor:pointer; } .widget{ overflow:visible !important; } </style> <script> function fill(Value) { $('#loc').val(Value); $('#display').hide(); //window.location.href='product1.php?cate='+Value+''; } $(document).ready(function(){ $("#loc").keyup(function() { var search = $('#loc').val(); //alert(search); if(search=="") { $("#display").html(""); } else { $.ajax({ type: "POST", url: "ajax_check.php", data: "search_loc="+ search , beforeSend: function(){ /* Show image container */ $("#loader").show(); }, success: function(html){ $("#display").html(html).show(); $("#loader").hide(); } }); } }); }); </script> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <div class="card-title">Add Delivery Agent</div> </div> <form method="post" id="exampleValidation" data-toggle="validator" enctype="multipart/form-data" > <input type="hidden" name="tablename" value="delivery_agent"> <div class="card-body"> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Name <span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <input type="text" class="form-control" id="name" name="name" placeholder="Enter Name" required> </div> </div> <!--<div class="form-group form-show-validation row"> <label for="username" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Username <span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-group"> <div class="input-group-prepend"> <span class="input-group-text" id="username-addon">@</span> </div> <input type="text" class="form-control" placeholder="username" aria-label="username" aria-describedby="username-addon" id="username" name="username" required> </div> </div> </div>--> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Email Address <span class="required-label"></span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <input type="email" class="form-control" name="email" id="email" placeholder="Enter Email"> <small class="text-warning" id="error1" style="display:none">Email ID already in use.Please Give another Email ID</small> </div> </div> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Phone<span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <input type="text" class="form-control" id="phn" name="phone" placeholder="Enter Phone" required> <small class="text-warning" id="error" style="display:none">Phone Number already in use.Please Give another Phone Number</small> </div> </div> <div class="seperator-solid"></div> <div class="form-group form-show-validation row"> <label class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Gender <span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8 d-flex align-items-center"> <div class="custom-control custom-radio"> <input type="radio" id="male" name="gender" value="Male" class="custom-control-input"> <label class="custom-control-label" for="male">Male</label> </div> <div class="custom-control custom-radio"> <input type="radio" id="female" name="gender" value="Female" class="custom-control-input"> <label class="custom-control-label" for="female">Female</label> </div> </div> </div> <div class="form-group form-show-validation row"> <label for="birth" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Date of Birth <span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-group"> <input type="date" class="form-control" id="date1" name="dob" required> <div class="input-group-append"> <span class="input-group-text"> <i class="la la-calendar-o"></i> </span> </div> </div> </div> </div> <div class="form-group form-show-validation row"> <label for="birth" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">State <span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="select2-input"> <select id="state" name="state" class="form-control" > <option value="">State</option> <?php $table1='state_list'; $stmt=$show->state($table1); $num=$stmt->rowCount(); if($num>0){ while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ echo "<option value='".$row['state']."'>".$row['state']."</option>"; } } ?> </select> </div> </div> </div> <div class="form-group form-show-validation row"> <label for="confirmpassword" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">City<span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <input type="text" class="form-control" name="city" placeholder="Enter City" required> </div> </div> <div class="form-group form-show-validation row"> <label for="confirmpassword" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Pincode<span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <input type="text" class="form-control" name="pincode" placeholder="Enter Pincode" required> </div> </div> <div class="form-group form-show-validation row"> <label for="confirmpassword" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Locality<span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <input type="text" class="form-control" id="loc" name="locality" placeholder="Enter Locality" required> <div id='loader' style='display: none;'> <img src='loader.gif' width='32px' height='32px'> </div> <div id="display"></div> </div> </div> <div class="form-group form-show-validation row"> <label for="confirmpassword" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Can delivery Upto<span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <select name="delivery_upto" class="form-control" > <option value="">Upto</option> <option value="5 km">5 km</option> <option value="7 km">7 km</option> <option value="10 km">10 km</option> <option value="12 km">12 km</option> <option value="15 km">15 km</option> </select> </div> </div> <div class="form-group form-show-validation row"> <label for="confirmpassword" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Address<span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <input type="text" class="form-control" name="address" placeholder="Enter Address" required> </div> </div> <div class="seperator-solid"></div> <div class="form-group form-show-validation row"> <label class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Upload Image <span class="required-label">*</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="http://placehold.it/100x100" alt="preview"> <input type="file" class="form-control form-control-file" onchange="return fileValidation('uploadImg','200')" id="uploadImg" name="uploadImg" accept="image/*" required > <label for="uploadImg" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> </div> <div class="form-group form-show-validation row"> <label class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Upload Document <span class="required-label">(Adhar)</span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="http://placehold.it/100x100" alt="preview"> <input type="file" class="form-control form-control-file" onchange="return fileValidation('uploaddoc','200')" id="uploaddoc" name="uploaddoc" required > <label for="uploaddoc" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> </div> <div class="form-group form-show-validation row"> <label class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Upload Document 2</label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="http://placehold.it/100x100" alt="preview"> <input type="file" class="form-control form-control-file" onchange="return fileValidation('document2','200')" id="document2" name="document2" > <label for="document2" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> </div> <div class="form-group form-show-validation row"> <label class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Upload Document 3</label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="http://placehold.it/100x100" alt="preview"> <input type="file" class="form-control form-control-file" onchange="return fileValidation('document3','200')" id="document3" name="document3" > <label for="document3" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> </div> </div> <div class="card-action"> <div class="row"> <div class="col-md-12"> <input class="btn btn-success" type="submit" id="btn" name="sub" value="Submit"> <input type="reset" value="Cancel" name="reset" class="btn btn-danger"> </div> </div> </div> </form> </div> </div> <?php if(isset($_POST['sub'])){ // $status='Active'; $uid=$show->getid('ids','DLA'); $table='delivery_agent'; if(file_exists($_FILES['uploadImg']['tmp_name']) || is_uploaded_file($_FILES['uploadImg']['tmp_name'])) { $img=$show->imageEdit($_FILES['uploadImg']['name']); move_uploaded_file($_FILES['uploadImg']['tmp_name'],"../product_img/".$img); }else{ $img='';} if(file_exists($_FILES['uploaddoc']['tmp_name']) || is_uploaded_file($_FILES['uploaddoc']['tmp_name'])) { $img1=$show->imageEdit($_FILES['uploaddoc']['name']); move_uploaded_file($_FILES['uploaddoc']['tmp_name'],"../product_img/".$img1); }else{ $img1='';} if(file_exists($_FILES['document2']['tmp_name']) || is_uploaded_file($_FILES['document2']['tmp_name'])) { $img2=$show->imageEdit($_FILES['document2']['name']); move_uploaded_file($_FILES['document2']['tmp_name'],"../product_img/".$img2); }else{ $img2='';} if(file_exists($_FILES['document3']['tmp_name']) || is_uploaded_file($_FILES['document3']['tmp_name'])) { $img3=$show->imageEdit($_FILES['document3']['name']); move_uploaded_file($_FILES['document3']['tmp_name'],"../product_img/".$img3); }else{ $img3='';} $data = array( 'agent_id' => $uid, 'name' => htmlentities(strip_tags($_POST['name'])), 'phone' => htmlentities(strip_tags($_POST['phone'])), 'email' => htmlentities(strip_tags($_POST['email'])), 'sex' => htmlentities(strip_tags($_POST['gender'])), 'password' =>md5('123456'), 'address'=>htmlentities(strip_tags($_POST['address'])), 'state'=>htmlentities(strip_tags($_POST['state'])), 'city'=>htmlentities(strip_tags($_POST['city'])), 'pincode'=>htmlentities(strip_tags($_POST['pincode'])), 'delivery_upto'=>htmlentities(strip_tags($_POST['delivery_upto'])), 'locality'=>htmlentities(strip_tags($_POST['locality'])), 'created_at'=>date('d-m-Y'), 'dob'=>date('Y-m-d',strtotime($_POST['dob'])), 'update_by'=>'ADMIN', 'status'=>'ACTIVE', 'profile_pic'=>$img, 'document'=>$img1, 'document2'=>$img2, 'document3'=>$img3, ); if($show->insert('delivery_agent',$data)){ echo '<script> setTimeout(function() { swal({ title: "Thank You for Registration!", text: "Default password has been set as:123456.", type: "success" }, function() { window.location = "'.$_SERVER['REQUEST_URI'].'"; }); }, 1000); </script>'; //echo "<script>swal('Thank you for Registration.');window.location.href='".$_SERVER['request_uri']."';</script>"; } }?> <script src="assets/js/plugin/datepicker/bootstrap-datepicker.js"></script> <script> $(document).ready(function(){ $("#date1").datepicker({ format: 'dd-mm-yyyy', }); $("#date2").datepicker({ format: 'dd-mm-yyyy', }); $("#date3").datepicker({ format: 'dd-mm-yyyy', }); $("#date4").datepicker({ format: 'dd-mm-yyyy', }); });</script> </div></div> </div> </div> <!--footer--> <?php include('footer.php'); ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.49 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619