Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. require_once("../config.php");
  2. session_start();
  3. $pdf=new PDF_MC_Table();
  4. $nID=$_SESSION['empID'];
  5.  
  6. //Profile
  7. $pdf->AddPage();
  8. $pdf->SetWidths(array(30,12,28,36,28,28,12,14));
  9. //$pdf->SetTextColor( 21, 137, 255);
  10. $pdf->SetFont('Arial','B',12);
  11. //Profile section starts
  12. $pdf->Write(26,'Profile');
  13. $pdf->Ln();
  14. $pdf->SetFont('Arial', 'B', 12);
  15. $pdf->SetTextColor( 0, 0, 0);
  16. $pdf->Row(array('Name','ID','Department','Role', 'Manager ID','Reviewer ID','Year','Cycle'));
  17. $query= "select employee.EmployeeName,employee.EmployeeID,employee.ReviewerID,employee.Role,employee.Department,employee.ManagerID,employee.Email,employee.Phone,employee.Photo, department.DeptName, role.RoleName from employee LEFT JOIN department ON department.DeptId=employee.Department LEFT JOIN role ON role.RoleID=employee.Role where employee.EmployeeID='".$_SESSION['empID']."' AND employee.CompanyID='".$_SESSION['compID']."' AND department.CompanyID='".$_SESSION['compID']."' AND role.CompanyID='".$_SESSION['compID']."' AND employee.ActiveStatus=1";
  18.  
  19. $result=mysql_query($query);
  20. $count=mysql_num_rows($result);
  21. while($row=mysql_fetch_array($result))
  22. {
  23. $Name=$row['EmployeeName'];
  24. $EmployeeID=$row['EmployeeID'];
  25. $Dept=$row['DeptName'];
  26. $Role=$row['RoleName'];
  27. $Manager=$row['ManagerID'];
  28. $Reviewer=$row['ReviewerID'];
  29. $pdf->SetFont('Arial', '', 12);
  30. $pdf->SetTextColor( 0, 0, 0);
  31. $pdf->Row(array($Name,$EmployeeID,$Dept,$Role,$Manager,$Reviewer,$_SESSION['year'],$_SESSION['cycle']));
  32. }
  33.  
  34. $pdf->Output();
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement