PHP Classes

File: showpdf.php

Recommend this page to a friend!
  Classes of Mark de Leon   PHP Document Scanner using SANE or eSCL AirPrint   showpdf.php   Download  
File: showpdf.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Document Scanner using SANE or eSCL AirPrint
Web interface to scan printed documents
Author: By
Last change:
Date: 4 years ago
Size: 770 bytes
 

Contents

Class file image Download
<?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'];
?>