|
Posted by Steve on 11/29/06 04:37
and finally...the contents of the script to show/retrieve the
receipts/uploaded files...call it whatever you will:
<?
$pageTitle = "Downloadable Files";
require_once "inc/head.inc.php";
require_once $site->includeDirectory . 'functions.inc.php';
?>
<div class="pageIntro" style="padding-bottom:35px;">
<span class="dropCap" style="color:#F2E8BB;">D</span>ownload a file ...
</div>
<br clear="all">
<br>
<div style="font-size:7.25pt;">
Most files are in PDF format and require the Adobe Reader to be viewed.
If you do not have the Adobe Reader,
<a
href="http://www.adobe.com/products/acrobat/readstep2.html"
target="adobe"
><strong>click here to download and install it</strong>.
<img src="<?= $site->imagesDirectory ?>adobe.jpg"
style="float:right"/></a>
</div>
<br>
<hr>
<br clear="all">
<?
$sql = "
SELECT Id
,
Description
,
FileName
,
FileSize
,
FileType
,
DATE_FORMAT(Stamp, '%m/%d/%Y %H:%i:%s') Stamp
FROM upLoads
ORDER BY FileName
";
$records = $db->execute($sql);
foreach ($records as $row => $record)
{
$queryString = "?fileName=" . $record['FILENAME'] . "&maxSize=200";
?>
<table style="width:100%;">
<tr>
<td class="label" style="text-align:left; vertical-align:middle;
width:300px;">
<a
class="menuItem"
href="<?= $site->uri ?>get.file.php<?= $queryString ?>"
style="margin:0px; white-space:nowrap;"
title="Click To Open: <?= $record['DESCRIPTION'] ?>"
>
<?= $record['DESCRIPTION'] ?>
</a>
</td>
<td class="value" style="text-align:left; width:200px;">
<a
href="<?= $site->uri ?>get.file.php<?= $queryString ?>"
style="font-size:12pt;"
>
<img
src="<?= $site->uri ?>get.thumb.nail.php<?= $queryString ?>"
alt="<?= $record['DESCRIPTION'] ?>"
title="Click To Open: <?= $record['DESCRIPTION'] ?>"
/>
</a>
</td>
</tr>
<tr>
<td class="label" style="text-align:right; width:200px;">
File Name
</td>
<td class="value" style="text-align:left; width:200px;">
<?= $record['FILENAME'] ?>
</td>
</tr>
<tr>
<td class="label" style="text-align:right; width:200px;">
File Size
</td>
<td class="value" style="text-align:left; width:200px;">
<?= formatBytes($record['FILESIZE']) ?>
</td>
</tr>
<tr>
<td class="label" style="text-align:right; width:200px;">
File Type
</td>
<td class="value" style="text-align:left; width:200px;">
<?= $record['FILETYPE'] ?>
</td>
</tr>
<tr>
<td class="label" style="text-align:right; width:200px;">
Uploaded
</td>
<td class="value" style="text-align:left; width:200px;">
<?= $record['STAMP'] ?>
</td>
</tr>
</table>
<br>
<?
}
echo $sessionFooter;
?>
Navigation:
[Reply to this message]
|