File manager - Edit - /home/autoph/public_html/connect/home/sales_lead_monitoring.php
Back
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .mapView{ width:150px; height:200px; margin:5px; float:left; border:1px solid red; } .loader { border: 16px solid #f3f3f3; border-radius: 50%; border-top: 16px solid blue; border-bottom: 16px solid blue; width: 120px; height: 120px; -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%; } .demographicTable{ width:30%; border-collapse:collapse; float:left; margin:10px; margin-left:10px; min-width:405px; } @media only screen and (max-width:700px) { /* For mobile phones: */ .demographicTable{ width:100%; } @media only screen and (max-width:1260px) { /* For mobile phones: */ .demographicTable{ width:50%; } </style> </head> <!----==============================================================-----> <!----==============================================================-----> <script type="text/javascript"> function popActivityList() { // var div = document.getElementById("popActivityListForm"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } function showAdd() { var div = document.getElementById("addForm"); var divD= document.getElementById("display_area"); if (div.style.display == 'none') { div.style.display = ''; divD.style.display = 'none'; } else { divD.style.display = 'none'; } } function showDisplayArea() { var divA = document.getElementById("addForm"); var divD = document.getElementById("display_area"); if (divD.style.display == 'none') { divD.style.display = ''; divA.style.display = 'none'; } else { divD.style.display = ''; divA.style.display = 'none'; } } function showMapView() { var div = document.getElementById("mapView"); var diva = document.getElementById("tabularView"); if (div.style.display == 'none') { div.style.display = ''; diva.style.display = 'none'; } else { div.style.display = ''; diva.style.display = 'none'; } } function showTabularView() { var div = document.getElementById("mapView"); var diva = document.getElementById("tabularView"); if (diva.style.display == 'none') { diva.style.display = ''; div.style.display = 'none'; } else { diva.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'; } } function showRegion(){ var getCenter = $("#regionID").val(); alert(getCenter); } </script> <body> <div style='border:1px solid gray;width:100%;height:100%;float:left;margin:0px;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'>🎯 LEAD MANAGEMENT SYSTEM <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 class='bgColor' style='background: #edfaf8 ;vertical-align:top;height:45px;margin:0px;width:100%;border-bottom:1px solid gray;padding:1px;font-family:Verdana;font-weight:normal;font-size:14px;color:#043062'> <input type="submit" id="viewMapStyle" onclick = "showMapView()" value="🗺 Map View" style="float:left; margin:2px;padding:3px;width:10%;font-family:Calibri;font-size:18px;" > <input type="submit" id="viewTabularStyle" onclick ="showTabularView()" value="🗟 Tabular View" style="float:left; margin:2px;padding:3px;width:10%;font-family:Calibri;font-size:18px;" > </div> <div id='mapView' style="display:none;height:700px;width:100%;border:0px solid red;background:white;z-index:99999"> <?php $regionView=mysql_query("SELECT * FROM db_region where region_name !='' ORDER BY id ASC"); while($row=mysql_fetch_array($regionView)){ $rgeName=$row['region_name']; $dbNonFleet = mysql_result(mysql_query("SELECT COUNT('c_id') FROM vts_customers WHERE cust_region='$rgeName'"),0); $dbCount= mysql_result(mysql_query("SELECT COUNT('bid') FROM businesses_names WHERE business_region='$rgeName'"),0); $dbCount = number_format($dbCount,'0','',','); $dbNonFleet = number_format($dbNonFleet,'0','',','); $profilePic = $row['image']; ?><table class="demographicTable" ><tr><?php echo "<td style='padding:0px;width:160px;height:230px;background:white;border:1px solid red;background-image:url(\"images/region_map/".$profilePic."\");background-size:50%;background-repeat:no-repeat;background-position:auto;background-size:100%;text-align:left;vertical-align:top'> <input type='text' id='regionID' onclick=\"showRegion(this.value[id])\" value='".$rgeName."' readonly style='text-align:center;border:0px solid red;width:100%;font-size:18px;font-weight:bold;background:yellow;margin:0px;padding:3px'> </td>"; echo "<td style='vertical-align:top;width:245px;height:230px;border:1px solid red;padding:0px;background:white'> <h1 style='width:100%;font-size:14px;background:yellow;margin:0px;padding:3px'>Demographic View</h1> <div style='padding:10px;float:left;width:32%;background:transparent;border:0px solid red;font-size:12px;font-weight:bold;color:gray'>Center: </div> <div id='regCenter' style='padding:10px;float:left;width:68%;background:transparent;border:0px solid red;font-size:12px;font-weight:normal;color:gray'>".$row['reg_center']."</div> <div style='padding:10px;float:left;width:32%;background:transparent;border:0px solid red;font-size:12px;font-weight:bold;color:gray'>Area: </div> <div style='padding:10px;float:left;width:68%;background:transparent;border:0px solid red;font-size:12px;font-weight:normal;color:gray'>".$row['reg_area']."</div> <div style='padding:10px;float:left;width:40%;background:transparent;border:0px solid red;font-size:12px;font-weight:bold;color:gray'>Population: </div> <div style='padding:10px;float:left;width:60%;background:transparent;border:0px solid red;font-size:12px;font-weight:normal;color:gray'>".$row['population']."</div> <div style='float:left;width:100%;height:15px;border:0px solid red;border-top:1px black;background:white'><hr></div> <div style='padding:5px;float:left;width:50%;background:transparent;border:0px solid red;font-size:12px;font-weight:bold;color:gray;height:25px;'>Active Fleet: </div> <div style='padding:3px;float:left;width:48%;background: #fff ;border:1px solid white;font-size:16px;font-weight:normal;color:blue;height:25px;margin-left:3px;padding-left:5px'>".$dbCount."</div> <div style='padding:5px;float:left;width:50%;background:transparent;border:0px solid red;font-size:12px;font-weight:bold;color:gray;height:25px;'>Non-Flee: </div> <div style='padding:3px;float:left;width:48%;background: #fff ;border:1px solid white;font-size:16px;font-weight:normal;color:blue;height:25px;margin-left:3px;padding-left:5px'>".$dbNonFleet."</div> </td>"; echo "</tr></table>"; } ?> </div> <div id='tabularView' style="display:;height:1300px;width:100%;border:0px solid red;background:white;z-index:99999"> <table style="width:100%;"> <thead> <th style="width:5%">REC. ID</th> <th style="width:20%">REGION NAME</th> <th style="width:10%">NON-FLEET</th> <th style="width:10%">FLEET</th> <th style="width:7%">ACTIVE LEADS</th> <th style="width:7%">FRESH</th> <th style="width:7%">POTENTIAL</th> <th style="width:7%">REQ.DEMO</th> <th style="width:7%">APPROVAL</th> <th style="width:10%">SOLD</th> <th style="width:10%">LOST</th> </thead> <?php $dealID= $user_data['dealer']; $compID= $user_data['company']; $vwRegionList = mysql_query("SELECT * FROM `db_region` WHERE 1 ORDER by `region_name` ASC"); while($row=mysql_fetch_array($vwRegionList)){ $leadByRegionF = 0; $leadByRegionN = 0; $isFleet=''; $fresh=''; $warm=''; $approval=''; $win=''; $hot=''; $lost=''; $curRegion = $row['region_name']; echo "<tr>"; echo "<td>".$row['id']."</td>"; echo "<td>".$row['region_name']."</td>"; echo "<td>"; $countNonFleetCustomer = mysql_result(mysql_query("SELECT COUNT('c_id') FROM `vts_customers` WHERE `cust_region`='".$row['region_name']."' AND `status`='1'"),0); echo number_format($countNonFleetCustomer,0,'',','); echo"</td>"; echo "<td>"; $countFleetCustomer = mysql_result(mysql_query("SELECT COUNT('bid') FROM `businesses_names` WHERE `business_region`='".$row['region_name']."' AND `status`='1' AND `comp_owner_id`='$compID'"),0); echo number_format($countFleetCustomer,0,'',','); echo"</td>"; echo "<td>"; $countActiveLeads = mysql_query("SELECT * FROM `sales_prospecting` WHERE `status`='open' AND `comp_id`='$compID'"); while ($ac=mysql_fetch_array($countActiveLeads)){ $custID = $ac['cust_id']; $isFleet = $ac['is_fleet']; if($isFleet === 'Yes'){ //FLEET PROSPECT $getAccountRegion = mysql_result(mysql_query("SELECT `cust_region` FROM `vts_customers` WHERE `c_id`='$custID'"),0); $getAccountRegion = mysql_result(mysql_query("SELECT `business_region` FROM `businesses_names` WHERE `bid`='$custID'"),0); if($getAccountRegion === $curRegion){ $leadByRegionF = $leadByRegionF + 1; if($ac['hot_date']=='' AND $ac['warm_date']=='' AND $ac['sales_approval']=='' AND $ac['sales_approval']==''){ $fresh = $fresh + 1; } if($ac['hot_date']=='' && $ac['warm_date']!='' && $ac['sales_approval']==''){ $warm = $warm + 1; } if($ac['sales_approval']=='' && $ac['hot_date']!='' && $ac['win_date']==''){ $hot = $hot + 1; } if($ac['win_date']=='' && $ac['sales_approval']!='' && $ac['lost_date']==''){ $approval= $approval + 1; } } } if($isFleet === 'No'){ //FLEET PROSPECT $getAccountRegion = mysql_result(mysql_query("SELECT `cust_region` FROM `vts_customers` WHERE `c_id`='$custID'"),0); $getAccountRegionN = mysql_result(mysql_query("SELECT `cust_region` FROM `vts_customers` WHERE `c_id`='$custID'"),0); if($getAccountRegionN === $curRegion){ $leadByRegionN = $leadByRegionN + 1; if($ac['hot_date']=='' AND $ac['warm_date']=='' AND $ac['sales_approval']=='' AND $ac['sales_approval']==''){ $fresh = $fresh + 1; } if($ac['hot_date']=='' && $ac['warm_date']!='' && $ac['sales_approval']==''){ $warm = $warm + 1; } if($ac['sales_approval']=='' && $ac['hot_date']!='' && $ac['win_date']==''){ $hot = $hot + 1; } if($ac['win_date']=='' && $ac['sales_approval']!='' && $ac['lost_date']==''){ $approval= $approval + 1; } } } } $LCCount = $leadByRegionF + $leadByRegionN; echo $LCCount; echo"</td>"; echo "<td>"; echo number_format($fresh,0,'',','); echo"</td>"; echo "<td>"; echo number_format($warm,0,'',','); echo"</td>"; echo "<td>"; echo number_format($hot,0,'',','); echo"</td>"; echo "<td>"; echo number_format($approval,0,'',','); echo"</td>"; echo "<td>"; $countActiveLeadC = mysql_query("SELECT * FROM `sales_prospecting` WHERE `status`='closed' AND `comp_id`='$compID'"); while ($lc=mysql_fetch_array($countActiveLeadC)){ $custID = $lc['cust_id']; $isFleet = $lc['is_fleet']; if($isFleet === 'Yes'){ $getAccountRegion = mysql_result(mysql_query("SELECT `business_region` FROM `businesses_names` WHERE `bid`='$custID'"),0); if($getAccountRegion === $curRegion){ $getAccountRegion = mysql_result(mysql_query("SELECT `business_region` FROM `businesses_names` WHERE `bid`='$custID'"),0); if($getAccountRegion === $curRegion){ if($lc['lost_date']!='' && $lc['status'] =='closed'){ $lost= $lost + 1; } if($lc['win_date']!='' && $lc['status'] =='closed'){ $win= $win + 1; } } } } if($isFleet === 'No'){ $getAccountRegionN = mysql_result(mysql_query("SELECT `cust_region` FROM `vts_customers` WHERE `c_id`='$custID'"),0); if($getAccountRegionN === $curRegion){ $leadByRegionN = $leadByRegionN + 1; $getAccountRegion = mysql_result(mysql_query("SELECT `business_region` FROM `businesses_names` WHERE `bid`='$custID'"),0); if($getAccountRegion === $curRegion){ } } } } echo number_format($win,0,'',','); echo"</td>"; echo "<td>"; echo number_format($lost,0,'',','); echo"</td>"; echo "</tr>"; } ?> </table> <h1 style="margin:0px;padding:5px;font-family:Calibri;font-size:20px;color:black" class="bgColor">PROSPECT SUMMARY</h1> <div style="width:100%;height:700px;overflow:auto;border:0px solid green"> <table style="width:100%;"> <thead> <th style="width:5%">REC ID</th> <th style="width:20%">CUSTOMER NAME</th> <th style="width:9%">CUST. TYPE</th> <th style="width:9%">SALES GROUP</th> <th style="width:12%">GROUP HEAD</th> <th style="width:10%">DATE ASSIGNED</th> <th style="width:9%">POTENTIAL</th> <th style="width:9%">REQ.DEMO</th> <th style="width:9%">APPROVAL</th> </thead> <?php $loadProspect = mysql_query("SELECT * FROM `sales_prospecting` WHERE `comp_id`='$compID' AND `status`!='closed' order by `prospect_name` ASC"); while($pRow = mysql_fetch_array($loadProspect)){ ?><tr onclick="javascript:loadProspectID(this);" ondblclick="popActivityList()"><?php echo "<td>".$pRow['id']."</td>"; echo "<td>".$pRow['prospect_name']."</td>"; echo "<td>"; if($pRow['is_fleet']==='Yes'){ echo "Fleet Account"; }else{ echo "Non-Fleet Account"; } echo"</td>"; echo "<td>"; $gID = $pRow['group_id']; $gName = mysql_result(mysql_query("SELECT `group_name` FROM `db_sales_group` WHERE `gid`='$gID'"),0); echo $gName; echo "</td>"; echo "<td>"; $gID = $pRow['group_id']; $gHead = mysql_result(mysql_query("SELECT `group_head` FROM `db_sales_group` WHERE `gid`='$gID'"),0); $gHeadFName = mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `u_id`='$gHead'"),0); $gHeadLName = mysql_result(mysql_query("SELECT `u_lname` FROM `vts_users` WHERE `u_id`='$gHead'"),0); echo $gHeadLName.', '.$gHeadFName; echo "</td>"; echo "<td>".$pRow['date_added']."</td>"; echo "<td>".$pRow['warm_date']."</td>"; echo "<td>".$pRow['hot_date']."</td>"; echo "<td>".$pRow['sales_approval']."</td>"; //echo "<td><a href='mainindex.php?id=25&d=lms&rID=".$pRow['id']."'>View Activities</a></td>"; echo "</tr>"; } ?> </table> </div> <!--#######################################################################################################--> <div id="popActivityListForm" style="position:absolute;top:500px;left:10%;display:none;width:70%;height:60%;min-height:500px;background:white;border:1px solid gray"> <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'>🎯 SALES ACTIVITY SUMMARY <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#'onclick="popActivityList()" style="font-weight:bold;padding:3px;padding-left:7px;padding-right:7px;border:1px solid lightgray"> ✕ </a> </div> </div> adsfsd </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"); }); //END OF FUNCTION================= }); </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings