G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php session_start(); include ('config.php'); $empids = $_POST['empids']; $iii = $_POST['fdate']; $fdate = date("d-m-Y", strtotime($iii)); $datess = explode('-', $fdate); $dd1 = $datess[0]; if($dd1 < '10') { $days = substr($dd1, 1,1); if($days > '10') { $days = $dd1; } } else { $days = $dd1; } $mm1 = $datess[1]; $yy1 = $datess[2]; $ii = $_POST['tdate']; $tdate = date("d-m-Y", strtotime($ii)); $dates = explode('-', $tdate); $dd = $dates[0]; $mm = $dates[1]; $yy = $dates[2]; $stat = 'Inactive'; if($empids == 'All') { $ename = "All Employees"; } else { $sql2 = $js->prepare('SELECT * FROM employees WHERE empid = :empids '); $sql2->execute(array(':empids' => $empids)); while($row2 = $sql2->fetch(PDO::FETCH_ASSOC)) { $ename = $row2['empname']; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <style type="text/css"> @page { size: landscape; } @media print { table.paging thead td, table.paging tfoot td { } body {-webkit-print-color-adjust: exact;} } header, footer { width: 100%; height: .6in; } header { position: absolute; top: 0; } @media print { header, footer { position: fixed; } footer { bottom: 0; } .noprint {display:none;} } </style> <style type="text/css"> <!-- @media print { .noprint {display:none;} } @media screen { ... } --> </style><script> function myFunction() { window.print(); } </script> </head> <body> <div align="center" style="background-color:#FFF"> <img src="images/dmc logo.png" width="200" height="60"><HR style="border-color:#5053FD" /> <h3><b> Marketing Report From <?php echo $fdate?> To <?php echo $tdate?> <br> <?php echo $ename?> </b></h3> <table style="border-collapse: collapse; " border="1" cellpadding="5" width="100%"> <thead> <tr><th colspan="11" align="center">Follow-Up Visits</th></tr> <tr style="background-color:#030303; color:#fff;"> <th>SL No</th> <th>Date_of_Visit</th> <th>Customer ID</th> <th>Location</th> <th>Company Name</th> <th>Contact Person</th> <th>Mobile</th> <th>Remarks</th> <th>EnteredBy</th> <th class="noprint">Job Order</th> <th class="noprint">Delete</th> </tr> </thead> <?php $j=1; if($empids == 'All') { $resultrr = $js->prepare('SELECT * FROM `marketingclients` WHERE entrydate >= :iii AND entrydate <= :ii '); $resultrr->execute(array(':iii' => $iii, ':ii' => $ii)); } else { $resultrr = $js->prepare('SELECT * FROM `marketingclients` WHERE entrydate >= :iii AND entrydate <= :ii AND enteredby = :empids '); $resultrr->execute(array(':ii' => $ii, ':iii' => $iii, ':empids' => $empids)); } while($rowrr = $resultrr->fetch(PDO::FETCH_ASSOC)) { $id = $rowrr['id']; $compid = $rowrr['compid']; $sdate = date('d-m-Y', strtotime($rowrr['entrydate'])); $comploc = $rowrr['comploc']; $compname = $rowrr['compname']; $contact_person = $rowrr['contact_person']; $compmob = $rowrr['compmob']; $remarks = strtoupper($rowrr['remarks']); $assignedto = $rowrr['enteredby']; if($assignedto != '') { $sqla2 = $js->prepare('SELECT * FROM employees WHERE empid = :assignedto '); $sqla2->execute(array(':assignedto' => $assignedto)); while($rowa2 = $sqla2->fetch(PDO::FETCH_ASSOC)) { $assigned = $rowa2['empname']; } } else { $assigned = ''; } if($j % 2 == '0') { echo "<tr style='background-color:#ccc;'>"; } else { echo "<tr style='background-color:#F0F0F0;'>"; } echo "<td>$j</td>"; echo "<td>$sdate</td>"; echo "<td>$compid</td>"; echo "<td>$comploc</td>"; echo "<td>$compname</td>"; echo "<td>$contact_person</td>"; echo "<td>$compmob</td>"; echo "<td>$remarks</td>"; echo "<td>$assigned</td>"; echo "<td align='center' class='noprint'><a href='jobordervisit.php?id=$id' target='_blank'><i class='fa fa-tasks' style='color:blue;'></i></td>"; echo "<td align='center' class='noprint'><a href='delete_marketingvisit.php?id=$id'><i class='fa fa-trash-o' style='color:red;'></i></td>"; echo "</tr>"; $j++; } ?> </table> <table style="border-collapse: collapse; " border="1" cellpadding="5" width="100%"> <thead> <tr><th colspan="11" align="center">New Client Registration</th></tr> <tr style="background-color:#030303; color:#fff;"> <th>SL No</th> <th>Date_of_Visit</th> <th>Customer ID</th> <th>Location</th> <th>Company Name</th> <th>Contact Person</th> <th>Mobile</th> <th>Remarks</th> <th>Visited By</th> </tr> </thead> <?php $j=1; $mstat = 'MARKETING PAGE'; if($empids == 'All') { $resultrr = $js->prepare('SELECT * FROM `customer_entry` WHERE entrydate >= :iii AND entrydate <= :ii AND status = :mstat '); $resultrr->execute(array(':iii' => $iii, ':ii' => $ii, ':mstat' => $mstat)); } else { $resultrr = $js->prepare('SELECT * FROM `customer_entry` WHERE entrydate >= :iii AND entrydate <= :ii AND enteredby = :empids AND status = :mstat '); $resultrr->execute(array(':ii' => $ii, ':iii' => $iii, ':empids' => $empids, ':mstat' => $mstat)); } while($rowrr = $resultrr->fetch(PDO::FETCH_ASSOC)) { $id = $rowrr['id']; $compid = $rowrr['custid']; $sdate = date('d-m-Y', strtotime($rowrr['entrydate'])); $comploc = $rowrr['location']; $compname = $rowrr['companyname']; $contact_person = $rowrr['custname']; $compmob = $rowrr['phone']; $remarks = strtoupper($rowrr['remarks']); $assignedto = $rowrr['enteredby']; if($assignedto != '') { $sqla2 = $js->prepare('SELECT * FROM employees WHERE empid = :assignedto '); $sqla2->execute(array(':assignedto' => $assignedto)); while($rowa2 = $sqla2->fetch(PDO::FETCH_ASSOC)) { $assigned = $rowa2['empname']; } } else { $assigned = ''; } if($j % 2 == '0') { echo "<tr style='background-color:#ccc;'>"; } else { echo "<tr style='background-color:#F0F0F0;'>"; } echo "<td align='center'>$j</td>"; echo "<td>$sdate</td>"; echo "<td>$compid</td>"; echo "<td>$comploc</td>"; echo "<td>$compname</td>"; echo "<td>$contact_person</td>"; echo "<td>$compmob</td>"; echo "<td>$remarks</td>"; echo "<td>$assigned</td>"; echo "</tr>"; $j++; } ?> </table> <div class="noprint"> <p align="center"> <a href="#" onClick="myFunction()" style="border:5px solid; background-color:#093; color:#FFF; padding:8px; text-decoration:none;">PRINT</a> <a href="searchvisitsreport.php" style="border:5px solid; background-color:#F00; color:#FFF; padding:8px; text-decoration:none;">CLOSE</a> </p> </div> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">