G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php session_start(); include ('config.php'); $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; } $dd1 = $datess[0]; $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]; $headsid = $_POST['heads']; $resultexphq = $js->prepare('SELECT * FROM `heads` WHERE headid = :headsid '); $resultexphq->execute(array('headsid' => $headsid)); while($rowexphq = $resultexphq->fetch(PDO::FETCH_ASSOC)) { $headna = $rowexphq['name']; } $sub = $_POST['r_sub']; if($sub != '') { $resultexpshq = $js->prepare('SELECT * FROM `subheads` WHERE subid = :sub '); $resultexpshq->execute(array('sub' => $sub)); while($rowexpshq = $resultexpshq->fetch(PDO::FETCH_ASSOC)) { $sname = $rowexpshq['subname']; } } if($branch == 'All') { $brname = "All Branches"; } else { $sql2 = $js->prepare('SELECT * FROM branches WHERE brid = :branch '); $sql2->execute(array(':branch' => $branch)); while($row2 = $sql2->fetch(PDO::FETCH_ASSOC)) { $brname = $row2['brname']; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <style type="text/css"> @page { size: A4; margin: .6in; } @media print { #table{ max-width: 2480px; width:100%; } #table td{ width: auto; overflow: hidden; word-wrap: break-word; } .noprint {display:none;} } </style> <script> function myFunction() { window.print(); } </script> </head> <body> <div align="center" style="background-color:#FFF"> <img src="images/logodmc.png"><HR style="border-color:#5053FD" /> <h3><b><u><?php echo $headna?> Report Of <?php echo $sname?> From <?php echo $fdate?> To <?php echo $tdate?></u></b></h3> <table style="border-collapse: collapse; " border="1" cellpadding="5" id = "table" width="100%"> <thead><tr style="background-color:#030303; color:#fff;"> <th width="15%">Date</th> <th width="11%">Heads</th> <th width="16%">Subheads</th> <th width="25%">Payment Mode</th> <th width="16%">Remarks</th> <th width="22%">Total Amount</th> <!--<th>Entered By</th>--> </tr> </thead> <?php if($heads == 'All') { $resultexp = $js->prepare('SELECT * FROM `expenses` WHERE expdate >= :iii AND expdate <= :ii '); $resultexp->execute(array('iii' => $iii, ':ii' => $ii)); } else { $resultexp = $js->prepare('SELECT * FROM `expenses` WHERE expdate >= :iii AND expdate <= :ii AND expheads = :headsid AND expsubheads = :sub '); $resultexp->execute(array('iii' => $iii, ':ii' => $ii, ':headsid' => $headsid, ':sub' => $sub)); } $rtcount = $resultexp->rowCount(); if($rtcount != '0') { while($rowexp = $resultexp->fetch(PDO::FETCH_ASSOC)) { $sdate = date('d-m-Y', strtotime($rowexp['expdate'])); $expheads = $rowexp['expheads']; $premarks = $rowexp['premarks']; $resultexph = $js->prepare('SELECT * FROM `heads` WHERE headid = :expheads '); $resultexph->execute(array('expheads' => $expheads)); while($rowexph = $resultexph->fetch(PDO::FETCH_ASSOC)) { $head = $rowexph['name']; } $expsubheads = $rowexp['expsubheads']; if($expsubheads != '') { $resultexpsh = $js->prepare('SELECT * FROM `subheads` WHERE subid = :expsubheads '); $resultexpsh->execute(array('expsubheads' => $expsubheads)); while($rowexpsh = $resultexpsh->fetch(PDO::FETCH_ASSOC)) { $subhead = $rowexpsh['subname']; } } else { $subhead = ''; } $pmode = $rowexp['pmode']; $enteredby = $rowexp['enteredby']; $sql1 = $js->prepare('SELECT * FROM employees WHERE empid = :enteredby '); $sql1->execute(array(':enteredby' => $enteredby)); while($row1 = $sql1->fetch(PDO::FETCH_ASSOC)) { $ename = $row1['empname']; } $expamount = $rowexp['expamount']; $totcompexp += $expamount; $pieces4 = explode(".", $expamount); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $expamount = $mainmenu4.".".$submenu4; echo "<tr>"; echo "<td>$sdate</td>"; echo "<td>$head</td>"; echo "<td>$subhead</td>"; echo "<td>$pmode</td>"; echo "<td>$premarks</td>"; echo "<td align='right' style='padding-right:10px'>$expamount</td>"; /*echo "<td>$ename</td>";*/ echo "</tr>"; } } $pieces4 = explode(".", $totcompexp); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $totcompexp = $mainmenu4.".".$submenu4; ?> <tr style="line-height:30px;"> <th colspan="5" align="right" style="color:#FC4136">Total</th> <th align="right" style="padding-right:10px; color:#990066"><?php echo $totcompexp ?></th> </tr> </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="search_ledgerstatement.php" style="border:5px solid; background-color:#F00; color:#FFF; padding:8px; text-decoration:none;">CLOSE</a> </p> </div> </div>