0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: search_advancetakenentry_ctrl.php
<?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; $error_flag=0; $completeday= @$_POST['checkcompletedays']; $type= @$_POST['cmbadvan_imp']; if(isset($_POST['show'])) { if($completeday!=fullday) { $fromdate_dd= @$_POST['cmbfromdd']; $fromdate_mm=@$_POST['cmbfrommm']; $fromdate_yy=@$_POST['txtfromyy']; $from_date=$fromdate_yy."-".$fromdate_mm."-".$fromdate_dd; $todate_mm= @$_POST['cmbtomm']; $todate_dd=@$_POST['cmbtodd']; $todate_yy=@$_POST['txttoyy']; $to_date=$todate_yy."-".$todate_mm."-".$todate_dd; if (!is_numeric(@$_POST['txttoyy'])) { $error['fdate_numeric']="Please enter valid year"; $error_flag=1; } if (!is_numeric(@$_POST['txtfromyy'])) { $error['todate_numeric']="Please enter valid year"; $error_flag=1; } if ($fromdate_yy="") { $error['fdate_yy']="Please enter year"; $error_flag=1; } if ($todate_yy="") { $error['todate_yy']="Please enter year"; $error_flag=1; } } if($error_flag==1) { echo "<script>window.location='http://localhost/CPFMS/USER/search_advancetakenentry.php</script>"; /*$url="http://".$server_ip."/CPFMS/USER/summary.php?pcode=".$p_code_value; echo "<script>window.location='$url'</script>";*/ } } class search_advancetakenentry { //50 public function printsearch_advancetakenentryDetails($sql1,$from_date,$to_date) {//53 $sql=mysql_query($sql1); if(mysql_affected_rows()>0) {//57 ?> <div align="center"><b><font color="#660000">Advance Taken Entry </font><?php echo"From:$from_date"?> <?php echo "To:$to_date";?></b></div> <table width="880" height="83" border="1" align="center" bordercolor="#CC0000"> <tr bgcolor="#853008"> <th width="18" height="42"><font color="#F7E7BD">S no</font></th> <th width="53"><font color="#F7E7BD">AI No</font></th> <th width="94"><p><font color="#F7E7BD">Advance or Imprest</font></p> </th> <th width="82"><font color="#F7E7BD">Date</font></th> <th width="110"><font color="#F7E7BD">Name of withdrawer</font></th> <th width="80"><font color="#F7E7BD">Account name</font></th> <th width="66"><font color="#F7E7BD">Amount</font></th> <th width="88"><font color="#F7E7BD">Description</font></th> <th width="46"><font color="#F7E7BD">Closed</font></th> <th width="76"><font color="#F7E7BD">Settlement Amount</font></th> <th width="33"><font color="#F7E7BD">Edit</font></th> <th width="58"><font color="#F7E7BD">Delete</font></th> </tr> <tr><?php $i=0;$debit=0;$credit=0; while($row=mysql_fetch_array($sql)) {//75 ?> <th ><?php @$_SESSION['sl_no']=@$_SESSION['sl_no']+1; echo @$_SESSION['sl_no']; ?></th> <th><?php echo $row['advance_id']; ?></th> <th><?php echo $row['advance_impresed']; ?></th> <th><?php echo $row['date'];; ?></th> <th><?php echo $row['name']; ?></th> <th><?php echo $row['account_name']; ?></th> <th><?php echo $row['amount']; ?></th> <th><?php echo $row['description']; ?></th> <th><?php if ($row['closed'] == 1 ) { echo "Closed"; } else { echo "Not Closed"; } ?></th> <th><?php if ($row['closed'] == 1 ) { echo $row['balance']; } else { echo "Not Closed"; } ?></th> <th><a href="../USER/edit_advancetakenentry.php?id=<?php echo $row['advance_id']; ?>&name=<?php echo $row['project_code'];?>"><img src="../images/edit.png" alt="edit" width="25" height="25" /></a></th> <th><a href="../USER/delete_advancetakenentry.php?id=<?php echo $row['advance_id']; ?>&name=<?php echo $row['project_code'];?>"><img src="../images/delete.jpg" alt="Delete" width="25" height="25" /></a></th> <!-- <th><a href="../USER/edit_payment.php?id=</?php echo $row['payment_id']; ?>"><img src="../images/edit.png" alt="edit" width="25" height="25" /></a></th> <th> <a href="../USER/delete_payment.php?id=</?php echo $row['payment_id']; ?>"><img src="../images/delete.jpg" alt="Delete" width="25" height="25" /></a></th>--> </tr> <?php }//75 ?> </table> <?php }//57 else {//57 ?><font color="#CC0000"><b><?php echo "No Details to display"; ?></b></font><?php }//57 }//53 }//50 ?>