0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: search_salary_ctrl.php
<?php require_once "../lib/config.php"; //require_once BASE_DIR."/lib/db/DBconnection.php"; require_once BASE_DIR."/lib/db/connection.php"; class salarySearch { //7 public function printsalaryDetails($sql1) {//10 $sql=mysql_query($sql1); if(mysql_affected_rows()>0) {//14 ?> <div align="center"><b><font color="#853008" size="5">Salary Details</font></b> </div> <table width="625" height="81" border="1" align="center" bordercolor="#CC0000"> <tr bgcolor="#853008"> <th width="24"><font color="#F7E7BD"> S No </font></th> <th width="60"><font color="#F7E7BD"> Voucher no: </font></th> <th width="100"><font color="#F7E7BD">Employee Name</font></th> <th width="80"><font color="#F7E7BD">Date </font></th> <th width="104"><font color="#F7E7BD">Salary paid</font></th> <th width="125"><font color="#F7E7BD">Description</font></th> <th width="35"><font color="#F7E7BD"> Edit </font></th> <th width="45"><font color="#F7E7BD">Delete</font></th> </tr> <tr><?php while($row=mysql_fetch_array($sql)) {//32 ?> <th height="50"><?php @$_SESSION['sl_no']=@$_SESSION['sl_no']+1; echo @$_SESSION['sl_no']; ?></th> <th><?php echo $row['svoucherno']; ?></a></th> <th><?php $u_id=@$_SESSION['user_id']; $emp_id_db=$row['emp_id']; $sql_emp="select `emp_name` from employe where `emp_id`='$emp_id_db' and user_id='$u_id'"; $sql3=mysql_query($sql_emp); while($row_emp=mysql_fetch_array($sql3)) { echo $emp_name_var=$row_emp['emp_name']; } ?></th> <th><?php echo $row['date']; ?></th> <th><?php echo $row['salary_paid']; ?></th> <th><?php echo $row['description']; ?></th> <th><a href="../USER/edit_salary.php?id=<?php echo $row['salary_id']; ?>"><img src="../images/edit.png" alt="edit" width="25" height="25" /></a></th> <th> <a href="../USER/delete_salary.php?id=<?php echo $row['salary_id']; ?>"><img src="../images/delete.jpg" alt="Delete" width="25" height="25" /></a></th> </tr> <?php }//32 ?> </table> <?php }//14 else {//14 ?><font color="#CC0000"><b><?php echo "No Salary details to display"; ?></b></font><?php }//14 }//10 }//7 ?>