ok
Direktori : /home2/selectio/www/wedding-info-new/admin/php old code/ |
Current File : /home2/selectio/www/wedding-info-new/admin/php old code/add-client.php |
<?php include('header.php'); ?> <div class="page-wrapper"> <div class="page-content"> <div class="row"> <div class="col-xl-12 mx-auto"> <div class="card"> <div class="card-body"> <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"> <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"> <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"> <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"> <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"> <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"> </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"> </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"> </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" placeholder="Address 1"> </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" name="buyer_mobile_no" placeholder="Address 2"> </div> <div class="col-12 col-lg-3"> <label for="Address" class="form-label required">City</label> <input type="text" name="client_city" class="form-control" id="buyer_mobile_no" name="buyer_mobile_no" placeholder="City"> </div> <div class="col-12 col-lg-3"> <label for="Address" class="form-label required">Business Type</label> <select id="input21" name="client_busines_type" class="form-select" 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"> </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"> </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> </div> </div> </div> </div> </div> <style> .card { border: 0 solid transparent; margin-bottom: 1.5rem; box-shadow: 0 2px 6px 0 rgb(218 218 253 / 65%), 0 2px 6px 0 rgb(206 206 238 / 54%); } .card { --bs-card-spacer-y: 1rem; --bs-card-spacer-x: 1rem; --bs-card-title-spacer-y: 0.5rem; --bs-card-title-color: ; --bs-card-subtitle-color: ; --bs-card-border-width: var(--bs-border-width); --bs-card-border-color: var(--bs-border-color-translucent); --bs-card-border-radius: var(--bs-border-radius); --bs-card-box-shadow: ; --bs-card-inner-border-radius: calc(var(--bs-border-radius) - (var(--bs-border-width))); --bs-card-cap-padding-y: 0.5rem; --bs-card-cap-padding-x: 1rem; --bs-card-cap-bg: rgba(var(--bs-body-color-rgb), 0.03); --bs-card-cap-color: ; --bs-card-height: ; --bs-card-color: ; --bs-card-bg: var(--bs-body-bg); --bs-card-img-overlay-padding: 1rem; --bs-card-group-margin: 0.75rem; position: relative; display: flex; flex-direction: column; min-width: 0; height: var(--bs-card-height); word-wrap: break-word; background-color: var(--bs-card-bg); background-clip: border-box; border: var(--bs-card-border-width) solid var(--bs-card-border-color); border-radius: var(--bs-card-border-radius); } </style> <script> $(document).ready(function(){ //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){ console.log("Form Working"); $('#loader').show(); var formData = new FormData(form); $.ajax({ url: '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(); success(response['message']); }else{ $('#loader').hide(); warning(response['message']); } } }); } //Pickup Address Form End }); function pro_count_arrenge(){ var counts=2; $('.pro_count').each(function(){ $(this).text(counts) ; counts++; }); } </script> <?php include('footer.php'); ?>