forked from markosjal/AirScan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowpdf.php
More file actions
32 lines (26 loc) · 770 Bytes
/
showpdf.php
File metadata and controls
32 lines (26 loc) · 770 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
include_once 'phppagestart.php';
header('Content-type: application/pdf');
header('Content-disposition: inline; filename="'.$_GET['image'].'"');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
include_once'config.inc.php';
if (($requireauth=='yes') && ($_SESSION ['loggedin']=='yes') && ($_SESSION ['username']=='admin'))
{
@readfile($_SESSION['viewpath'].$_GET['image']);
}
elseif (($requireauth=='yes') && ($_SESSION ['loggedin']=='yes')&& ($_SESSION ['username']!='admin'))
{
@readfile($_SESSION['userpath'].$_GET['image']);
}
elseif ($requireauth!='yes')
{
@readfile($_SESSION['userpath'].$_GET['image']);
}
else
{
}
//echo 'lkjlj';
//echo $_SESSION['viewpath'].$_GET['image'];
//echo $_SESSION['viewpath'].$_GET['image'];
?>