Feature most recent file upload

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 18, 2008   (RSS)

By zip222 - July 17, 2008

My client needs to upload a new file to a page each month. The most recent file needs to be highligted in some way, and the older files need to remain visible but in a clearly separate section of the page. I know this can be done by setting up two different file uploads, but I was wondering if there is a way for it to be done with just a single upload (to make things simpler for the client). here is the current version, using a single upload, which just generates a single list of files.

<?php
require_once "/usr/www/users/fluency/cmsAdmin/lib/viewer_functions.php";

list($customRecords, $customDetails) = getRecords(array(
'tableName' => 'custom',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$customRecord = $customRecords[0]; // get first record

?>
<?php echo "<?xml version='1.0'?>\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<style type="text/css">
body { font-family: arial; }
.instructions { border: 3px solid #000; background-color: #EEE; padding: 10px; text-align: left; margin: 25px}
</style>
</head>
<body>
<h1>File Viewer</h1>
<ul>
<?php foreach ($customRecord['archived_files'] as $upload): ?>
<li><a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a></li>
<?php endforeach ?>
</ul>

</body>
</html>

Re: [jdancisin] Feature most recent file upload

By zip222 - July 18, 2008

my post is so lonely [:|]