File manager - Edit - /home/autoph/public_html/tasks/cis.php.tar
Back
home/autoph/public_html/connectv1/cis.php 0000644 00000175550 15025005177 0014504 0 ustar 00 <?php include('cfg/db.php'); $session_company = $_SESSION['user']['company_name']; $query = "SELECT id, name FROM source_company WHERE name = '$session_company'"; $result = $db->sql_query($query); foreach($result AS $data){ $company_id = $data['id']; } // if(isset($_SESSION['user'])){ // header('location:home.php'); // } // else{ // if ((!isset($_SESSION['check_sso']) || !$_SESSION['check_sso'])){ // $_SESSION['check_sso'] = true; // header('location: http://www.autohub.ph/connect/home/datacon_login.php'); // }else{ // $_SESSION['check_sso'] = false; // } // } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>CIS</title> <!-- Google Font: Source Sans Pro --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback"> <!-- Font Awesome --> <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css"> <!-- icheck bootstrap --> <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css"> <!-- Theme style --> <link rel="stylesheet" href="dist/css/adminlte.min.css"> <!-- overlayScrollbars --> <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css"> <link href="dist/img/<?php echo $variable['logo']; ?>" rel="icon"/> <!-- daterange picker --> <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css"> <!-- Tempusdominus Bootstrap 4 --> <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css"> <!-- Select2 --> <link rel="stylesheet" href="plugins/select2/css/select2.min.css"> <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css"> <!-- BS Stepper --> <link rel="stylesheet" href="plugins/bs-stepper/css/bs-stepper.min.css"> <!-- Toastr --> <link rel="stylesheet" href="plugins/toastr/toastr.min.css"> <!-- SweetAlert2 --> <link rel="stylesheet" href="plugins/sweetalert2/sweetalert2.min.css"> </head> <style> fieldset { padding-top: 0.35em; padding-bottom: 0.625em; padding-left: 0.75em; padding-right: 0.75em; border: 1px solid gray; border-radius: 3%; } .top-side { margin-left: -10px; margin-right: -10px; } .left-side { margin-left: -10px; margin-right: 0px; } .right-side { margin-left: 0px; margin-right: -10px; } legend { font-size: 100%; font-weight: bold; color: blue; } #set { font-size: 100%; font-weight: bold; color: blue; } .form-group{ margin-top: -8px; } .card-title{ text-align: center; } .lbl-forms { font-size: 90%; font-weight: bold; } </style> <br> <body class="hold-transition login-page"> <div class="card card-primary float-center" style="width: 70%;"> <div class="card-header"> <h3 class="card-title"></h3> </div> <div class="card-body"> <p class="login-box-msg">CUSTOMER INFORMATION SHEET</p> <div class="card pb-0 pt-0 pl-0 pr-0 mt-0 mb-0 ml-0 mr-0" id="grid-card" style="box-shadow: 0 0 0 0"> <!-- <div class="overlay customer-modal-overlay"> <div class="fas fa-2x fa-sync-alt fa-spin" style="color:white;"> </div> <strong><span class="ml-2" style="color:white;"> Loading, please wait...</span></strong> </div> --> <div class="card-body pb-0 pt-0 pl-0 pr-0 mt-0 mb-0 ml-0 mr-0" id="customer-grid" style="padding: .50rem"> <!-- ./nav bar --> <div id="app" class="mb-2"> <nav class="navbar navbar-expand-md navbar-light ml-0 mt-0 mb-0 pt-0 pb-0" style="background-color: #ffffff;"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <!-- <ul class=" nav nav-tabs navbar-nav mr-auto" id="custom-tabs-three-tab" role="tablist" style="border-bottom: 0px solid #ffffff;"> --> <ul class="nav nav-tabs navbar-nav mr-auto customer-modal-tab" id="customer-modal-tab" role="tablist"> <li class="nav-item"> <a class="nav-link active border-0 " id="customer-modal-tab-information" data-toggle="pill" href="#customer-modal-information" role="tab" aria-controls="customer-modal-information" aria-selected="true">SALE</a> </li> <li class="nav-item"> <a class="nav-link border-0" id="customer-modal-tab-contact" data-toggle="pill" href="#customer-modal-contact" role="tab" aria-controls="customer-modal-contact" aria-selected="false">PERSONAL</a> </li> <li class="nav-item children-stepper"> <a class="nav-link border-0 " id="customer-modal-tab-children" data-toggle="pill" href="#customer-modal-children" role="tab" aria-controls="customer-modal-children" aria-selected="false">COMPANY</a> </li> </ul> </div> </nav> </div> <div class="tab-content" id="customer-modal-tab-content"> <div class="tab-pane fade show active" id="customer-modal-information" role="tabpanel" aria-labelledby="customer-modal-tab-information"> <fieldset class="card"> <!-- <legend>Customer Signature</legend> --> <div class="row"> <div class="col-6"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Customer Name</label> <input id="cis-customer-name" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> <div class="col-6"> <div class="form-group-sm"> <label id="customer-date-label" class="lbl-forms mx-0 my-0">Date</label> <div class="edit-customer input-group date" id="div-customer-date" data-target-input="nearest"> <input name="customer-date" id="customer-date" data-inputmask-alias="datetime" data-inputmask-inputformat="mm/dd/yyyy" data-mask type="text" class="big-letter edit-customer lbl-forms-sm form-control form-control-sm datetimepicker-input" data-target="#customer-date"/> <div class="edit-customer input-group-append" data-target="#customer-date" data-toggle="datetimepicker"> <div class="input-group-text"><i class="fa fa-calendar"></i></div> </div> </div> </div> </div> </div> </fieldset> <fieldset class="card"> <div class="row"> <div class="col-6"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Dealer</label> <select name="dd-dealer" id="dd-dealer" json-modal="true" class="form-control form-control-sm" style="width: 100%; height: 34px;"> <option value="" disabled selected hidden>SELECT DEALER</option> <?php $dealer_query = " SELECT sd.id, sd.name FROM `source_dealer` sd INNER JOIN source_company_dealer scd ON scd.dealer_id = sd.id WHERE sd.status != 0 AND scd.company_id = '$company_id' GROUP BY sd.id ASC"; //echo $dealer_query; $dealer = $db->return_result($dealer_query); foreach($dealer AS $data){ echo "<option value='{$data['id']}'>".$data['name']."</option>"; } ?> </select> </div> </div> <div class="col-6"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Account Type</label> <div id="div-account-type" style="padding-left: 0.5em; padding-right: 0.5em;"> <div class="row mb-0 border rounded pb-1 pt-1"> <div class="col-6 mr-0"> <div class="custom-control custom-radio mr-1"> <input class="custom-control-input" type="radio" id="radio-individual" name="customRadioAccountType"> <label for="radio-individual" class="custom-control-label">Individual</label> </div> </div> <div class="col-6 mr-0"> <div class="custom-control custom-radio"> <input class="custom-control-input" type="radio" id="radio-corporate" name="customRadioAccountType"> <label for="radio-corporate" class="custom-control-label">Corporate</label> </div> </div><!--col-sm-3--> </div> </div> </div> </div> </div> <div class="row"> <div class="col-3"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">VIN</label> <input id="cis-vin" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> <div class="col-3"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">CS No.</label> <input id="cis-cs-number" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> <div class="col-6"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Mode of Payment</label> <div class="row mb-0 border rounded pb-1 pt-1"> <div class="col-12"> <div class="custom-control custom-radio"> <input class="custom-control-input" type="radio" id="radio-cash" name="customRadioPaymentMode"> <label for="radio-cash" class="custom-control-label">Cash</label> </div> </div> <div class="col-12"> <div class="custom-control custom-radio"> <input class="custom-control-input" type="radio" id="radio-financing" name="customRadioPaymentMode"> <label for="radio-financing" class="custom-control-label">Financing</label> <div class="row"> <div class="col-6"> <input id="cis-bank" type="text" placeholder="Bank" class="big-letter lbl-forms-sm form-control form-control-sm" disabled="true"> </div> <div class="col-6"> <input id="cis-terms" type="text" placeholder="Terms" class="big-letter lbl-forms-sm form-control form-control-sm" disabled="true"> </div> </div> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-2"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Brand</label> <div id="div-brand" style="padding-right: 0.1em;"> <select name="cis-brand" id="cis-brand" class="modal-select2 edit-customer lbl-forms-sm form-control form-control-sm"> <option></option> <?php $brand = $db -> return_result("SELECT `id`, `name` FROM `source_brand` WHERE status != 0 ORDER BY id ASC"); foreach($brand AS $data){ echo "<option value='{$data['id']}'>".$data['name']."</option>"; } ?> </select> </div> </div> </div> <div class="col-4"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Model</label> <div id="div-model" style="padding-right: 0.1em;"> <select name="cis-model" id="cis-model" class="modal-select2 edit-customer lbl-forms-sm form-control form-control-sm"> <option></option> </select> </div> </div> </div> <div class="col-3"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Source of Release</label> <input id="cis-source-of-release" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> <div class="col-3"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Insurance</label> <!-- <input id="cis-insurance" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> --> <select name="cis-insurance" id="cis-insurance" class="modal-select2 edit-customer lbl-forms-sm form-control form-control-sm"> <option></option> <?php $insurance = $db -> return_result("SELECT `id`, `name` FROM `source_insurance_company` WHERE status != 0 ORDER BY id ASC"); foreach($insurance AS $data){ echo "<option value='{$data['id']}'>".$data['name']."</option>"; } ?> </select> </div> </div> </div> <div class="row"> <div class="col-6"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Color</label> <input id="cis-color" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> <div class="col-6"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Group Manager</label> <select name="cis-group-manager" id="cis-group-manager" class="modal-select2 edit-customer lbl-forms-sm form-control form-control-sm"> <option></option> <?php $group_manager = $db -> return_result("SELECT `id`, `first_name`, `last_name` FROM `sales_consultant` WHERE status != 0 AND type = 1 ORDER BY id ASC"); foreach($group_manager AS $data){ echo "<option value='{$data['id']}'>".$data['first_name']." ".$data['last_name']."</option>"; } ?> </select> </div> </div> </div> <div class="row"> <div class="col-6"> <div class="form-group"> <div id="div-delivery-date" class="mb-1 form-group dropdown-input" style="height: 28px;"> <label id="delivery-date-label" class="lbl-forms mx-0 my-0">Delivery Date</label> <div class="edit-customer input-group date" data-target-input="nearest"> <input name="delivery-date" id="delivery-date" data-inputmask-alias="datetime" data-inputmask-inputformat="mm/dd/yyyy" data-mask type="text" class="big-letter edit-customer lbl-forms-sm form-control form-control-sm datetimepicker-input" data-target="#delivery-date"/> <div class="edit-customer input-group-append" data-target="#delivery-date" data-toggle="datetimepicker"> <div class="input-group-text"><i class="fa fa-calendar"></i></div> </div> </div> </div> </div> </div> <div class="col-6"> <div class="form-group"> <label class="lbl-forms mx-0 my-0">Sales Consultant</label> <select name="cis-sales-consultant" id="cis-sales-consultant" class="modal-select2 edit-customer lbl-forms-sm form-control form-control-sm"> <option></option> </select> </div> </div> </div> <fieldset class="card"> <legend>Fleet Sales</legend> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Was this vehicle acquired as a:</label> <div class="row mb-0 border rounded pb-1 pt-1"> <div class="col-6 mr-0"> <div class="custom-control custom-radio mr-1"> <input class="custom-control-input" type="radio" id="radio-car-plan" name="customRadioFleet"> <label for="radio-car-plan" class="custom-control-label">Car Plan</label> </div> </div> <div class="col-6 mr-0"> <div class="custom-control custom-radio"> <input class="custom-control-input" type="radio" id="radio-company-car" name="customRadioFleet"> <label for="radio-company-car" class="custom-control-label">Company Car</label> </div> </div> </div> </div> </div> </fieldset> </fieldset> </div><!-- Sales Tab --> <!-- Personal Tab --> <div class="tab-pane fade" id="customer-modal-contact" role="tabpanel" aria-labelledby="customer-modal-tab-contact"> <fieldset class="card"> <legend>Personal Details</legend> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Registered Name</label> <input id="cis-registered-name" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">End-user Name</label> <input id="cis-end-user" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Email</label> <input id="cis-personal-email" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Address</label> <input id="cis-personal-address" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Cellphone # (1)</label> <input id="cis-personal-mobile-1" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Cellphone # (2)</label> <input id="cis-personal-mobile-2" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Gender</label> <select name="cis-gender" id="cis-gender" class="form-control form-control-sm" style="width: 100%; height: 34px;"> <option value="" disabled selected hidden>SELECT GENDER</option> <?php $gender_query = "SELECT id, gender_name FROM all_gender WHERE status != 0"; $result = $db->return_result($gender_query); foreach($result AS $data){ echo "<option value='".$data['id']."'>".$data['gender_name']."</option>"; } ?> </select> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Status</label> <select name="cis-status" id="cis-status" class="form-control form-control-sm" style="width: 100%; height: 34px;"> <option value="" disabled selected hidden>SELECT STATUS</option> <?php $marital_status_query = "SELECT id, name FROM all_marital_status WHERE status != 0"; $result = $db->return_result($marital_status_query); foreach($result AS $data){ echo "<option value='".$data['id']."'>".$data['name']."</option>"; } ?> </select> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">No. of Children</label> <input id="cis-children" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label id="birth-date-label" class="lbl-forms mx-0 my-0">Birth Date</label> <div class="edit-customer input-group date" data-target-input="nearest"> <input name="birth-date" id="birth-date" data-inputmask-alias="datetime" data-inputmask-inputformat="mm/dd/yyyy" data-mask type="text" class="big-letter edit-customer lbl-forms-sm form-control form-control-sm datetimepicker-input" data-target="#birth-date"/> <div class="edit-customer input-group-append" data-target="#birth-date" data-toggle="datetimepicker"> <div class="input-group-text"><i class="fa fa-calendar"></i></div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Nationality</label> <div id="div-nationality" style="padding-right: 0.1em;"> <select name="cis-nationality" id="cis-nationality" class="edit-customer form-control form-control-sm" style="width: 100%;"> <option></option> <?php $nationality = $db -> return_result("SELECT `num_code`, `nationality` FROM `all_countries` WHERE status != 0 ORDER BY num_code ASC"); foreach($nationality as $data){ echo "<option value='{$data['num_code']}'>".$data['nationality']."</option>"; } ?> </select> </div> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Facebook Handle</label> <input id="cis-facebook" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <label class="lbl-forms mx-0 my-0">Employee Type</label> <div class="form-group form-control-sm"> <div class="row mb-0 border rounded mt-1 mb-1 pb-1 pt-1"> <div class="col-6 mr-0"> <div class="custom-control custom-radio mr-1"> <input class="custom-control-input" type="radio" id="radio-employed" name="customRadioEmployeeType"> <label for="radio-employed" class="custom-control-label">Employed</label> </div> </div> <div class="col-6 mr-0"> <div class="custom-control custom-radio"> <input class="custom-control-input" type="radio" id="radio-self-employed" name="customRadioEmployeeType"> <label for="radio-self-employed" class="custom-control-label">Self-Employed</label> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Group Affiliations</label> <!-- <input id="cis-group-affiliations" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> --> <div class="table-responsive "> <table id="affiliations-list-table" style="position: relative;" class="fixed-table-width table-bordered table-sm"> <thead> <tr> <th style="width: 490px;">Category</th> <th style="width: 490px;">Affiliations</th> <th style="width: 80px;" class="text-center"> <button type="button" name="addRowAffiliations" id="addRowAffiliations" class="btn btn-success btn-xs add"> <span class="fas fa-plus"></span></button> </th> </tr> </thead> <tbody id="affiliations-list"></tbody> </table> </div> <table id="affiliations-list-clone" style="display:none"> <tbody> <tr> <td> <select type="text" class="select-category form-control form-control-sm" id="select-category-affiliations"> <option></option> <?php $customer_affiliations = $db -> return_result("SELECT id,name FROM `customer_affiliations_category` WHERE status=1 ORDER BY name ASC"); foreach($customer_affiliations as $data){ echo "<option value='{$data['id']}'>".$data['name']."</option>"; } ?> </select> </td> <td> <select type="text" class="select-content form-control form-control-sm" id="select-content-affiliations"> <option></option> </select> </td> <td class="text-center"> <button type="button" class="btnRemoveAffiliations btn btn-danger btn-xs"> <span class="fas fa-minus"></span> </button> </td> </tr> </tbody> </table> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Other brands offered by SC</label> <input id="cis-brands-offered" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> </fieldset> </div> <div class="tab-pane fade" id="customer-modal-children" role="tabpanel" aria-labelledby="customer-modal-tab-children"> <fieldset class="card"> <legend>Company Profile</legend> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label id="lbl-position" class="lbl-forms mx-0 my-0">Position Title</label> <input id="cis-position" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Company Name</label> <input id="cis-company" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Email</label> <input id="cis-company-email" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Address</label> <input id="cis-company-address" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Cellphone # (1)</label> <input id="cis-company-mobile-1" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> <div class="row"> <div class="col-6"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Cellphone # (2)</label> <input id="cis-company-mobile-2" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> <div class="col-6"> <div class="form-group-sm"> <label class="lbl-forms mx-0 my-0">Landline #</label> <input id="cis-landline" type="text" class="big-letter lbl-forms-sm form-control form-control-sm" style="background-color: transparent;"> </div> </div> </div> </fieldset> <fieldset class="card"> <legend>Industrial Classification</legend> <div class="form-group form-group-sm"> <div id="div-nationality" style="padding-right: 0.1em;"> <select name="cis-nationality" id="cis-industrial-classification" class="edit-customer form-control form-control-sm" style="width: 100%;"> <option></option> <?php $nature = $db -> return_result("SELECT `id`, `name` FROM `source_nature_of_business` WHERE status != 0 ORDER BY id ASC"); foreach($nature as $data){ echo "<option value='{$data['id']}'>".$data['name']."</option>"; } ?> </select> </div> </div> </fieldset> <br> <div class="row left-side"> <div class="col-sm-12 form-group"> <div class="row float-right"> <input type="button" name="cis-submit" id="cis-submit" value="Submit" class="float-right btn btn-success btn-sm"> </div> <div class="row"> <input type="button" name="cis-clear-fields" id="cis-clear-fields" value="Clear fields" class="float-right btn btn-primary btn-sm"> </div> </div> </div> </div><!-- Company Tab --> </div> <!-- ./nav bar --> </div> </div> </div> <br> </div> <!-- jQuery --> <script src="plugins/jquery/jquery.min.js"></script> <!-- overlayScrollbars --> <script src="plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script> <!-- Bootstrap 4 --> <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- AdminLTE App --> <script src="dist/js/adminlte.min.js"></script> <!-- InputMask --> <script src="plugins/moment/moment.min.js"></script> <script src="plugins/inputmask/jquery.inputmask.min.js"></script> <!-- date-range-picker --> <script src="plugins/daterangepicker/daterangepicker.js"></script> <!-- Tempusdominus Bootstrap 4 --> <script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script> <!-- Select2 --> <script src="plugins/select2/js/select2.full.min.js"></script> <!-- Toastr --> <script src="plugins/toastr/toastr.min.js"></script> <!-- BS-Stepper --> <script src="plugins/bs-stepper/js/bs-stepper.min.js"></script> <!-- SweetAlert2 --> <script src="plugins/sweetalert2/sweetalert2.min.js"></script> <!--GLOBALS--> <script> var customer_type = -1; var mode_of_payment_type = -1; var employee_type = -1; var industrial_classification = ""; var ind_others_selected = 0; var cash_selected = 0; var finance_selected = 0; </script> <script> $(document).ready(function(){ $('#cis-nationality').val("608").trigger('change'); //addRowInterest(); addRowAffiliations(); }); </script> <!--INITIALIZATIONS--> <script> $(function(){ $('#delivery-date').datetimepicker({ format: 'L' }); }) $(function(){ $('#birth-date').datetimepicker({ format: 'L' }) }) $(function(){ $('#customer-date').datetimepicker({ format: 'L' }) }) $('#cis-brand').select2({ placeholder: "Select brand", allowClear: true }) $('#cis-model').select2({ placeholder: "Select model", allowClear: true }) $('#cis-insurance').select2({ placeholder: "Select insurance", allowClear: true }) $('#cis-nationality').select2({ placeholder: "Select nationality", allowClear: true }) $('#cis-industrial-classification').select2({ placeholder: "Select class", allowClear: true }) $('#cis-group-manager').select2({ placeholder: "Select GM", allowClear: true }) $('#cis-sales-consultant').select2({ placeholder: "Select SC", allowClear: true }) </script> <script> function uniqId() { return Math.round(new Date().getTime() + (Math.random() * 100)); } function isEmpty(string) { var flag = false; if (string == '') { flag = true; } else if (string == null) { flag = true; } else { if (string.trim() == '') { flag = true; } } return flag; } function switchTab(type) { $('#customer-modal-tab .nav-link').removeClass('active'); $('#customer-modal-tab-content .tab-pane').removeClass('show'); $('#customer-modal-tab-content .tab-pane').removeClass('active'); switch (type) { case 1: $('#customer-modal-tab-information').addClass('active') $('#customer-modal-information').addClass('active') $('#customer-modal-information').addClass('show') break; case 2: $('#customer-modal-tab-contact').addClass('active') $('#customer-modal-contact').addClass('active') $('#customer-modal-contact').addClass('show') break; case 3: $('#customer-modal-tab-children').addClass('active') $('#customer-modal-children').addClass('active') $('#customer-modal-children').addClass('show') break; } } function addRowAffiliations() { $('#addRowAffiliations').click(function() { if (!checkIfAffiliationsIncomplete() && $('#affiliations-list-table tbody tr').length > 0) { //sweetAlertSimple('error', 'Oops...', 'Complete the affiliation details first'); toastr.remove(); toastr.error("Complete the affiliation details first before adding one again"); } else { addAffiliationsItem(); } }); $("#affiliations-list").on("click", ".btnRemoveAffiliations", function() { $(this).closest("tr").remove(); }); } function addAffiliationsItem() { // CREATE ROW var affiliations_list = document.getElementById('affiliations-list'); const affiliations_list_base = document.querySelector('#affiliations-list-clone tbody tr'); var affiliationsItem = []; affiliations_list.appendChild(affiliations_list_base.cloneNode(true)); // Generate a unique ID for the select> in the new row. var affiliationsIdDateNow = uniqId(); var newaffiliationsCategoryId = 'affiliations-category-' + affiliationsIdDateNow; var newaffiliationsContentId = 'affiliations-content-' + affiliationsIdDateNow; affiliationsItem[0] = (newaffiliationsCategoryId); affiliationsItem[1] = (newaffiliationsContentId); // alert(affiliationsItem.pop(0)); // alert(affiliationsItem.pop(1)); // Update the ID of the select> in the new row // (it should be the only one with an `id` of '#element'), // and initialize the Select2. $('#select-category-affiliations').attr('id', newaffiliationsCategoryId).select2({ placeholder: "Select Category", allowClear: true }); $('#select-content-affiliations').attr('id', newaffiliationsContentId).select2({ tags: true, placeholder: "Search or enter affiliations", allowClear: true, "language": { "noResults": function() { return 'Search or enter affiliations' } }, escapeMarkup: function(markup) { return markup; }, placeholder: 'Search or enter affiliations', ajax: { url: 'api/affiliations/affiliations.php', dataType: 'json', delay: 250, data: function(data) { return { apiKey: '8048636851659915', affiliationsCategory: $('#' + newaffiliationsCategoryId).val(), search: data.term // search term }; }, processResults: function(response) { return { results: response }; }, cache: true } }); $('#' + newaffiliationsCategoryId).on('select2:select', function(e) { $('#' + newaffiliationsContentId).val('').trigger('change') }); $('#' + newaffiliationsCategoryId).on("select2:unselecting", function(e) { $('#' + newaffiliationsContentId).val('').trigger('change') }); return affiliationsItem; // CREATE ROW } function checkIfAffiliationsIncomplete() { rows = getAllAffiliationsTableData(); var jsonRow = rows; var hasMatch = true; for (var index = 0; index < jsonRow.length; ++index) { var json = jsonRow[index]; if (json.Category == "" || json.Affiliations == "") { hasMatch = false; break; } } // alert(hasMatch) return hasMatch; } function getAllAffiliationsTableData() { var $table = $("#affiliations-list-table") rows = [], header = []; $table.find("thead th").each(function() { header.push($(this).html().replace(/\s/g, '_').replace(/\./g, '')); }); $table.find("tbody tr").each(function() { var row = {}; $(this).find("td").each(function(i) { var key = header[i], value = $(this).find('select').val(); row[key] = value; }); rows.push(row); }); // alert(JSON.stringify(rows)); // return JSON.stringify(rows); return rows; } </script> <script> $('#cis-brand').on('change', function(event) { var brand_id = $('#cis-brand').val(); // $('#cis-model').val('').trigger('change'); $.ajax({ url:"app/cis/load_model.php", type:"POST", data: { brand_id: brand_id }, beforeSend: function(){ }, success: function(result){ $('#cis-model').html(''); $('#cis-model').append("\"" + result + "\""); } }) }); </script> <script> $('#cis-group-manager').on('change', function(event) { var group_manager_id = $('#cis-group-manager').val(); $.ajax({ url:"app/cis/load_sc.php", type:"POST", data: { group_manager_id: group_manager_id }, beforeSend: function(){ }, success: function(result){ $('#cis-sales-consultant').html(''); $('#cis-sales-consultant').append("\"" + result + "\""); } }) }); </script> <!------------------------------------------------------------------------------Radio buttons functions--> <script> $('#radio-individual').click(function(){ customer_type = 0; //individual customer $('#cis-position').attr('hidden', false); $('#lbl-position').attr('hidden', false); }); $('#radio-corporate').click(function(){ customer_type = 1; //corporate customer $('#cis-position').attr('hidden', true); $('#lbl-position').attr('hidden', true); $('#cis-position').val(""); }); $('#radio-cash').click(function(){ mode_of_payment_type = 0; //cash cash_selected = 1; finance_selected = 0; $('#cis-bank').attr('disabled', true); $('#cis-bank').css('background-color', ''); $('#cis-terms').attr('disabled', true); $('#cis-terms').css('background-color', ''); }); $('#radio-financing').click(function(){ mode_of_payment_type = 1; //financing cash_selected = 0; finance_selected = 1; $('#cis-bank').attr('disabled', false); $('#cis-bank').css('background-color', 'transparent'); $('#cis-terms').attr('disabled', false); $('#cis-terms').css('background-color', 'transparent'); }); $('#radio-employed').click(function(){ employee_type = 0; //employed }); $('#radio-self-employed').click(function(){ employee_type = 1; //self-employed }); $('#radio-agriculture').click(function(){ ind_others_selected = 0; industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-electricity').click(function(){ ind_others_selected = 0; industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-wholesale').click(function(){ ind_others_selected = 0; industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-transport').click(function(){ ind_others_selected = 0; industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-manufacturing').click(function(){ ind_others_selected = 0; industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-social').click(function(){ industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-construction').click(function(){ ind_others_selected = 0; industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-finance').click(function(){ ind_others_selected = 0; industrial_classification = ""; industrial_classification = $("input[name='customRadio']:checked").parent('').text(); $('#cis-others').attr('disabled', true); $('#cis-others').css('background-color', ''); $('#cis-others').val(""); }); $('#radio-others').click(function(){ ind_others_selected = 1; $('#cis-others').attr('disabled', false); $('#cis-others').css('background-color', 'transparent'); }); </script> <script> function resetAllFields(){ var customer_type = -1; var mode_of_payment_type = -1; var employee_type = -1; var industrial_classification = ""; var ind_others_selected = 0; var cash_selected = 0; var finance_selected = 0; $('#dd-dealer').val(0); $('#cis-vin').val(""); $('#cis-cs-number').val(""); $('#radio-individual').prop('checked', false); $('#radio-corporate').prop('checked', false); $('#radio-cash').prop('checked', false); $('#radio-financing').prop('checked', false); $('#cis-bank').val(""); $('#cis-terms').val(""); $('#cis-bank').attr('disabled', true); $('#cis-terms').attr('disabled', true); $('#cis-bank').css('background-color', ''); $('#cis-terms').css('background-color', ''); $('#cis-brand').val("").trigger('change'); $('#cis-model').val("").trigger('change'); $('#cis-source-of-release').val(""); $('#cis-insurance').val(""); $('#cis-color').val(""); $('#cis-sales-consultant').val(""); $('#delivery-date').val(""); $('#cis-group-manager').val(""); $('#cis-registered-name').val(""); $('#cis-end-user').val(""); $('#cis-personal-address').val(""); $('#cis-personal-mobile-1').val(""); $('#cis-personal-mobile-2').val(""); $('#cis-gender').val(0); $('#cis-status').val(0); $('#cis-children').val(""); $('#birth-date').val(""); $('#cis-nationality').val("608").trigger('change'); $('#cis-facebook').val(""); $('#radio-employed').prop('checked', false); $('#radio-self-employed').prop('checked', false); $('#cis-group-affiliations').val(""); $('#cis-brands-offered').val(""); $('#cis-position').val(""); $('#cis-company').val(""); $('#cis-company-email').val(""); $('#cis-company-address').val(""); $('#cis-company-mobile-1').val(""); $('#cis-company-mobile-2').val(""); $('#cis-landline').val(""); //$('#cis-industrial-classification').val(0); $('#cis-industrial-classification').prop('selected', false); $("#affiliations-list-table > tbody").empty(); // $('#radio-agriculture').prop('checked', false); // $('#radio-electricity').prop('checked', false); // $('#radio-wholesale').prop('checked', false); // $('#radio-transport').prop('checked', false); // $('#radio-manufacturing').prop('checked', false); // $('#radio-social').prop('checked', false); // $('#radio-construction').prop('checked', false); // $('#radio-finance').prop('checked', false); // $('#radio-others').prop('checked', false); // $('#cis-others').val(""); // $('#cis-others').attr('disabled', true); // $('#cis-others').css('background-color', ''); $('#radio-car-plan').prop('checked', false); $('#radio-company-car').prop('checked', false); $('#cis-customer-name').val(""); $('#dd-dealer').css("border", ""); $('#cis-cs-number').css("border", ""); $('#div-brand').css("border", ""); $('#div-model').css("border", ""); $('#cis-registered-name').css("border", ""); $('#cis-personal-mobile-1').css("border", ""); $('#birth-date').css("border", ""); $('#cis-customer-name').css("border", ""); } </script> <script> $('#cis-clear-fields').click(function(){ resetAllFields(); }); </script> <script> $('#cis-submit').click(function(){ var dealer_id = $('#dd-dealer').val(); var vin = $('#cis-vin').val(); var cs_number = $('#cis-cs-number').val(); var cust_type = ""; if(customer_type == 0){cust_type = "individual"}else if(customer_type == 1){cust_type = "corporate"} var payment = ""; if(mode_of_payment_type == 0){payment = "cash"}else if(mode_of_payment_type == 1){payment = "financing"} var mop_bank = $('#cis-bank').val(); var mop_terms = $('#cis-terms').val(); var brand_id = $('#cis-brand').val(); var model_id = $('#cis-model').val(); var source_of_release = $('#cis-source-of-release').val(); var insurance = $('#cis-insurance').val(); var color = $('#cis-color').val(); var sales_consultant = $('#cis-sales-consultant').val(); var delivery_date = $('#delivery-date').val(); var group_manager = $('#cis-group-manager').val(); var registered_name = $('#cis-registered-name').val(); var end_user_name = $('#cis-end-user').val(); var own_email = $('#cis-personal-email').val(); var own_address = $('#cis-personal-address').val(); var own_mobile_1 = $('#cis-personal-mobile-1').val(); var own_mobile_2 = $('#cis-personal-mobile-2').val(); var gender_id = $('#cis-gender').val(); var status = $('#cis-status').val(); var no_of_children = $('#cis-children').val(); var birth_date = $('#birth-date').val(); var nationality = $('#cis-nationality').val(); var fb_handle = $('#cis-facebook').val(); var employee = ""; if(employee_type == 0){employee = "employed"}else if(employee_type == 1){employee = "self-employed"} var affiliations = $('#cis-group-affiliations').val(); var brands_offered = $('#cis-brands-offered').val(); var position_title = $('#cis-position').val(); var company_name = $('#cis-company').val(); var company_email = $('#cis-company-email').val(); var company_address = $('#cis-company-address').val(); var company_mobile_1 = $('#cis-company-mobile-1').val(); var company_mobile_2 = $('#cis-company-mobile-2').val(); var landline = $('#cis-landline').val(); var fleet = $("input[name='customRadioFleet']:checked").parent('').text(); var customer_name = $('#cis-customer-name').val(); // var industry_class = ""; if(ind_others_selected == 0){industry_class = $("input[name='customRadio']:checked").parent('').text();}else{industry_class = $('#cis-others').val();} var industry_class = $('#cis-industrial-classification').val(); $('#dd-dealer').css("border", ""); $('#cis-cs-number').css("border", ""); $('#div-brand').css("border", ""); $('#div-model').css("border", ""); $('#cis-registered-name').css("border", ""); $('#cis-personal-mobile-1').css("border", ""); $('#birth-date').css("border", ""); $('#cis-customer-name').css("border", ""); if(isEmpty(customer_name)){ toastr.remove(); toastr.error("Customer name is empty"); $('#cis-customer-name').css("border", "1px solid #dc3545"); $('#cis-customer-name').focus(); switchTab(1); return; } if(isEmpty(dealer_id)){ toastr.remove(); toastr.error("Please select a dealer"); $('#dd-dealer').css("border", "1px solid #dc3545"); $('#dd-dealer').focus(); switchTab(1); return; } if(customer_type == -1){ toastr.remove(); toastr.error("Please specify the account type"); $('#div-account-type').css("border", "1px solid #dc3545"); $('#div-account-type').focus(); switchTab(1); return; } if(isEmpty(cs_number)){ toastr.remove(); toastr.error("CS No. cannot be left blank"); $('#cis-cs-number').css("border", "1px solid #dc3545"); $('#cis-cs-number').focus(); switchTab(1); return; } if(isEmpty(brand_id)){ toastr.remove(); toastr.error("Please select brand"); $('#div-brand').css("border", "1px solid #dc3545"); $('#cis-brand').focus(); switchTab(1); return; } if(isEmpty(model_id)){ toastr.remove(); toastr.error("Please select model"); $('#div-model').css("border", "1px solid #dc3545"); $('#cis-model').focus(); switchTab(1); return; } if(isEmpty(registered_name)){ toastr.remove(); toastr.error("Registered name cannot be left blank"); $('#cis-registered-name').css("border", "1px solid #dc3545"); $('#cis-registered-name').focus(); switchTab(2); return; } if(isEmpty(own_mobile_1)){ toastr.remove(); toastr.error("Please provide atleast one mobile number"); $('#cis-personal-mobile-1').css("border", "1px solid #dc3545"); $('#cis-personal-mobile-1').focus(); switchTab(2); return; } if(isEmpty(birth_date)){ toastr.remove(); toastr.error("Please provide birthdate"); $('#birth-date').css("border", "1px solid #dc3545"); $('#birth-date').focus(); switchTab(2); return; } //alert("success"); $.ajax({ url:"app/cis/create_cis_record.php", type:"POST", dataType:'json', data: { dealer_id: dealer_id, vin: vin, cs_number: cs_number, cust_type: cust_type, payment_type: payment, mop_bank: mop_bank, mop_terms: mop_terms, brand_id: brand_id, model_id: model_id, source_of_release: source_of_release, insurance: insurance, color: color, sales_consultant: sales_consultant, delivery_date: delivery_date, registered_name: registered_name, group_manager: group_manager, end_user_name: end_user_name, own_email: own_email, own_address: own_address, own_mobile_1: own_mobile_1, own_mobile_2: own_mobile_2, gender_id: gender_id, status: status, no_of_children: no_of_children, birth_date: birth_date, nationality: nationality, fb_handle: fb_handle, employee: employee, affiliations: getAllAffiliationsTableData(), brands_offered: brands_offered, position_title: position_title, company_name: company_name, company_email: company_email, company_address: company_address, company_mobile_1: company_mobile_1, company_mobile_2: company_mobile_2, landline: landline, industrial_classification: industry_class, fleet: fleet, customer_name: customer_name }, beforeSend: function(){ $('#cis-submit').attr('disabled', true); }, success: function(result){ if(result.status == 0){ toastr.remove(); toastr.error(result.message); $('#cis-submit').attr('disabled', false); return; } if(result.status == 1){ toastr.remove(); toastr.success(result.message); $('#cis-submit').attr('disabled', false); resetAllFields(); return; } } }); }); </script> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings