File manager - Edit - /home/autoph/public_html/connectv1/resources/views/customers/customer_view.php
Back
<?php include_once('cfg/db.php'); include_once("api/controllers/utility.php"); // include('app/security/security.php'); if (!isset($_SESSION['user']['id'])) { header('location:signin.php'); } // $check_page = new CheckPage(); // $check_page->start($db); //modify $bgColor ='transparent'; $disabled=''; if($_SESSION['user']['employee_role_id'] ==='156' ? 'disabled' : ''){ $bgColor ='#e9ecef'; $disabled ='disabled'; } //end modify if (!(isset($global_action_permissions['2']['3']) && in_array("1", $global_action_permissions['2']['3']))) { header('location:signin.php'); } $utility = new Utility(); $granted_company_ids = $utility->isNotEmpty($_SESSION['user']['company_permissions_implode']) ? $_SESSION['user']['company_permissions_implode'] : '-1'; if (!isset($_REQUEST['q'])) { header('location:customer.php'); } $customer_record_id = $db->escape($_REQUEST['q']); if (isset($global_action_permissions['2']['3']) && in_array("4", $global_action_permissions['2']['3'])) { $has_force_edit_permission = 1; } else { $has_force_edit_permission = 0; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="csrf-token" content="<?= csrf_token(); ?>"> <title><?php echo $variable['site_name']; ?> | Customers</title> <!-- <script src="dist/js/filter.js"></script> --> <!-- 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"> <!-- Theme style --> <link rel="stylesheet" href="dist/css/adminlte.min.css"> <!-- overlayScrollbars --> <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css"> <!-- Default style --> <link rel="stylesheet" href="dist/css/default.css"> <link href="plugins/bootstrap-table/css/bootstrap-table.min.css" rel="stylesheet"> <!-- daterange picker --> <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css"> <!-- iCheck for checkboxes and radio inputs --> <!-- <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css"> --> <!-- Bootstrap Color Picker --> <!-- <link rel="stylesheet" href="plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.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"> <!-- Bootstrap4 Duallistbox --> <!-- <link rel="stylesheet" href="plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css"> --> <!-- BS Stepper --> <!-- <link rel="stylesheet" href="plugins/bs-stepper/css/bs-stepper.min.css"> --> <!-- dropzonejs --> <link rel="stylesheet" href="plugins/dropzone/min/dropzone.min.css"> <!-- Theme style --> <link rel="stylesheet" href="dist/css/adminlte.min.css"> <link href="dist/img/<?php echo $variable['logo']; ?>" rel="icon" /> <!-- Ekko Lightbox --> <link rel="stylesheet" href="plugins/ekko-lightbox/ekko-lightbox.css"> <!-- SweetAlert2 --> <link rel="stylesheet" href="plugins/sweetalert2/sweetalert2.min.css"> <!-- Toastr --> <link rel="stylesheet" href="plugins/toastr/toastr.min.css"> <!-- Tempusdominus Bootstrap 4 --> <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css"> <!-- STARTMULTI --> <link rel="stylesheet" href="dist/css/bootstrap-multiselect.css" type="text/css"> <style> /*.dropzone { border: 2px dashed #3b9aff; border-radius: 5px; justify-content: center; background: #f5f5f5; } .dropzone i { font-size: 5rem; } .dropzone .dz-message { color: rgba(0, 0, 0, .54); font-weight: 500; font-size: initial; text-transform: uppercase; } .dropzone-image-preview { height: unset; width: 100%; }*/ /* modify*/ .dropzone { border: 2px dashed #007bff; border-radius: 10px; background: #f8f9fa; padding: 20px; text-align: center; transition: background 0.3s ease-in-out; } .dropzone:hover { background: #e2e6ea; } .dropzone .dz-message { color: #6c757d; font-size: 18px; margin: 0; } .dropzone .dz-message i { font-size: 50px; color: #007bff; } .dropzone .dz-preview .dz-remove { background-color: #dc3545; color: #fff; border: none; border-radius: 5px; padding: 5px 10px; cursor: pointer; } .dropzone .dz-preview .dz-remove:hover { background-color: #c82333; } #ltms-submit { /* background-color: #007bff; border-color: #007bff;*/ border-radius: 5px; padding: 5px 10px; font-size: 16px; } #btn-upload-ltms { background-color: #007bff; border-color: #007bff; border-radius: 5px; padding: 5px 10px; font-size: 16px; } #ltms-submit-cancel { /*background-color: #007bff; border-color: #007bff;*/ border-radius: 5px; padding: 5px 10px; font-size: 16px; } #btn-upload-ltms { float: right; border-radius: 5px; padding: 5px 10px; font-size: 16px; } .btn-info:hover { background-color: #0056b3; border-color: #004085; } .loading-indicator { display: flex; align-items: center; justify-content: center; color: #007bff; } .loading-indicator i { font-size: 24px; } /*end modify*/ #customer-modal-tab .nav-link.active, #vehicle-modal-tab .nav-link.active, .nav-item.active { color: rgb(0 123 255); border-bottom: 1px solid rgb(0 123 255) !important; } .custom-badge { padding: .30em .4em; position: absolute; top: 9px; font-weight: 500; line-height: 0.6; } #children-list-table .bootstrap-datetimepicker-widget { position: relative !important; /* height: 200px; */ top: 0px !important; } .fixed-table-width { table-layout: fixed; width: 100px; } .fixed-table-width td { /* border: 1px solid green; */ overflow: hidden; } /* Chrome, Safari, Edge, Opera */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } /* Firefox */ input[type=number] { -moz-appearance: textfield; } .no-border-card { box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, 0); } .big-letter { text-transform: uppercase; } /* .nav-link.active { font-weight: bold; } */ .badge { font-size: 85%; } table.fixed { table-layout: fixed; } table.fixed td { overflow: hidden; } .hidden { display: none; } .btnRemove { display: visible; } table { cursor: pointer; } table th { cursor: default; } .form-div { margin-top: 100px; border: 1px solid #e0e0e0; } #profileDisplay { display: block; height: 160px; width: 160px; margin: 0px auto; border-radius: 50%; < } .blue-color { color: blue; } .tab1 { tab-size: 4; } .img-placeholder { width: 160px; color: white; height: 160px; background: none; opacity: .7; border-radius: 50%; z-index: 2; position: absolute; left: 50%; transform: translateX(-50%); display: none; } .img-placeholder h4 { margin-top: 40%; color: white; } .img-div:hover .img-placeholder { display: block; cursor: pointer; } fieldset { margin-left: 2px; margin-right: 2px; padding-top: 0.35em; padding-bottom: 0.625em; padding-left: 0.75em; padding-right: 0.75em; border: 1px solid gray; border-radius: 3%; } legend { font-size: 16px; font-weight: bold; color: blue; } .lbl { font-size: 90%; font-weight: normal !important; } .input { font-size: 90%; font-weight: normal !important; background-color: white !important; } .lbl-forms { font-size: 90%; font-weight: bold; } .lbl-forms-sm { font-size: 90%; height: 28px !important; } .input-forms { font-size: 95%; font-weight: normal !important; background-color: white !important; } .span-labels { font-size: 90%; font-style: italic; } .span-values { font-size: 90%; } table { font-size: 90%; } .list-group-item { padding: .25rem .50rem; } .edit-customer { height: 70%; } .bootstrap-datetimepicker-widget { z-index: 99999 !important; } /* SEARCH*/ /* Styles for wrapping the search box */ .main { width: 50%; margin: 50px auto; } /* Bootstrap 4 text input with search icon */ .has-search .form-control { padding-left: 2.375rem; } .has-search .form-control-feedback { position: absolute; z-index: 2; display: block; width: 2.375rem; height: 2.375rem; line-height: 2.375rem; text-align: center; pointer-events: none; color: #aaa; } /* modal image view css*/ #imageModal .modal-dialog { width: 90%; /* Adjust modal width as needed */ max-width: 1200px; /* Maximum width of the modal */ } #imageModal .modal-body { text-align: center; } #imageModal .modal-body img { max-width: 100%; /* Ensure the image doesn't exceed the modal width */ height: auto; /* Maintain aspect ratio */ } #imageModal .modal-custom { width: 80%; /* Adjust the width as needed */ max-width: 800px; /* Set a maximum width */ } #imageModal { z-index: 1051; /* Increase this value if needed */ } /* Custom modal styling for smaller size */ #modal-ltms-filter .modal-dialog.modal-sm { max-width: 600px; margin: 30px auto; } /* Center and contain image within modal */ #modalImage { width: 100%; max-height: 500px; object-fit: contain; } </style> </head> <body class="hold-transition sidebar-mini text-sm layout-fixed"> <!-- body class="hold-transition sidebar-mini text-sm" oncopy = 'return false' oncut = 'return false' onselectstart = 'return false' > --> <div class="wrapper"> <div class="preloader flex-column justify-content-center align-items-center" hidden> <img class="animation__shake" src="dist/img/<?php echo $variable['logo']; ?>" alt="<?php echo $variable['logo']; ?>" height="60" width="60"> </div> <!-- INCLUDE HEADER --> <?php include('include/header.php'); ?> <?php include('include/sidebar.php'); ?> <!-- Content Wrapper. Contains page content --> <div id="upper" class="content-wrapper"> <!-- Content Header (Page header) --> <!-- START --> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md mt-3"> <div id="customer-details" class="div-block card card-primary"> <div class="card-header"> <h3 class="card-title"><button class="btn btn-tool" title="Go to Customer table list" type="button" onclick="back()"><i class="fas fa-arrow-alt-circle-left fa-2x"></i></button> <span id="h3-card-title"></span></h3> </div> <!--card-header--> <div class="card shadow-none mb-0"> <div class="overlay" id="loader" style="display:none;"> <div class="fas fa-2x fa-sync-alt fa-spin "> </div> <strong><span class="ml-2" id="loading-message"> Loading, please wait...</span></strong> </div> <div class="overlay" id="loader-vehicle" style="display:none;"> <div class="fas fa-2x fa-sync-alt fa-spin "> </div> <strong><span class="ml-2" id="loading-message"> Loading, please wait...</span></strong> </div> <div class="card-body" style="padding-top: 1.00rem;padding-right: 0rem;padding-left: 0rem;"> <div class="col-12 col-sm-12"> <div class="card card-primary card-outline card-tabs shadow-none mb-0"> <div class="card-header p-0 pt-1 border-bottom-0"> <!-- <div id="app" class=" border-bottom"> --> <div id="app" class=""> <nav class="navbar navbar-expand-md navbar-light 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" id="custom-tabs-three-tab" role="tablist"> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-three-home-tab" data-toggle="pill" href="#custom-tabs-three-home-tab-content" role="tab" aria-controls="custom-tabs-three-home-tab-content" aria-selected="true">Information</a> </li> <li class="nav-item" id="customer-family-tab"> <a class="nav-link customer-tab px-2" id="custom-tabs-three-family-tab" data-toggle="pill" href="#custom-tabs-three-family-tab-content" role="tab" aria-controls="custom-tabs-three-family-tab-content" aria-selected="false">Family</a> </li> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-three-hobbies-tab" data-toggle="pill" href="#custom-tabs-three-hobbies-tab-content" role="tab" aria-controls="custom-tabs-three-hobbies-tab-content" aria-selected="false">Affiliations</a> </li> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-three-gallery-tab" data-toggle="pill" href="#custom-tabs-three-gallery-tab-content" role="tab" aria-controls="custom-tabs-three-gallery-tab-content" aria-selected="false">Gallery</a> </li> <li class="nav-item" style="display:none;" id="customer-corporation_individuals-tab"> <a class="nav-link customer-tab px-2" id="custom-tabs-three-individuals-tab" data-toggle="pill" href="#custom-tabs-three-individuals-tab-content" role="tab" aria-controls="custom-tabs-three-individuals-tab-content" aria-selected="false">Connected Individuals</a> </li> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-vehicle-tab" data-toggle="pill" href="#custom-tabs-vehicle-tab-content" role="tab" aria-controls="custom-tabs-vehicle-tab-content" aria-selected="false">Vehicles</a> </li> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-service-tab" data-toggle="pill" href="#custom-tabs-service-tab-content" role="tab" aria-controls="custom-tabs-service-tab-content" aria-selected="false">Service</a> </li> <?php /* <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-sales-tab" data-toggle="pill" href="#custom-tabs-sales-tab-content" role="tab" aria-controls="custom-tabs-sales-tab-content" aria-selected="false">Sales</a> </li> */ ?> <?php /*<li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-insurance-tab" data-toggle="pill" href="#custom-tabs-insurance-tab-content" role="tab" aria-controls="custom-tabs-insurance-tab-content" aria-selected="false">Insurance</a> </li> */ ?> <!-- <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-customer-activity-tab" data-toggle="pill" href="#custom-tabs-customer-activity-tab-content" role="tab" aria-controls="custom-tabs-customer-activity-tab-content" aria-selected="false">Activities</a> </li> --> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-customer-activities-tab" data-toggle="pill" href="#custom-tabs-customer-activities-tab-content" role="tab" aria-controls="custom-tabs-customer-activities-tab-content" aria-selected="false">Activities</a> </li> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-customer-ltms-tab" data-toggle="pill" href="#custom-tabs-customer-ltms-tab-content" role="tab" aria-controls="custom-tabs-customer-ltms-tab-content" aria-selected="false">LTMS</a> </li> <li class="nav-item"> <a class="nav-link customer-tab px-2" id="custom-tabs-customer-logs-tab" data-toggle="pill" href="#custom-tabs-customer-logs-tab-content" role="tab" aria-controls="custom-tabs-customer-logs-tab-content" aria-selected="false">Logs</a> </li> </ul> <ul class="navbar-nav mt-1" id="customer-info-button" style="display:none;"> <li class="nav-item"> <?php if ( isset($global_action_permissions['2']['3']) && in_array("3", $global_action_permissions['2']['3']) ) { ?> <input type="button" onclick="customerModal()" class="btn btn-primary btn-sm mr-1" value="Edit Customers" title="Edit Customer" data-toggle="modal" data-target="#modal-customer"></input> <?php } ?> <?php if (isset($global_action_permissions['2']['3']) && in_array("5", $global_action_permissions['2']['3'])) { ?> <input type="button" onclick="" style="width:65px;" id="customer_delete_action" class="btn btn-danger btn-sm" value="Remove" title="Remove Customer"></input> <?php } ?> </li> </ul> <ul class="navbar-nav mt-1" id="customer-gallery-button" style="display:none;"> <li class="nav-item"> </li> </ul> <ul class="navbar-nav mt-1" id="customer-vehicle-button" style="display:none;"> <li class="nav-item"> <input type="button" class="btn btn-primary btn-sm mr-1" value="New Vehicle" title="New Vehicle"></input> </li> </ul> </div> </nav> </div> </div> <div class="card-body" style="padding-top: 0.30rem;padding-right: .50rem;padding-left: .50rem;"> <div class="tab-content" id="custom-tabs-three-tabContent"> <div class="tab-pane fade show customer-tab-content" id="custom-tabs-three-home-tab-content" role="tabpanel" aria-labelledby="custom-tabs-three-home-tab"> <div class="row d-flex align-items-stretch"> <div class="col-md-4 d-flex align-items-stretch"> <?php include 'include/components/customer/customer_about_side.php'; ?> </div> <div class="col-md-8 d-flex align-items-stretch"> <?php // include 'include/components/customer/customer_individual_information.php'; // include 'include/components/customer/customer_corporate_information.php'; include 'include/components/customer/customer_information.php'; ?> <!-- DITO ILALAGAY YUNG MODAL KASI GAGAMITIN RIN YAN SA PAG ADD --> </div> </div> </div> <div class="tab-pane fade customer-tab-content" id="custom-tabs-three-family-tab-content" role="tabpanel" aria-labelledby="custom-tabs-three-family-tab"> <?php include 'include/components/customer/customer_family.php'; ?> </div> <div class="tab-pane fade customer-tab-content" id="custom-tabs-vehicle-tab-content" role="tabpanel" aria-labelledby="custom-tabs-vehicle-tab"> <?php include 'include/components/customer/customer_vehicle.php'; // include 'include/components/customer/customer_vehicle_information.php'; ?> </div> <div class="tab-pane fade customer-tab-content" id="custom-tabs-service-tab-content" role="tabpanel" aria-labelledby="custom-tabs-service-tab"> <?php include 'include/components/customer/customer_service.php'; // include 'include/components/customer/customer_service_information.php'; ?> </div> <?php /* <div class="tab-pane fade customer-tab-content" id="custom-tabs-sales-tab-content" role="tabpanel" aria-labelledby="custom-tabs-sales-tab"> <?php include 'include/components/customer/customer_sales.php'; // include 'include/components/customer/customer_sales_information.php'; ?> </div> */ ?> <div class="tab-pane fade customer-tab-content" id="custom-tabs-customer-activities-tab-content" role="tabpanel" aria-labelledby="custom-tabs-customer-activities-tab"> <?php include 'include/components/customer/customer_activities.php'; ?> </div> <!-- LTMS --> <!-- <div class="tab-pane fade vehicle-tab-content" id="custom-tabs-customer-ltms-tab-content" role="tabpanel" aria-labelledby="custom-tabs-three-gallery-tab"> <div class="row col-md-12"><button class="btn btn-sm btn-info float-right mt-3 mb-2 float-right" type="button" id="btn-upload-ltms">Upload</button></div> <div id="ltms-container" style="display:none"> <div class="col-md-12"> <form id="upload-ltms-photo" class="dropzone dz-clickable" action="javascript:void(0);"> <input type="hidden" id="did" name="did"> <div class="dz-message d-flex flex-column" > <i class="fa fa-cloud-upload-alt"></i> <strong>Drag & Drop here or click</strong> </div> </form> </div> <button class="btn btn-sm btn-success float-right mt-3" id="ltms-submit" type="button">Submit</button> <button class="btn btn-sm btn-secondary float-right mt-3 mr-1" id="ltms-submit-cancel" type="button">Cancel</button> <div id="customer-sales-image-data" class="row"></div> <div id="loading-indicator" style="display:none;"> <i class="fa fa-spinner fa-spin"></i> Uploading... </div> </div> <div id="customer-ltms-image-data" class="row"></div> </div> --> <div class="tab-pane fade customer-tab-content" id="custom-tabs-customer-ltms-tab-content" role="tabpanel" aria-labelledby="custom-tabs-customer-ltms-tab"> <!-- <div class="row col-md-12"> <button class="btn btn-sm btn-info float-right mt-3 mb-2" type="button" id="btn-upload-ltms">Upload</button> </div> --> <div class="row"> <div class="col-md-12 text-right"> <button type="button" id="btn-attach-ltms" class="btn btn-sm btn-primary ml-2" data-toggle="modal" data-target="#modal-ltms-filter"> <i class="fa fa-paperclip"></i> Attach </button> <button class="btn btn-sm btn-primary ml-2" type="button" id="btn-upload-ltms"> <i class="fa fa-upload"></i> Upload </button> </div> </div> <!-- IMAGE MODAL --> <div id="imageModal" class="modal fade" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="imageModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm" role="document"> <!-- Use modal-sm for smaller size --> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body view-modal-img-body"> <div class="form-group"> <label for="modalCustomerName">Customer Name:</label> <p id="modalCustomerName" class="form-control-static"></p> </div> <div class="form-group"> <label for="modalFilename">Filename:</label> <p id="modalFilename" class="form-control-static"></p> </div> <div class="form-group"> <img id="modalImage" src="" alt="Uploaded Image" class="img-responsive"> </div> </div> <!-- <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> --> </div> </div> </div> <!-- END IMAGE MODAL --> <!-- LTMS FILTER MODAL --> <div id="modal-ltms-filter" class="modal fade" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="ltmsFilterLabel" aria-hidden="true"> <div class="modal-dialog modal-sm" role="document"> <!-- Use modal-sm for smaller size --> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body modal-ltms-list-modal"> <div id="ltms-list" class="ltms-table"> <table id="ltms-table" data-search="true" data-custom-search="customSearch" data-buttons="buttonsFunction" data-url="" class="table table-bordered table-hover table-sm" data-query-params="queryParams" data-pagination="true"> <thead> <tr> <th data-field="fullname" data-sortable="false" style="text-align: center;">Name</th> <th data-field="filename">File</th> <th data-field="created_at">Date uploaded</th> <th data-field="action">Action</th> </tr> </thead> <tbody> </tbody> </table> <div class="card" id="grid-card" style="box-shadow: 0 0 0 0"> <div class="overlay" id="loader-main" style="display:none;"> <div class="fas fa-2x fa-sync-alt fa-spin "></div> <strong><span class="ml-2" id="loading-message-grid"> Loading, please wait...</span></strong> </div> <div class="card-body pb-0" id="customer-grid" style="padding: .50rem"> <div class="row d-flex align-items-stretch" id="customer-grid-data"></div> </div> <div id="grid-page-footer-customer"> <div class="card-footer"> <nav aria-label="Customer Page Navigation"> <ul class="pagination justify-content-center m-0" id="customer-grid-data-paging"></ul> </nav> </div> </div> </div> </div> </div> <!-- <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> --> </div> </div> </div> <!-- END LTMS FILTER MODAL --> <!-- END MODAL SEARCH --> <div id="ltms-container" style="display:none"> <div class="col-md-12"> <form id="upload-ltms-photo" class="dropzone dz-clickable" action="javascript:void(0);"> <input type="hidden" id="did" name="did"> <div class="dz-message d-flex flex-column"> <i class="fa fa-cloud-upload-alt"></i> <strong>Drag & Drop here or click</strong> </div> </form> </div> <button class="btn btn-sm btn-success float-right mt-3" id="ltms-submit" type="button">Submit</button> <button class="btn btn-sm btn-secondary float-right mt-3 mr-1" id="ltms-submit-cancel" type="button">Cancel</button> <div id="customer-sales-image-data" class="row"></div> <div id="loading-indicator" style="display:none;"> <i class="fa fa-spinner fa-spin"></i> Uploading... </div> </div> <div id="customer-ltms-image-data" class="row"></div> </div> <!-- END LTMS --> <div class="tab-pane fade customer-tab-content" id="custom-tabs-customer-logs-tab-content" role="tabpanel" aria-labelledby="custom-tabs-customer-logs-tab"> <?php include 'include/components/customer/customer_logs.php'; ?> </div> <div class="tab-pane fade customer-tab-content" id="custom-tabs-three-individuals-tab-content" role="tabpanel" aria-labelledby="custom-tabs-three-individuals-tab"> <?php include 'include/components/customer/corporation_individual.php'; ?> </div> <div class="tab-pane fade customer-tab-content" id="custom-tabs-three-hobbies-tab-content" role="tabpanel" aria-labelledby="custom-tabs-three-hobbies-tab"> <?php include 'include/components/customer/customer_affiliations.php'; // include 'include/components/customer/customer_sales_information.php'; ?> </div> <div class="tab-pane fade customer-tab-content" id="custom-tabs-three-gallery-tab-content" role="tabpanel" aria-labelledby="custom-tabs-three-gallery-tab"> <div id="customer-sales-image-data" class="row"> </div> </div> <!-- <div class="tab-pane fade customer-tab-content" id="custom-tabs-insurance-tab-content" role="tabpanel" aria-labelledby="custom-tabs-insurance-tab"> <?php include 'include/components/customer/customer_insurance.php'; ?> </div> --> <!-- /.card --> </div> </div> </div> <!--card-body--> </div> <!--card--> </div> <!--card card-primary--> </div> <!--col-md--> </div> <!--row--> </div> <!--container-fluid--> </div> <!--container-fluid--> </div> <!--container-fluid--> <?php if ( (isset($global_action_permissions['2']['3']) && in_array("3", $global_action_permissions['2']['3'])) ) { ?> <?php include 'include/components/customer/modal/customer_form.php'; ?> <?php } ?> <?php include __DIR__ . '/activity_modal.php'; ?> <div id="vehicle_form"> </div> </section> <!-- END --> </div> <!--content-wrapper--> <!-- Modal Here --> <?php include('include/footer.php'); ?> <aside class="control-sidebar control-sidebar-dark"></aside> </div><!-- ./wrapper --> <!-- jQuery --> <script src="plugins/jquery/jquery.min.js"></script> <!-- AdminLTE App --> <script src="dist/js/adminlte.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> <!-- Select2 --> <script src="plugins/select2/js/select2.full.min.js"></script> <!-- Bootstrap4 Duallistbox --> <script src="plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.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> <!-- bootstrap color picker --> <!-- <script src="plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script> --> <!-- Tempusdominus Bootstrap 4 --> <script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script> <!-- Bootstrap Switch --> <!-- <script src="plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script> --> <!-- BS-Stepper --> <!-- <script src="plugins/bs-stepper/js/bs-stepper.min.js"></script> --> <!-- dropzonejs --> <script src="plugins/dropzone/min/dropzone.min.js"></script> <!-- bs-custom-file-input --> <script src="plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script> <!-- jquery-validation --> <!-- <script src="plugins/jquery-validation/jquery.validate.min.js"></script> <script src="plugins/jquery-validation/additional-methods.min.js"></script> --> <!-- Navigation Highlight --> <script src="dist/js/main.js"></script> <!-- Page specific script --> <!-- jQuery Cookie--> <script src="plugins/jquery-cookie/jquery.cookie.js"></script> <!-- Ekko Lightbox --> <script src="plugins/ekko-lightbox/ekko-lightbox.min.js"></script> <!-- SweetAlert2 --> <script src="plugins/sweetalert2/sweetalert2.min.js"></script> <!-- Toastr --> <script src="plugins/toastr/toastr.min.js"></script> <script src="plugins/bootstrap-table/js/tableExport.min.js"></script> <script src="plugins/bootstrap-table/js/bootstrap-table.min.js"></script> <script src="plugins/bootstrap-table/js/bootstrap-table-en-US.js"></script> <script src="plugins/bootstrap-table/js/bootstrap-table-export.min.js"></script> <script src="dist/js/jquery.balloon.min.js"></script> <script src="dist/js/customer_form.js"></script> <script> //GLOBALS WITH PHP const customer_record_id = '<?php echo $customer_record_id; ?>'; const apiKeyss = '<?=base64_encode('0384059835093403')?>'; const location_url = '<?php echo $variable['site_link'] ?>'; const location_source = 'customer_view'; const customer_force_edit = <?php echo $has_force_edit_permission; ?>; // ------ working code yet to be fixed (khel) $('#finance-table').on('click-cell.bs.table', function(field, value, row, $el) { // alert(1); plate_cs_number = $el.plate_cs_number1; window.location.href = "/financelist/" + plate_cs_number; }); </script> <script src="dist/js/customer/customer_view.js"></script> <script src="dist/js/customer/activity_modal.js"></script> <script src="dist/js/customer/ltms.js"></script> <!-- <script src="dist/js/customer/ltms_list_uploaded.js"></script> <script src="dist/js/customer/ltms_uploaded.js"></script> --> <script type="text/javascript"> function loadScript(url, callback) { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = url; script.onload = function () { if (callback) { callback(); } }; document.body.appendChild(script); } $(document).ready(function() { $('#btn-attach-ltms').on('click', function() { loadScript('dist/js/customer/ltms_list_uploaded.js', function() { console.log('ltms_list_uploaded.js loaded.'); }); loadScript('dist/js/customer/ltms_uploaded.js', function() { console.log('ltms_uploaded.js loaded.'); }); }); $('#ltms-table').on('click', '.image-link', function (e) { e.preventDefault(); // Get the image URL and other data from the data attributes const imageUrl = $(this).data('url'); const customerName = $(this).data('customer-name'); const filename = $(this).data('filename'); // Set the image source and text in the modal $('#modalImage').attr('src', imageUrl); $('#modalCustomerName').text('Customer Name: ' + customerName); $('#modalFilename').text('Filename: ' + filename); // Show the image modal and hide the current one $('#imageModal').modal('show'); }); // When the image modal is hidden, show the first modal again $('#imageModal').on('hidden.bs.modal', function () { $('#modal-ltms-filter').modal('show'); }); $('#ltms-table').on('click', '#btn-attach-cu', function() { // Get the data-id attribute value of the clicked button var ltmsId = $(this).data('id'); Swal.fire({ icon: 'question', html: 'Are you sure you want to attach this file to this customer?', showDenyButton: false, showCancelButton: true, confirmButtonText: `Confirm`, denyButtonText: `Don't Confirm`, timer: 1500, }).then((result) => { if (result.isConfirmed) { $.ajax({ url: 'api/customer/ltms_ajax.php', // Replace with your server endpoint URL method: 'POST', data: { apiKey: apiKeyss , id: ltmsId ,cid: customer_record_id}, dataType: 'json', success: function(response) { // Handle successful response console.log('Success:', response); console.log(response.status); if(response.status ==1) { Swal.fire({ title: "Success!", text: response.message, icon: "success" }); refreshTableCustomer(); } }, error: function(xhr, status, error) { // Handle errors console.error('Error:', error); Swal.fire({ title: "Error!", text: response.message, icon: "danger" }); } }); } }); }); }); </script> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings