-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpdf.php
More file actions
31 lines (29 loc) · 705 Bytes
/
pdf.php
File metadata and controls
31 lines (29 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
session_start();
if(!isset($_SESSION['loggedin']))
header("Location:login.php");
global $ip,$name,$date,$time,$stat,$info;
include_once('classes/userconnection.php');
include_once('classes/userclass.php');
$info= new UserClass();
$user=$_SESSION['uname'];
$result=$info->GetUserInfo($user);
foreach($result as $uinfo)
{
$name=$uinfo['username'];
$ip= $uinfo['ip_address'];
$date= $uinfo['date'];
$time=$uinfo['time'];
$stat= $uinfo['user_status'];
}
require('fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,$name);
$pdf->Cell(40,10,$ip);
$pdf->Cell(40,10,$date);
$pdf->Cell(40,10,$time);
$pdf->Cell(40,10,$stat);
$pdf->Output();
?>