File manager - Edit - /home/autoph/public_html/connect/home/cust_add_new_customer.php
Back
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .loader { border: 12px solid #f3f3f3; border-radius: 50%; border-top: 12px solid blue; border-bottom: 12px solid blue; width: 200px; height: 200px; -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite; } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> <title></title> <style type="text/css"> body{ background:#fafcfc; } a{ text-decoration:none; } } #wrapper{ width:50%; height:auto; margin:10px auto; border:1px solid #cbcbcb; background:white; } #comment_input_from li{ list-style-type:none; margin:5px auto; } #comment_input_from{ width:100%; margin:0px; background: #dde2e4 ; padding:10px; } #display_area{ width:100%; margin:00px auto; background:#fafcfc; padding:2px; height:200px; overflow:auto; border:0px solid gray; } #submit_name{ width:30%; min-width:150px; margin:20px; padding:20px; } #name, textarea{ width:100%; } </style> </head> <!----==============================================================-----> <!----==============================================================-----> <script type="text/javascript"> function hideShowImportForm() { var div = document.getElementById("dataImportForm"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none' } } function showLocationFilter() { var diva = document.getElementById("viewLocationFilter"); var divb= document.getElementById("viewSectorFilter"); var divc= document.getElementById("viewPersonalInfo"); if (diva.style.display == 'none') { diva.style.display = ''; divb.style.display = 'none'; divc.style.display = 'none'; } } function showSectorFilter() { var diva = document.getElementById("viewLocationFilter"); var divb= document.getElementById("viewSectorFilter"); var divc= document.getElementById("viewPersonalInfo"); if (divb.style.display == 'none') { divb.style.display = ''; diva.style.display = 'none'; divc.style.display = 'none'; } } function showBarangayFilter() { var diva = document.getElementById("viewLocationFilter"); var divb= document.getElementById("viewSectorFilter"); var divc= document.getElementById("viewPersonalInfo"); if (divc.style.display == 'none') { divc.style.display = ''; divb.style.display = 'none'; diva.style.display = 'none'; } } function showAdd() { var div = document.getElementById("addForm"); var divD= document.getElementById("display_area"); var divE= document.getElementById("LatestDataForm"); if (div.style.display == 'none') { div.style.display = ''; divE.style.display = 'None'; divD.style.display = 'none'; } else { divD.style.display = 'none'; div.style.display = 'none'; divE.style.display = 'none'; } } function showAddXXX() { var div = document.getElementById("addForm"); var divD= document.getElementById("display_area"); var divE= document.getElementById("LatestDataForm"); if (div.style.display == 'none') { div.style.display = 'none'; divE.style.display = ''; divD.style.display = 'none'; } else { divD.style.display = 'none'; div.style.display = 'none'; divE.style.display = ''; } } function viewFilterDataList() { var div = document.getElementById("viewFilterDataForm"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showExportRequestFrom() { var divA = document.getElementById("ExportRequestFrom"); if (divA.style.display == 'none') { divA.style.display = ''; } else { divA.style.display = 'none'; } } function showDisplayArea() { var divA = document.getElementById("addForm"); var divD = document.getElementById("display_area"); var divE= document.getElementById("LatestDataForm"); if (divD.style.display == 'none') { divD.style.display = ''; divA.style.display = 'none'; divE.style.display = 'none'; } else { divD.style.display = ''; divA.style.display = 'none'; divE.style.display = 'none'; } } function ShowFormFilterA(){ var div = document.getElementById("FormFilterA"); var divb = document.getElementById("FormFilterB"); var filterData = $("#filterData").val(); // alert(filterData); if (filterData === 'filterA') { div.style.display = ''; divb.style.display = 'none'; } if (filterData === 'filterB') { divb.style.display = ''; div.style.display = 'none'; } } function viewList() { var div = document.getElementById("details_div"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } </script> <!-- CODE FOR MODEL DROPDOWN AUTO Loading --> <script> //======================================================================================== //SHOW MUNICIPALITY FOR NEXT FILTER //======================================================================================== function showMunicipalityList(str) { if (str == "") { document.getElementById("filterMunicipality").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("filterMunicipality").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","add_new_load_municipality_based_on_selected_region.php?q="+str,true); xmlhttp.send(); } } //======================================================================================== //SHOW FILTERED CITY //======================================================================================== function showCityList(str) { if (str == "") { document.getElementById("filterCity").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("filterCity").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","add_new_load_city_based_on_selected_municipality.php?q="+str,true); xmlhttp.send(); } } //======================================================================================== //LOAD FILTERED BARANGAY //======================================================================================== function showBarangayList(str) { if (str == "") { document.getElementById("filterBarangay").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("filterBarangay").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","add_new_load_barangays_based_on_selected_city.php?q="+str,true); xmlhttp.send(); } } //======================================================================================== //======================================================================================== function showUser(str) { if (str == "") { document.getElementById("svCity").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("svCity").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","add_new_load_city_based_on_selected_municipality.php?q="+str,true); xmlhttp.send(); } } //show barangays based on selected cities function showBrgy(str) { if (str == "") { document.getElementById("svBrgy").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("svBrgy").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","add_new_load_barangays_based_on_selected_city.php?q="+str,true); xmlhttp.send(); } } //show municipalities based onselected region_code` function showRegion(str) { if (str == "") { document.getElementById("svMunicipality").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("svMunicipality").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","add_new_load_municipality_based_on_selected_region.php?q="+str,true); xmlhttp.send(); } } </script> <body> <div style='border:0px solid gray;width:100%;height:100%;float:left;margin:0px;min-width:800px;background:white'> <div class='bgColor' style='vertical-align:top;height:35px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:18px;color:#043062'>Customer Database Module: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=14&ex=refresh' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='mainindex.php?id=14&ex=true' class='hideClick hidden' > ✉ </a> <!--EXTRACT LIST OF COMPANY AND EXPORT TO EXCEL--> <a href='mainindex.php?id=1' class='hideClick hidden' style='font-weight:bold'> ✕ </a> </div> </div> <div style='border-bottom:1px solid gray;width:100%;min-width:400px'> <div style='border:0px solid red;border-bottom:1px solid gray;background:lightgray;padding:5px;height:60px;width:100%;margin:0px;float:left;min-width:150px'> <input type="text" id="searchString" placeholder="Search based on LastName, First Name, E-mail, Mobile" style='width:30%;min-width:100px;float:left;height:30px;margin:5px;margin-right:-5px;border-right:0px solid red' onkeyup="this.value = this.value.toUpperCase();"> <input onclick="showDisplayArea()" type="submit" id="submit_nameX" value="Search...x" style="width:10%;margin:0px;float:left;height:30px;padding:3px;margin:5px;border-radius:0px 3px 3px 0px;"> <input type="submit" id="submit_view_reports" value="☰ Reports" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <input type="submit" id="submit_view_list" onclick="viewFilterDataList()" value="☳ Filter Clients" style="width:10%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <input type="submit" id="submit_import" value="≚ Import" onclick="hideShowImportForm()" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <!-- Direct Export without approval<input type="submit" id="submit_export" value="≙ Export" onclick="window.location='export_non_fleet_account.php'" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;">--> <input type="submit" id="submit_export" value="≙ Export Data" onclick="showExportRequestFrom()" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <input type="submit" onclick="showAdd()" id="submit_add_new" value="✛ Add New" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> </div> </div> <!-- =======================IMPORT FORM===================================================== --> <div id="dataImportForm" style="display:none;position:absolute;top:5px;left:5px;width:550px;height:300px;background:transparent;z-index:9999;border:0px solid gray;"> <div style='width:500px;padding:0px;border:1px solid gray;height:250px;position:absolute;top:10px;left:10px;z-index:99999;background:white'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;color:#043062'>Upload New Service Appointment (CSV Format): <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=23&d=4' class='hideClick hidden' style='font-weight:bold'> ✕ </a> </div> <?php include 'import_non_fleet_database.php';?> </div> </div> </div> <!-- ============================================================================ --> <!-- ============================================================================ --> <div id="display_area" style='height:630px;display:none;border:0px solid blue'> </div> <!-- ============================================================================ --><!-- ============================================================================ --> <div id="dashboardByGender" style='position:absolute;top:00px;left:50px;width:90%;min-width:1250px;height:700px;background:white;display:none;z-index:9999;margin-top:50px;border:1px solid gray'> <div class='bgColor' style='background:lightgray;vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:18px;color:#043062'> 📰 Filtered Data: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='#' onclick="viewDashboardDataByGenderMale()" style='font-weight:bold'> ✕ </a> </div> </div> <div style='width:100%;height:612px;border:0px solid lightgray;padding:2px;'> <div id="displayFilteredByGender" style='width:100%;height:665px;display:blocked;border:1px solid blue;overflow:auto'> </div> </div> </div> <!-- ============================================================================HEADER============================================================================ --> <div id="viewFilterDataForm" style='position:absolute;top:00px;left:50px;width:90%;min-width:1250px;height:790px;background:white;display:none;z-index:9999;margin-top:50px;border:1px solid gray'> <div class='bgColor' style='background:lightgray;vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:18px;color:#043062'> 📰 CUSTOMIZE SEARCH <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='#' onclick="viewFilterDataList()" style='font-weight:bold'> ✕ </a> </div> </div> <!-- ============================================================================FILTER BOX============================================================================ --> <div class='bgColor' style='maring:0px;background:#fcf3cf;vertical-align:top;height:150px;width:100%;border-bottom:1px solid gray;padding:1px;font-family:Verdana;font-weight:normal;font-size:14px;color:#043062'> <div style="margin-bottom:2px;width:100%;height:20px;margin-left:10px;margin-top:10px;font-size:14px;">🍳 <u>Filter By:</u></div> <div id="filterSelection" style="border:0px solid gray;width:50%;margin-left:10px;height:30px;top-margin:-10px"> <input type="submit" onclick="showLocationFilter()" value="🌐 Location" id="byLocation" style="float:left;width:200px;height:100%;margin:0px;border:1px solid gray;border-radius:0px;padding:5px;border-right:0px;border-bottom:0px"> <input type="submit" onclick="showSectorFilter()" value="🏥 Business Sector" id="bySector" style="float:left;width:140px;height:100%;margin:0px;border:1px solid gray;border-radius:0px;padding:5px;border-right:0px;border-bottom:0px"> <input type="submit" onclick="showBarangayFilter()" value="👣 About the Client" id="by" style="float:left;width:200px;height:100%;margin:0px;border:1px solid gray;border-radius:0px;padding:5px;border-bottom:0px"> </div> <div id="viewLocationFilter" style="float:left;border:1px solid gray;width:20%;margin-left:10px;min-width:250px;height:690px;top-margin:-10px;background: #7fb3d5 "> <div style="margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> By Region: <select id='filterDataString' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showMunicipalityList(this.value)"> <option value="">-- --</option> <option value="NA">--Select All--</option> <?php $getAllRegion = mysql_query("SELECT DISTINCT(`region_code`) FROM `loc_region` WHERE `region_code`!='' ORDER BY `region_code` ASC"); while($row = mysql_fetch_array($getAllRegion)){ echo "<option id=".$row['region_code'].">".$row['region_code']."</option>"; } ?> </select> </div> <div style="margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> By Municipality: <select id='filterMunicipality' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showCityList(this.value)"> </select> </div> <div style="margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> By City: <select id='filterCity' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showBarangayList(this.value)"> </select> </div> <div style="margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> By Barangay Level: <select id='filterBarangay' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px'> </select>5px </div> <div style="margin:5px;float:left;width:97.7%; min-width:250px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> Search by First Name / Lastname: <input type="text" id="searchTextName" placeholder="" style="margin:2px;width:67%;padding:5px;border:1px solid gray;"> <input type="button" id="btnSearchName" value="🔎 Search" style="width:30%;padding:3px;"> </div> </div> <div id="viewSectorFilter" style="float:left;display:none;border:1px solid gray;width:20%;min-width:250px;margin-left:10px;height:690px;top-margin:-10px;background: #7fb3d5 "> </div> <div id="viewPersonalInfo" style="float:left;display:none;border:1px solid gray;width:20%;min-width:250px;margin-left:10px;height:690px;top-margin:-10px;background: #7fb3d5 "> <!--==================================================================================================================================================--> <div style="margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> Customer Preferences #1: <select id='preferencesSelectOne' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showMunicipalityList(this.value)"> <option value="">-- --</option> <?php $getAllRegion = mysql_query("SELECT DISTINCT(`s_name`) FROM `vts_likes` WHERE `status`='1' ORDER BY `s_name` ASC"); while($row = mysql_fetch_array($getAllRegion)){ echo "<option id=".$row['s_cust_id'].">".$row['s_name']."</option>"; } ?> </select> <input type="text" placeholder="Type something" id="preferenceOne" style="float:left;width:80%;height:100%;margin:0px;margin-top:8px;border:1px solid gray;border-radius:0px;padding:5px "> <input type="submit" value="Filter" id="filterOneExecute" style="border-left:0px;float:left;width:19%;height:27px;top-margin:-3px;padding:2px;border-radius:0px"> </div> <div id="divPrepTwo" style="display:none;margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> Customer Preferences #2: <select id='preferencesSelectTwo' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showMunicipalityList(this.value)"> <option value="">-- --</option> <?php $getAllRegion = mysql_query("SELECT DISTINCT(`s_name`) FROM `vts_likes` WHERE `status`='1' ORDER BY `s_name` ASC"); while($row = mysql_fetch_array($getAllRegion)){ echo "<option id=".$row['s_cust_id'].">".$row['s_name']."</option>"; } ?> </select> <input type="text" placeholder="Type something" id="preferenceTwo" style="float:left;width:80%;height:100%;margin:0px;margin-top:8px;border:1px solid gray;border-radius:0px;padding:5px "> <input type="submit" value="Filter" id="filterTwoExecute" style="border-left:0px;float:left;width:19%;height:27px;top-margin:-3px;padding:2px;border-radius:0px"> </div> <div id="divPrepThree" style="display:none;margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> Customer Preferences #3: <select id='preferencesSelectThree' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showMunicipalityList(this.value)"> <option value="">-- --</option> <?php $getAllRegion = mysql_query("SELECT DISTINCT(`s_name`) FROM `vts_likes` WHERE `status`='1' ORDER BY `s_name` ASC"); while($row = mysql_fetch_array($getAllRegion)){ echo "<option id=".$row['s_cust_id'].">".$row['s_name']."</option>"; } ?> </select> <input type="text" placeholder="Type something" id="preferenceThree" style="float:left;width:80%;height:100%;margin:0px;margin-top:8px;border:1px solid gray;border-radius:0px;padding:5px "> <input type="submit" value="Filter" id="filterThreeExecute" style="border-left:0px;float:left;width:19%;height:27px;top-margin:-3px;padding:2px;border-radius:0px"> </div> <div id="divPrepFour" style="display:none;margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> Customer Preferences #4: <select id='preferencesSelectFour' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showMunicipalityList(this.value)"> <option value="">-- --</option> <?php $getAllRegion = mysql_query("SELECT DISTINCT(`s_name`) FROM `vts_likes` WHERE `status`='1' ORDER BY `s_name` ASC"); while($row = mysql_fetch_array($getAllRegion)){ echo "<option id=".$row['s_cust_id'].">".$row['s_name']."</option>"; } ?> </select> <input type="text" placeholder="Type something" id="preferenceFour" style="float:left;width:80%;height:100%;margin:0px;margin-top:8px;border:1px solid gray;border-radius:0px;padding:5px "> <input type="submit" value="Filter" id="filterFourExecute" style="border-left:0px;float:left;width:19%;height:27px;top-margin:-3px;padding:2px;border-radius:0px"> </div> <div id="divPrepFive" style="display:none;margin:5px;float:left;width:97.7%; min-width:200px;padding:5px;border:1px solid #3498db ;background:white;font-size:12px;margin-top:5px"> Customer Preferences #4: <select id='preferencesSelectFive' style='font-size:12px;border:1px solid gray;padding:5px;width:99%;float:left;margin:2px' onchange="showMunicipalityList(this.value)"> <option value="">-- --</option> <?php $getAllRegion = mysql_query("SELECT DISTINCT(`s_name`) FROM `vts_likes` WHERE `status`='1' ORDER BY `s_name` ASC"); while($row = mysql_fetch_array($getAllRegion)){ echo "<option id=".$row['s_cust_id'].">".$row['s_name']."</option>"; } ?> </select> <input type="text" placeholder="Type something" id="preferenceFive" style="float:left;width:80%;height:100%;margin:0px;margin-top:8px;border:1px solid gray;border-radius:0px;padding:5px "> <input type="submit" value="Filter" id="filterFiveExecute" style="border-left:0px;float:left;width:19%;height:27px;top-margin:-3px;padding:2px;border-radius:0px"> </div> </div> <!--==================================================================================================================================================--> <!-- =====================================================================BODY======================================================================= --> <div style='float:left;width:79%;height:640px;border:0px solid lightgray;padding:0px;background:white'> <div id="displayFilteredData" style='width:100%;height:690px;display:blocked;border:1px solid gray;overflow:auto'> </div> </div> <!-- =====================================================================FOOTER===================================================================== --> </div> </div> <!-- ============================================================================ --><!-- ============================================================================ --> <!-- ============================================================================ --><!-- ============================================================================ --> <!-- showExportRequestFrom --LOAD EXPORT REQUEST FORM> --> <div id="ExportRequestFrom" onchange="ShowFormFilterA()" style='background:white;display:none;z-index:9999;margin-top:20px;position:absolute;top:50px;left:50px;width:1000px;height:500px;'> <div class='bgColor' style='background:lightgray;vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:14px;color:#043062'> ✛ Data Export Request <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=23&d=4' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='#' onclick="showExportRequestFrom()" style='font-weight:bold'> ✕ </a> </div> </div> <div style="width:100%;padding:10px;border:0px solid gray;height:150px;background: #fcfcb6 "> <p style="padding:0px;margin:0px;font-family:Arial;font-size:16px;color:black">Filter Customer Information:</p> <div style="float:left;width:60%;padding:5px;border:1px solid gray;height:100px;background:white"> <select id="filterData" style="padding:5px;font-family:Arial;font-size:14px;border:1px solid gray"> <option value="--">--Select--</option> <option value="filterA">Export company owned customer database (All)</option> <option value="filterB">Export dealership owned database (All owned data by dealer)</option> <option value="filterC">Export database by age range </option> <option value="filterD">Export database by gender</option> <option value="filterE">Export database by Region</option> <option value="filterF">Export database by City</option> <option value="filterG">Export database by Barangay</option> <option value="filterG">Export database by Birth Month</option> <option value="filterH">Customers based on sports</option> <option value="filterI">Customers based on hobbies</option> <option value="filterJ">Customers like reading</option> <option value="filterK">Customers like drinks</option> <option value="filterL">Customers who owned car by Brand</option> <option value="filterM">Customers who owned car by Model</option> <option value="filterN">Customers who owned car by Year Model/Make</option> <option value="filterO">Customers who owned car by Year Model</option> </select> </div> <div style="float:left;width:40%;padding:5px;border:1px solid gray;border-left:0px;height:100px;background: #fff "> <div id="FormFilterA" style="display:none;padding:5px;width:100%;height:100%;border:0px solid red;background:white"> <input type="hidden" id="empID" value="<?php echo $userID;?>"> <select id="filterCompanyName" style="margin:0px;padding:5px;font-family:Arial;font-size:14px;border:1px solid gray"> <option value="--">--Select Company--</option> <?php $optionSQL=mysql_query("SELECT * FROM `vts_company` WHERE `comp_status`='1' ORDER BY `comp_name` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['comp_id']."'>".$out['comp_name']."</option>"; } ?> </select> <input type="submit" id="goFilterData" value="≙ Submit Report Request" style="width:50%;margin:0px; float:right;height:30px;padding:3px;margin-top:5px;border-radius:0px;"> </div> <div id="FormFilterB" style="display:none;padding:5px;width:100%;height:100%;border:0px solid red;background:white"> <select id="filterCompanyNameB" style="margin:0px;padding:5px;font-family:Arial;font-size:14px;border:1px solid gray"> <option value="--">--Select Dealership--</option> <?php $optionSQL=mysql_query("SELECT * FROM `vts_dealerships` WHERE `deal_status`='1' ORDER BY `deal_name` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['deal_id']."'>".$out['deal_name']."</option>"; } ?> </select> <input type="submit" id="goFilterDataB" value="≙ Submit Report Request" style="width:50%;margin:0px; float:right;height:30px;padding:3px;margin-top:5px;border-radius:0px;"> </div> </div> </div> <div style="width:100%;padding:10px;border:0px solid gray;height:300px "> <p style="padding:0px;margin:0px;font-family:Arial;font-size:16px;color:black">Pending Report Request:</p> <div id="displayPendingRequest" style="overflow:auto;float:left;width:100%;padding:1px;border:1px solid gray;height:260px;"> <?php $getSalesGroup = mysql_query("SELECT * From `db_export_report_request` WHERE `requested_by`='$userID' AND `report_expiration_date` >= '$toDate' ORDER BY `requested_date` ASC"); echo "<table style='width:100%'>"; echo "<thead>"; echo "<th style='width:10%'>Expired Date</th>"; echo "<th style='width:15%'>IT Approval</th>"; echo "<th style='width:15%'>Execom Approval</th>"; echo "<th style='width:25%'>Company/Dealership Data</th>"; echo "<th style='width:35%'>Report Descriptoin</th>"; echo "<th style='width:10%'></th>"; echo "</thead>"; while($row=mysql_fetch_array($getSalesGroup)){ $gID= $row['xid']; $FcompID= $row['filtered_data']; $link = $row['filter'].".php"; if ($row['IT_approval']==='Approved' && $row['EXE_approval']==='Approved'){ $disEnable ='Enable'; $myColor='blue'; $status='Download'; }else{ $disEnable ='Disabled'; $myColor='gray'; $status='Pending'; } ?><tr onclick="javascript:showMembers(this);" ondblclick="popUpShowDisplayAddMembers()"><?php echo "<td style='text-align:left;padding:3px;'>".$row['report_expiration_date']."</td>"; echo "<td style='text-align:left;padding:3px;'>".$row['IT_approval']."</td>"; echo "<td style='text-align:left;padding:3px;'>".$row['EXE_approval']."</td>"; echo "<td style='text-align:left;padding:3px;'>"; if($row['filter']==='filterA'){ $compName = mysql_result(mysql_query("SELECT `comp_name` FROM `vts_company` WHERE `comp_id`='$FcompID'"),0); echo $compName; }else{ $compName = mysql_result(mysql_query("SELECT `deal_name` FROM `vts_dealerships` WHERE `deal_id`='$FcompID'"),0); echo $compName; } echo "</td>"; echo "<td style='text-align:left;padding:3px;'>".$row['report_description']."</td>"; echo "<td style='text-align:left;padding:3px'>";?> <a href="<?php echo $link;?>?filter=<?php echo $row['filter'];?>&id=<?php echo $gID;?>&com=<?php echo $FcompID;?>" > <button id="dlReport" <?php echo $disEnable;?> style="width:100%;font-family:Arial, font-size:12px;color:<?php echo $myColor;?>"><?php echo $status; ?></button></a> <?php echo "</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </div> <div id="addForm" style='display:none;z-index:9999;margin-top:58px;'> <div class='bgColor' style='background:lightgray;vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:14px;color:#043062'> ✛ Add New Customer Data <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=23&d=4' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='#' onclick="showAddXXX()" style='font-weight:bold'> ✕ </a> </div> </div> <input type="hidden" id="sCompID" value="<?php echo $compID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="sDealID" value="<?php echo $dealID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svDate" value="<?php echo $toDate;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svTime" value="<?php echo $myCurTime;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svUserID" value="<?php echo $userID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <div class="addCustForm" style='background:lightgray;border:1px solid gray;padding:5px;margin:0px;float:left;min-width:400px;min-height:500px'> <!-----====================================================------> <div style='border:0px solid red;width:35%;margin:5px;float:left'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>First Name:</b><br> <input type="text" id="svFname" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:20%;margin:5px;float:left;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Middle Name:</b><br> <input type="text" id="svMname" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:35%;margin:5px;float:left;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Last Name:</b><br> <input type="text" id="svLname" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:20%;margin:5px;float:left'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Gender:</b><br> <select id="svGender" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> <option value="MALE">MALE</option> <option value="FEMALE">FEMALE</option> </select> </div> <div style='border:0px solid red;width:25%;margin:5px;float:left'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Birth Date:</b><br> <input type="date" id="svBday" placeholder="10/24/1977" value="<?php echo date('Y-m-d');?>" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:45%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Place of Birth:</b><br> <input type="text" id="svBplate" placeholder="Place of Birth" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:92.5%;margin:5px;float:left;background:transparent'> <div style='border:0px solid red;width:45%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Company Name / Organization:</b> <select id="svCompany" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px'> <?php $getCity = mysql_query("SELECT DISTINCT(`business_name`) from `businesses_names` WHERE `business_name`!='' ORDER BY `business_name` ASC"); echo "<option id='0'>N/A</option>"; while($row=mysql_fetch_array($getCity)){ echo "<option id=".$row['bid'].">".$row['business_name']."</option>"; } ?> </select> </div> <div style='border:0px solid red;width:50%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Bussiness Type / Sector:</b> <select id='svSector' style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px'> <?php $getSector = mysql_query("SELECT * from `db_sectors` WHERE `sectors_name`!='' ORDER BY `sectors_name` ASC"); echo "<option id='0']>N/A</option>"; while($row=mysql_fetch_array($getSector)){ echo "<option id=".$row['sid'].">".$row['sectors_name']."</option>"; } ?> </select> </div> <div style='border:0px solid red;width:20%;margin:5px;float:left;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Region:</b> <select id='svRegion' style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onchange="showRegion(this.value)"> <?php $getCity = mysql_query("SELECT DISTINCT(`region_code`) from `loc_region` WHERE `municipality`!='' ORDER BY `municipality` ASC"); echo "<option id=".$row['region_code'].">N/A</option>"; while($row=mysql_fetch_array($getCity)){ echo "<option id=".$row['region_code'].">".$row['region_code']."</option>"; } ?> </select> </div> <div style='border:0px solid red;width:25%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Municipality:</b> <select id="svMunicipality" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onchange="showUser(this.value)"> <?php //$getCity = mysql_query("SELECT DISTINCT(`municipality`) from `loc_region` WHERE `municipality`!='' ORDER BY `municipality` ASC"); // while($row=mysql_fetch_array($getCity)){ // echo "<option id=".$row['municipality'].">".$row['municipality']."</option>"; //} ?> </select> </div> <div style='border:0px solid red;width:20%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>City / District:</b> <select id="svCity" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onchange="showBrgy(this.value)"> </select> </div> <div style='border:0px solid red;width:20%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Barangay Name / Zone #:</b> <select id="svBrgy" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px'> </select> </div> <div style='border:0px solid red;width:40%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Home No / Street / Subdivision:</b> <input type="text" id="svHomeAddress" placeholder="" style='border:1px solid gray;padding:5px;width:98.5%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <!-----====================================================------> <div style='border:0px solid red;width:25%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Mobile Number:</b> <input type="text" id="svsMobile" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <!-----====================================================------> <div style='border:0px solid red;width:30%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>E-mail Address:</b> <input type="text" id="svEmail" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:15%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Facebook Account:</b> <input type="text" id="svFB" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:15%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Viber Number:</b> <input type="text" id="svViber" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:15%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Tweeter Account:</b> <input type="text" id="svTweeter" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:15%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>Instagram Account:</b> <input type="text" id="svInstaGram" placeholder="" style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:30%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>WEBSITE URL:</b><br> <input type="text" id="svWebsiteLink" placeholder="" style='border:1px solid gray;padding:5px;width:98.5%;min-width:150px;float:left;margin:2px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:30%;margin:5px;float:left;min-width:200px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal;background:#fcf5ce;padding:2px'>SALES AGENT:</b><br> <select id='svSalesAgent' style='border:1px solid gray;padding:5px;width:100%;min-width:150px;float:left;margin:2px' onchange="showRegion(this.value)"> <?php $getCity = mysql_query("SELECT * from `vts_users` WHERE `u_position` LIKE '%sales%' ORDER BY `u_lname` ASC"); echo "<option id=".$row['u_id'].">N/A</option>"; while($row=mysql_fetch_array($getCity)){ echo "<option id=".$row['u_id'].">".$row['u_lname'].", ".$row['u_fname']."</option>"; } ?> </select> </div> </div> <!-----====================================================------> <div style='text-align:center;background:#eaeae8;border-top:1px solid gray;width:99.9%;margin:1px;float:left;height:70px;padding:15px'> <div id="display_added_record"> </div> <input type="submit" id="save_new_db" value="≙ Save Record" style="width:15%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius:0px;"> <input type="submit" value="⚑ Close" onclick="showAdd()" style="width:15%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> </div> </div> </div> <div id="LatestDataForm" style='display:;z-index:9999;margin-top:58px;'> <div class='bgColor' style='background:lightgray;vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:14px;color:#043062'> 📊 Non-Fleet Accounts Data Analytics <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=23&d=4' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='#' onclick="showAddFleet()" style='font-weight:bold'> ✕ </a> </div> </div> <input type="hidden" id="sCompID" value="<?php echo $compID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="sDealID" value="<?php echo $dealID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svDate" value="<?php echo $toDate;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svTime" value="<?php echo $myCurTime;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svUserID" value="<?php echo $userID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <!-- ================================================================================================================================================================= --> <div id="displayNewFleetDatabase" style="float:left;font-size:12px;color:black;border:1px solid blue;width:100%;height:600px;overflow:auto"> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#fbdbd8"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> INVALID FIRST NAME </div> <div style="text-align:right;float:left;width:45%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidFName = mysql_result(mysql_query("select count(c_id) from vts_customers where cust_fname regexp '[_]' || cust_fname regexp '[~]' || cust_fname regexp '[!]' || cust_fname regexp '[@]' || cust_fname regexp '[#]' || cust_fname regexp '[$]' || cust_fname regexp '[%]' || cust_fname regexp '[&]' || cust_fname regexp '[*]' || cust_fname regexp '[(]' || cust_fname regexp '[)]' || cust_fname regexp '[+]' || cust_fname regexp '[+]' || cust_fname regexp '[0]' || cust_fname regexp '[1]' || cust_fname regexp '[2]'|| cust_fname regexp '[3]'|| cust_fname regexp '[4]'|| cust_fname regexp '[5]' || cust_fname regexp '[6]'|| cust_fname regexp '[7]'|| cust_fname regexp '[8]' || cust_fname regexp '[9]'"),0); //echo $getInvalidFName; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidFName,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:55%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:15px;padding-left:20px;padding-top:2px"> <?php $getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidFName / $getInvalidRate * 100 ; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> INVALID LAST NAME </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidLName = mysql_result(mysql_query("select count(c_id) from vts_customers where cust_lname regexp '[_]' || cust_lname regexp '[~]' || cust_lname regexp '[!]' || cust_lname regexp '[@]' || cust_lname regexp '[#]' || cust_lname regexp '[$]' || cust_lname regexp '[%]' || cust_lname regexp '[&]' || cust_lname regexp '[*]' || cust_lname regexp '[(]' || cust_lname regexp '[)]' || cust_lname regexp '[+]' || cust_lname regexp '[+]' || cust_lname regexp '[0]' || cust_lname regexp '[1]' || cust_lname regexp '[2]'|| cust_lname regexp '[3]'|| cust_lname regexp '[4]'|| cust_lname regexp '[5]' || cust_lname regexp '[6]'|| cust_lname regexp '[7]'|| cust_lname regexp '[8]' || cust_lname regexp '[9]' AND cust_comp_id='$compID'"),0); //echo $getInvalidLName; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidLName,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidLName / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> INVALID MOBILE NUMBER </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidMobile = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE CHAR_LENGTH(`cust_mobile`) < 10 AND cust_comp_id='$compID'"),0); //echo $getInvalidMobile; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidMobile,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidMobile / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> INVALID E-MAIL ADDRESS </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidEmail = mysql_result(mysql_query("select count(c_id) from vts_customers where cust_email NOT regexp '[@]' AND cust_comp_id='$compID'"),0); //echo $getInvalidEmail; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidEmail,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidEmail / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> O HOME / OFFICE ADDRESS </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidHome = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE CHAR_LENGTH(`cust_home_add`) < 5 AND cust_comp_id='$compID'"),0); //echo $getInvalidHome; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidHome,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidHome / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> NO ASSIGNED REGION </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidRegion = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE CHAR_LENGTH(`cust_region`) < 3 AND cust_comp_id='$compID'"),0); //echo $getInvalidRegion; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidRegion,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidRegion / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> NO GENDER INFORMATION </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidGender = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `cust_gender` = '' AND cust_comp_id='$compID'"),0); //echo $getInvalidGender; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidGender,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidGender / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> NO BIRTH DATE INFORMATION </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidBDAY = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `cust_bday` = '' AND cust_comp_id='$compID'"),0); //echo $getInvalidBDAY; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidBDAY,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidBDAY / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> NO FACEBOOK INFORMATION </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidFB = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `cust_fb` = '' AND cust_comp_id='$compID'"),0); //echo $getInvalidFB; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidFB,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidFB / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> NO VIBER INFORMATION </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidVB = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `cust_viber` = '' AND cust_comp_id='$compID'"),0); //echo $getInvalidVB; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidVB,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidVB / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> NO TWEETER INFORMATION </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidTW = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `cust_tweet` = '' AND cust_comp_id='$compID'"),0); //echo $getInvalidTW; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidTW,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidTW / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:280px;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> NO INSTAGRAM INFORMATION </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php $getInvalidIG = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `cust_InstaG` = '' AND cust_comp_id='$compID'"),0); //echo $getInvalidIG; echo "<i style='font-family:Calibri;size:10px'>Count </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:25px;color:black'>".number_format($getInvalidIG,0, '',',')."</b>"; ?> </div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php //$getInvalidRate = mysql_result(mysql_query("SELECT count(c_id) FROM vts_customers WHERE `status` = 1 AND cust_comp_id='$compID'"),0); $aRate = $getInvalidIG / $getInvalidRate * 100; echo "<i style='font-family:Calibri;size:10px'>Percentage </i><br><b style='text-align:right;line-height:120%;font-family:Calibri;font-weight:normal;font-size:20px;color:black;font-weight:normal'>".number_format($aRate,1, '.','')."% </b>"; ?> </div> </div> <div style="float:left;width:100%;height:130px;border:1px solid #fcef19;padding:0px;margin:15px;background:#f9f9bc"> <div style="width:100%;font-family:Calibri;font-size:12px;color:#d51404;padding:10px;background:#f9f9bc;height:55%;border-bottom:1px solid lightgray"> DATA COMPLETENESS RATIO</div> <div style="text-align:right;float:left;width:50%;font-family:Calibri; font-weight:normal;color:#000;padding:20px; background:#f9f9bc;height:45%;padding-right:5px;padding-left:20px;padding-top:2px"> <?php ?> </div> </div> </div> </div> </div> </body> </html> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="wait" style="display:none;width:69px;height:89px;border:0px solid red;position:absolute;top:50%;left:50%;padding:2px;"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Loading..</div> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //loading gif animator during query or page load $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); //FILTER DATA A $("#goFilterData").click(function(){ var filterCompanyName = $("#filterCompanyName").val(); var filterData = $("#filterData").val(); var empID = $("#empID").val(); if (filterCompanyName == "--") { $('#filterCompanyName').focus(); $('#filterCompanyName').css({'border':'1px solid red'}); $('#filterCompanyName').css({'color':'red'}); $('#filterCompanyName').css({'background':'yellow'}); $('#filterCompanyName').attr("placeholder","This is a required field***"); return false; } if (filterData == "--") { $('#filterData').focus(); $('#filterData').css({'border':'1px solid red'}); $('#filterData').css({'color':'red'}); $('#filterData').css({'background':'yellow'}); $('#filterData').attr("placeholder","This is a required field***"); return false; } $.ajax({ url: "save_report_export_request.php", type: "POST", async: false, data: { "filterData": filterData, "empID": empID, "filterCompanyName": filterCompanyName }, success: function(d){ $("#displayPendingRequest").html(d); alert("Request has been sent for approval"); } }) }); //FILTER DATA B $("#goFilterDataB").click(function(){ var filterCompanyNameB = $("#filterCompanyNameB").val(); var filterData = $("#filterData").val(); var empID = $("#empID").val(); if (filterCompanyNameB == "--") { $('#filterCompanyNameB').focus(); $('#filterCompanyNameB').css({'border':'1px solid red'}); $('#filterCompanyNameB').css({'color':'red'}); $('#filterCompanyNameB').css({'background':'yellow'}); $('#filterCompanyNameB').attr("placeholder","This is a required field***"); return false; } if (filterData == "--") { $('#filterData').focus(); $('#filterData').css({'border':'1px solid red'}); $('#filterData').css({'color':'red'}); $('#filterData').css({'background':'yellow'}); $('#filterData').attr("placeholder","This is a required field***"); return false; } $.ajax({ url: "save_report_export_request.php", type: "POST", async: false, data: { "filterData": filterData, "empID": empID, "filterCompanyNameB": filterCompanyNameB }, success: function(d){ $("#displayPendingRequest").html(d); alert("Request has been sent for approval"); } }) }); //START OF FUNCTION================= SAVING NEW RECORD $("#save_new_db").click(function(){ var svSalesAgent = $("#svSalesAgent").val(); var svSector = $("#svSector").val(); var svMname = $("#svMname").val(); var svTweeter = $("#svTweeter").val(); var svInstaGram = $("#svInstaGram").val(); var svWebsiteLink = $("#svWebsiteLink").val(); var svBrgy = $("#svBrgy").val(); var svRegion = $("#svRegion").val(); var svCompany = $("#svCompany").val(); var svViber = $("#svViber").val(); var svFB = $("#svFB").val(); var svsMobile = $("#svsMobile").val(); var svEmail = $("#svEmail").val(); var svMunicipality = $("#svMunicipality").val(); var svCity = $("#svCity").val(); var svHomeAddress = $("#svHomeAddress").val(); var svBday = $("#svBday").val(); var svGender = $("#svGender").val(); var svLname = $("#svLname").val(); var svFname = $("#svFname").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); var svDate = $("#svDate").val(); var svTime = $("#svTime").val(); var svUserID= $("#svUserID").val(); if (svLname == "") { alert("Error: Please input Lastname"); return false; } if (svFname == "") { alert("Error: Please input Firsname"); return false; } if (svsMobile == "") { alert("Error: Please input Mobile Number"); return false; } if (svEmail == "") { alert("Error: Please input E-mail Address"); return false; } $.ajax({ url: "sub_add_new_customer.php", type: "POST", async: false, data: { "done": 1, "svSector" : svSector, "svSalesAgent" : svSalesAgent, "svTweeter" : svTweeter, "svInstaGram" : svInstaGram, "svBrgy" : svBrgy, "svRegion" : svRegion, "svMname" : svMname, "svCompany" : svCompany, "svViber" : svViber, "svFB" : svFB, "svWebsiteLink" : svWebsiteLink, "svsMobile" : svsMobile, "svEmail" : svEmail, "svMunicipality" : svMunicipality, "svCity" : svCity, "svHomeAddress" : svHomeAddress, "svBday" : svBday, "svGender" : svGender, "svLname" : svLname, "svFname" : svFname, "sCompID" : sCompID, "sDealID" : sDealID, "svDate" : svDate, "svTime" : svTime, "svUserID": svUserID }, success: function(data){ alert("New Record Saved."); displayFromDatabase(); $('#svFname').val(''); $('#svLname').val(''); $('#svsMobile').val(''); $('#svEmail').val(''); $('#svHomeAddress').val(''); $('#svCity').val(''); $('#svMname').val(''); $('#svTweeter').val(''); $('#svInstaGram').val(''); $('#svFB').val(''); $('#svViber').val(''); } }) }); //END OF FUNCTION================= }); </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="wait" style="display:none;width:69px;height:89px;border:0px solid red;position:absolute;top:50%;left:50%;padding:2px;"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Loading..</div> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //loading gif animator during query or page load $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); //START OF FUNCTION================= SAVING NEW RECORD $("#submit_nameX").click(function(){ var searchString = $("#searchString").val(); if (searchString == "") { alert("Error: Invalid Input Data"); return false; } $.ajax({ url: "search_load_found_customer.php", type: "POST", async: false, data: { "done": 1, "searchString": searchString }, success: function(data){ displayFromDatabase(); $('#searchString').val(''); } }) }); //END OF FUNCTION================= function displayFromDatabase(){ var searchString = $("#searchString").val(); $.ajax({ url: "search_load_found_customer.php", type: "POST", async: false, data: { "searchString": searchString, "display": 1 }, success: function(d){ $("#display_area").html(d); } }); } //START OF DATABASE FILTER //START OF FILTER DATA FUNCTION $("#filterDataString").change(function () { var filterDataString = $("#filterDataString").val(); if (filterDataString == "") { alert("Error: Invalid Input Data"); return false; } $.ajax({ url: "filter_load_found_database.php", type: "POST", async: false, data: { "done": 1, "filterDataString": filterDataString }, success: function(d){ $("#displayFilteredData").html(d); //$('#filterDataString').val(''); } }) }); //START OF FILTER DATA FUNCTION MUNICIPALITY $("#filterMunicipality").change(function () { var filterMunicipality = $("#filterMunicipality").val(); var filterDataString = $("#filterDataString").val(); //alert($("#filterMunicipality").val()); //return false; if (filterMunicipality == "") { alert("Error: Invalid Input Data. Please select Municipality"); return false; } $.ajax({ url: "filter_load_found_database.php", type: "POST", async: false, data: { "done": 2, "filterDataString": filterDataString, "filterMunicipality": filterMunicipality }, success: function(d){ $("#displayFilteredData").html(d); //$('#filterDataString').val(''); } }) }); //START OF FILTER DATA FUNCTION CITY $("#filterCity").change(function () { var filterMunicipality = $("#filterMunicipality").val(); var filterDataString = $("#filterDataString").val(); var filterCity = $("#filterCity").val(); //alert($("#filterMunicipality").val()); //return false; if (filterCity == "N/A") { alert("Error: Invalid Input Data. Please select City"); return false; } $.ajax({ url: "filter_load_found_database.php", type: "POST", async: false, data: { "done": 3, "filterDataString": filterDataString, "filterCity": filterCity, "filterMunicipality": filterMunicipality }, success: function(d){ $("#displayFilteredData").html(d); //$('#filterDataString').val(''); } }) }); //START OF FILTER DATA FUNCTION BARANGAY $("#filterBarangay").change(function () { var filterMunicipality = $("#filterMunicipality").val(); var filterDataString = $("#filterDataString").val(); var filterCity = $("#filterCity").val(); var filterBarangay = $("#filterBarangay").val(); // alert($("#filterBarangay").val()); // return false; if (filterBarangay == "N/A") { alert("Error: Invalid Input Data. Please select Barangay"); return false; } $.ajax({ url: "filter_load_found_database.php", type: "POST", async: false, data: { "done": 4, "filterDataString": filterDataString, "filterCity": filterCity, "filterBarangay": filterBarangay, "filterMunicipality": filterMunicipality }, success: function(d){ $("#displayFilteredData").html(d); //$('#filterDataString').val(''); } }) }); $("#btnSearchName").click(function () { var filterMunicipality = $("#filterMunicipality").val(); var filterDataString = $("#filterDataString").val(); var filterCity = $("#filterCity").val(); var filterBarangay = $("#filterBarangay").val(); var searchTextName = $("#searchTextName").val(); //alert($("#searchTextName").val()); //return false; if (searchTextName == "") { alert("Error: Invalid Input Data."); return false; } $.ajax({ url: "filter_load_found_database.php", type: "POST", async: false, data: { "done": 5, "filterDataString": filterDataString, "searchTextName": searchTextName, "filterCity": filterCity, "filterBarangay": filterBarangay, "filterMunicipality": filterMunicipality }, success: function(d){ $("#displayFilteredData").html(d); //$('#filterDataString').val(''); } }) }); //================================================================================================================================================================= //START OF SCRIPT FOR PREFERENCES FILTER ========================================================================================================================== $("#filterOneExecute").click(function () { // var preferencesSelectOne = $("#preferencesSelectOne").val(); var preferenceOne = $("#preferenceOne").val(); //alert(preferenceOne); // alert(preferencesSelectOne); if (preferencesSelectOne == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceOne == "") { alert("Error: Invalid Input Data."); return false; } $.ajax({ url: "filter_load_found_database_preference_search_one.php", type: "POST", async: false, data: { "done": 11, "preferencesSelectOne": preferencesSelectOne, "preferenceOne": preferenceOne }, success: function(d){ var divb = document.getElementById("divPrepThree"); var diva = document.getElementById("divPrepTwo"); var divc = document.getElementById("divPrepFour"); var divd = document.getElementById("divPrepFive"); if (diva.style.display == 'none') { diva.style.display = ''; divb.style.display = 'none'; divc.style.display = 'none'; divd.style.display = 'none'; } else { diva.style.display = ''; divb.style.display = 'none'; divc.style.display = 'none'; divd.style.display = 'none'; } $("#displayFilteredData").html(d); } }) }); //========================= $("#filterTwoExecute").click(function () { // preferencesSelectTwo preferenceTwo filterTwoExecute var preferencesSelectTwo = $("#preferencesSelectTwo").val(); var preferenceTwo = $("#preferenceTwo").val(); var preferencesSelectOne = $("#preferencesSelectOne").val(); var preferenceOne = $("#preferenceOne").val(); // alert(preferenceOne); // alert(preferencesSelectOne); //alert(preferenceTwo); // alert(preferencesSelectTwo); if (preferencesSelectTwo == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceTwo == "") { alert("Error: Invalid Input Data."); return false; } $.ajax({ url: "filter_load_found_database_preference_search_Two.php", type: "POST", async: false, data: { "done": 12, "preferencesSelectTwo": preferencesSelectTwo, "preferenceTwo": preferenceTwo, "preferencesSelectOne": preferencesSelectOne, "preferenceOne": preferenceOne }, success: function(d){ var diva = document.getElementById("divPrepTwo"); var divb = document.getElementById("divPrepThree"); var divc = document.getElementById("divPrepFour"); var divd = document.getElementById("divPrepFive"); if (divb.style.display == 'none') { divb.style.display = ''; diva.style.display = ''; divc.style.display = 'none'; divd.style.display = 'none'; } else { divb.style.display = ''; diva.style.display = ''; divc.style.display = 'none'; divd.style.display = 'none'; } $("#displayFilteredData").html(d); } }) }); //========================= //========================= $("#filterThreeExecute").click(function () { // preferencesSelectTwo preferenceTwo filterTwoExecute var preferencesSelectThree= $("#preferencesSelectThree").val(); var preferenceThree = $("#preferenceThree").val(); var preferencesSelectTwo = $("#preferencesSelectTwo").val(); var preferenceTwo = $("#preferenceTwo").val(); var preferencesSelectOne = $("#preferencesSelectOne").val(); var preferenceOne = $("#preferenceOne").val(); // alert(preferenceOne); //alert(preferencesSelectOne); //alert(preferenceThree); // alert(preferencesSelectThree); if (preferenceThree == "") { alert("Error: Invalid Input Data."); return false; } if (preferencesSelectTwo == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceTwo == "") { alert("Error: Invalid Input Data."); return false; } $.ajax({ url: "filter_load_found_database_preference_search_Three.php", type: "POST", async: false, data: { "done": 12, "preferencesSelectThree": preferencesSelectThree, "preferenceThree": preferenceThree, "preferencesSelectTwo": preferencesSelectTwo, "preferenceTwo": preferenceTwo, "preferencesSelectOne": preferencesSelectOne, "preferenceOne": preferenceOne }, success: function(d){ var diva = document.getElementById("divPrepTwo"); var divd = document.getElementById("divPrepFive"); var divb = document.getElementById("divPrepThree"); var divc = document.getElementById("divPrepFour"); if (divc.style.display == 'none') { divb.style.display = ''; diva.style.display = ''; divc.style.display = ''; divd.style.display = 'none'; } else { divc.style.display = ''; divb.style.display = ''; diva.style.display = ''; } $("#displayFilteredData").html(d); } }) }); //========================= $("#filterFourExecute").click(function () { // preferencesSelectTwo preferenceTwo filterTwoExecute var preferencesSelectFour= $("#preferencesSelectFour").val(); var preferenceFour = $("#preferenceFour").val(); var preferencesSelectThree= $("#preferencesSelectThree").val(); var preferenceThree = $("#preferenceThree").val(); var preferencesSelectTwo = $("#preferencesSelectTwo").val(); var preferenceTwo = $("#preferenceTwo").val(); var preferencesSelectOne = $("#preferencesSelectOne").val(); var preferenceOne = $("#preferenceOne").val(); // alert(preferenceOne); // alert(preferencesSelectOne); //alert(preferenceTwo); // alert(preferencesSelectTwo); if (preferenceThree == "") { alert("Error: Invalid Input Data."); return false; } if (preferencesSelectTwo == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceTwo == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceFour == "") { alert("Error: Invalid Input Data."); return false; } $.ajax({ url: "filter_load_found_database_preference_search_Four.php", type: "POST", async: false, data: { "done": 12, "preferencesSelectFour": preferencesSelectFour, "preferenceThree": preferenceFour, "preferencesSelectThree": preferencesSelectThree, "preferenceThree": preferenceThree, "preferencesSelectTwo": preferencesSelectTwo, "preferenceTwo": preferenceTwo, "preferencesSelectOne": preferencesSelectOne, "preferenceOne": preferenceOne }, success: function(d){ var diva = document.getElementById("divPrepTwo"); var divb = document.getElementById("divPrepThree"); var divc = document.getElementById("divPrepFour"); var divd = document.getElementById("divPrepFive"); if (divd.style.display == 'none') { divd.style.display = ''; divc.style.display = ''; divb.style.display = ''; diva.style.display = ''; } else { divd.style.display = ''; divc.style.display = ''; divb.style.display = ''; diva.style.display = ''; } $("#displayFilteredData").html(d); } }) }); $("#filterFiveExecute").click(function () { // preferencesSelectTwo preferenceTwo filterTwoExecute var preferencesSelectFive= $("#preferencesSelectFive").val(); var preferenceFive = $("#preferenceFive").val(); var preferencesSelectFour= $("#preferencesSelectFour").val(); var preferenceFour = $("#preferenceFour").val(); var preferencesSelectThree= $("#preferencesSelectThree").val(); var preferenceThree = $("#preferenceThree").val(); var preferencesSelectTwo = $("#preferencesSelectTwo").val(); var preferenceTwo = $("#preferenceTwo").val(); var preferencesSelectOne = $("#preferencesSelectOne").val(); var preferenceOne = $("#preferenceOne").val(); // alert(preferenceOne); // alert(preferencesSelectOne); //alert(preferenceTwo); // alert(preferencesSelectTwo); if (preferenceThree == "") { alert("Error: Invalid Input Data."); return false; } if (preferencesSelectTwo == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceTwo == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceFour == "") { alert("Error: Invalid Input Data."); return false; } if (preferenceFive == "") { alert("Error: Invalid Input Data."); return false; } $.ajax({ url: "filter_load_found_database_preference_search_Five.php", type: "POST", async: false, data: { "done": 12, "preferencesSelectFive": preferencesSelectFive, "preferenceFive": preferenceFive, "preferencesSelectFour": preferencesSelectFour, "preferenceFour": preferencFeour, "preferencesSelectThree": preferencesSelectThree, "preferenceThree": preferenceThree, "preferencesSelectTwo": preferencesSelectTwo, "preferenceTwo": preferenceTwo, "preferencesSelectOne": preferencesSelectOne, "preferenceOne": preferenceOne }, success: function(d){ var diva = document.getElementById("divPrepTwo"); var divb = document.getElementById("divPrepThree"); var divc = document.getElementById("divPrepFour"); var divd = document.getElementById("divPrepFive"); if (divd.style.display == 'none') { divd.style.display = ''; divc.style.display = ''; divb.style.display = ''; diva.style.display = ''; } else { divd.style.display = ''; divc.style.display = ''; divb.style.display = ''; diva.style.display = ''; } $("#displayFilteredData").html(d); } }) }); //END OF SCRIPT FOR PREFERENCES FILTER ============================================================================================================================ }); //======================================================= //================================================================================================================================================================= </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings