ok
Direktori : /home2/selectio/public_html/y1jobportal.in/ |
Current File : /home2/selectio/public_html/y1jobportal.in/add-client.php |
<?php include 'header.php'; ?> <div> <!-- Sub Visual of the page --> <div class="subvisual-block subvisual-theme-1 bg-dark-green d-flex pt-60 pt-md-90 pt-lg-150 pb-30 text-white"> <div class="pattern-image"><img src="images/bg-pattern-overlay.jpg" width="1920" height="570" alt="Pattern"></div> <div class="container position-relative text-center"> <div class="row"> <div class="col-12"> <div class="subvisual-textbox"> <h1>Client Register</h1> </div> </div> </div> </div> </div> <!-- contain main informative part of the site --> <main class="main"> <!-- Featured Jobs Section --> <section class="section section-categories section-theme-1 pt-35 pt-md-50 pt-lg-75 pt-xl-95 pb-35 pb-md-50 pb-xl-75"> <div class="container"> <form id="add_client_details"> <h6 class="mb-1">Add Client Details</h6> <div class="row g-3"> <div class="col-12 col-lg-12"> <!--<b class="mr-top-20">To whom is the order suppliers?</b> <span class="color-liht-gray">(Client's Info)</span>--> </div> <div class="col-12 col-lg-6"> <div class="col-md-12"> <label for="input13" class="form-label">First Name</label> <div class="position-relative input-icon"> <input type="text" name="client_first_name" class="form-control" id="input13" placeholder="First Name" required value='<?=($results[0]['firstname'])?>'> <span class="position-absolute top-50 translate-middle-y"><i class="bx bx-user"></i></span> </div> </div> </div> <div class="col-12 col-lg-6"> <div class="col-md-12"> <label for="input13" class="form-label">Last Name</label> <div class="position-relative input-icon"> <input type="text" name="client_last_name" class="form-control" id="input13" placeholder="Last Name" required value="<?=($results[0]['lastname'])?>"> <span class="position-absolute top-50 translate-middle-y"><i class="bx bx-user"></i></span> </div> </div> </div> <div class="col-12 col-lg-3"> <label for="PhoneNumber" class="form-label required">Mobile Number</label> <div class="position-relative input-icon"> <input type="text" name="client_mobile_no" class="form-control" id="input15" placeholder="Phone" required value="<?=($results[0]['mobile'])?>" > <span class="position-absolute top-50 translate-middle-y"><i class="bx bx-microphone"></i></span> </div> </div> <div class="col-12 col-lg-5"> <div class="mb-3"> <label class="form-label required">Email</label> <div class="position-relative input-icon"> <input type="text" name="client_email" class="form-control" id="input16" placeholder="Email" required value="<?=($results[0]['email'])?>"> <span class="position-absolute top-50 translate-middle-y"><i class="bx bx-envelope"></i></span> </div> </div> </div> <div class="col-12 col-lg-4"> <div class="mb-3"> <label class="form-label required">Password</label> <div class="position-relative input-icon"> <input type="password" name="password" class="form-control" id="input17" placeholder="Password" required value="<?=($results[0]['password'])?>"> <span class="position-absolute top-50 translate-middle-y"><i class="bx bx-lock-alt"></i></span> </div> </div> </div> <div class="col-12 col-lg-6"> <label for="Company Name" class="form-label required">Company Name</label> <input type="text" name="client_company_name" class="form-control" id="PhoneNumber" placeholder="Company Name" required value="<?=($results[0]['company_name'])?>"> </div> <div class="col-12 col-lg-3"> <label for="Company Name" class="form-label required">GST No</label> <input type="Number" name="gst_no" class="form-control" id="PhoneNumber" placeholder="Enter GST No" value="<?=($results[0]['gst_no'])?>" > </div> <div class="col-12 col-lg-3"> <label for="Company Name" class="form-label required">LOGO</label> <input type="file" name="logo" class="form-control" id="PhoneNumber" placeholder="Upload Logo"> <input type="hidden" name="logos" class="form-control" id="logos" placeholder="Enter GST No" value="<?=($results[0]['logo'])?>" > </div> <div class="col-12 col-lg-5"> <label for="Address" class="form-label required">Address Line 1</label> <input type="text" name="client_address1" class="form-control" id="buyer_mobile_no" required placeholder="Address 1" value="<?=($results[0]['address_line1'])?>" > </div> <div class="col-12 col-lg-5"> <label for="Address" class="form-label required">Address Line 2</label> <input type="text" name="client_address2" class="form-control" id="buyer_mobile_no" required name="buyer_mobile_no" placeholder="Address 2" value="<?=($results[0]['address_line2'])?>"> </div> <div class="col-12 col-lg-3"> <label for="Address" class="form-label required">Category</label> <select name="category_id" id="category_id" class="form-select select2" required style="font-size: 12px;"> <option value="">All Category</option> <?php $statement = $pdo->prepare("SELECT * FROM `category` WHERE status=1"); $statement->execute(); $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($resultss as $result) { ?> <option <?php echo ($results[0]['category_id'] == $result['id']) ? 'selected' : ''; ?> value="<?=$result['id']?>"><?=$result['name']?></option> <?php } ?> </select> </div> <div class="col-12 col-lg-3"> <label for="Address" class="form-label required">State</label> <select required name="state_id" id="state_id" class="form-select select2" style="font-size: 12px;"> <option value="">All State</option> <?php $statement = $pdo->prepare("SELECT * FROM `state` WHERE status=1"); $statement->execute(); $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($resultss as $result) { ?> <option <?php echo ($results[0]['state_id'] == $result['id']) ? 'selected' : ''; ?> value="<?=$result['id']?>"><?=$result['state_name']?></option> <?php } ?> </select> </div> <div class="col-12 col-lg-3"> <label for="Address" class="form-label required">District</label> <select name="district_id" id="district_id" class="form-select select2" style="font-size: 12px;"> </select> </div> <div class="col-12 col-lg-3"> <label for="Address" class="form-label required">City</label> <input type="text" required name="client_city" class="form-control" id="buyer_mobile_no" name="buyer_mobile_no" placeholder="City" value='<?=($results[0]['city'])?>' > </div> <div class="col-12 col-lg-3"> <label for="Address" class="form-label required">Business Type</label> <select id="input21" required name="client_busines_type" class="form-select select2" style="font-size: 12px;"> <option selected="">Choose...</option> <option>business</option> <option>Reseller </option> </select> </div> <div class="col-12 col-lg-3"> <div class="ff_fileupload_wrap"> <div class="ff_fileupload_dropzone_wrap"> <div class="ff_fileupload_dropzone_tools"> <label for="Photo" class="form-label required">Photo</label> <input id="fancy-file-upload" type="file" name="client_photo" accept=".jpg, .png, image/jpeg, image/png" multiple="" class="ff_fileupload_hidden"> <input id="photo_identity" type="hidden" name="photo_identity" value='<?=($results[0]['photo_identity'])?>'> </div> </div> <table class="ff_fileupload_uploads"></table> </div> </div> <div class="col-12 col-lg-3"> <div class="ff_fileupload_wrap"> <div class="ff_fileupload_dropzone_wrap"> <div class="ff_fileupload_dropzone_tools"> <label for="Photo" class="form-label required">Document</label> <input id="fancy-file-upload" type="file" name="documents" accept=".pdf,.doc,.xls, image/png" multiple="" class="ff_fileupload_hidden"> <input id="document_identity" type="hidden" name="document_identity" value='<?=($results[0]['document_identity'])?>'> <input id="uuid" type="hidden" name="uuid" value='<?=($results[0]['uuid'])?>'> <input type='hidden' name='eid' value='<?=$ids?>' /> </div> </div> <table class="ff_fileupload_uploads"></table> </div> </div> <div class="col"> <button type="submit" name="save" class="btn btn-primary px-5">Save</button> </div> </div> </form> </div> </section> </main> </div> <?php include 'footer.php'; ?> <script> $(document).ready(function(){ $(".select2").select2({ containerCssClass: "error", dropdownCssClass: "test" }); //Pickup Address Form Start $( "#add_client_details" ).validate( { rules: { client_first_name: { required: true, minlength: 6 }, client_mobile_no:{ minlength: 10, maxlength: 12 }, client_email: { required: true, email: true }, password: { required: true, minlength: 8 }, client_company_name: { required: true }, logo: { // required: true }, client_address1: "required", client_address2: "required", client_city: "required", }, messages: { client_first_name: { required: "please enter a client first name", minlength: "enter a client first name must consist of at least 6 characters" }, client_last_name: { required: "please enter a client last name" }, client_mobile_no: { minlength: "your contact alter mobile number must consist of at least 10 digit number", maxlength: "your contact alter mobile number max 12 digit only allowed" }, password: { required: "please enter a password", minlength: "your password must consist of at least 8 digit" }, client_company_name: { required: "please enter a company name" }, logo: { required: "please upload the logo" }, contact_pincode: { required: "please enter valid pincode", minlength: "pincode min 6 digits required", }, client_email: "Please enter a valid email address", client_address1: "please enter first address", client_address2: "please enter last address", }, submitHandler: function(form) { add_client_details(form); } } ); function add_client_details(form){ alert('clicked'); console.log("Form Working"); $('#loader').show(); var formData = new FormData(form); $.ajax({ url: 'admin/api/add_client_details.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { console.log(response); if(response['error']==false){ //$('#exampleExtraLargeModal').modal('hide'); //$('#add_client_details').trigger("reset"); $('#loader').hide(); alert(response['message']); }else{ $('#loader').hide(); alert(response['message']); } } }); } //Pickup Address Form End }); // function pro_count_arrenge(){ // var counts=2; // $('.pro_count').each(function(){ // $(this).text(counts) ; // counts++; // }); // } </script> <script> $("#state_id").change(function () { get_district(); }); function get_district(){ $('#district_id').empty(); var state_id = $('#state_id').val(); $.ajax({ url: 'admin/api/get-district-api.php', type: 'post', dataType: 'json', data: {type:'get_district',state_id:state_id}, success: function (response) { console.log(response); if(response['error']==false){ var m=''; for(var n=0;n<response['data'].length;n++){ m+='<option value='+response['data'][n]['id']+'>'+response['data'][n]['district_name']+'</option>'; } $('#district_id').append(m); }else{ var m='<option value="">No District Found</option>'; $('#district_id').append(m); } } }); } </script> <script> $(document).ready(function() { get_district(); }); </script>