-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReceipts.php
59 lines (47 loc) · 1.16 KB
/
Receipts.php
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!doctype.html>
<html>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<?php include("Header.php"); ?>
<?php include("Common.php"); ?>
<body>
<?php include("Navigator.php"); ?>
<?php include("LeftNavigator.php"); ?>
<div class="content" align="center" >
<br>
<a href="javascript:history.back()">Back</a>
<br>
<br>
<?php
if(!isset($_SESSION['username']))
{
// not logged in
header('Location: Login.php');
exit();
}
$id=$_SESSION["username"];
$userid=$_GET['uid'];
$initiative_id=$_GET['ini_num'];
$filename="images/receipts/".$userid."_".$initiative_id.".jpg" ;
$filename1="images/receipts/".$initiative_id.".pdf" ;
$filename2="images/receipts/".$initiative_id.".jpg" ;
if (file_exists($filename))
{
echo "<img src='".$filename."' width=680 height=380 >";
}
else if (file_exists($filename1))
{
echo "<iframe src='".$filename1."' width=\"100%\" style=\"height:100%\"></iframe>";
}
else if (file_exists($filename2))
{
echo "<img src='".$filename2."' width=680 height=380 >";
}
else
{
echo "<p align=center ><br /><br /><br /><br /><br /><br /><br /><br /><br />Receipt not available</p>";
}
?>
</div>
</body>
</html>