Hello Chris, it's so good to see you here as you already helped me a lot on another project! Here's the entire source:
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/observat/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($gestion_del_conocimientoRecords, $gestion_del_conocimientoMetaData) = getRecords(array(
'tableName' => 'gestion_del_conocimiento',
'perPage' => '10',
'allowSearch' => '0',
));
?>
<!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>Gestion del Conocimiento</title>
<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 topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" bgcolor="#E1E7C3">
<div align="center">
<table border="0" width="1000" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center">
<?php include('aaa-header.htm'); ?>
</div>
</td>
</tr>
</table>
</div>
<div align="center">
<table border="0" width="1000" id="table2" cellspacing="0" cellpadding="0">
<tr>
<td width="205" valign="top" align="center" bgcolor="#FFFFFF">
<?php include('aaa-menu.htm'); ?>
</td>
<td align="center" valign="top" bgcolor="#FFFFFF" width="595">
<table border="0" cellpadding="5" cellspacing="0" width="100%" id="table5">
<tr>
<td align="left" valign="top">
<br>
<!-- CONTENIDO -->
<!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<h1><font size="5" color="#3366CC">Gestión del conocimiento</font></h1>
<font size="2">
<?php foreach ($gestion_del_conocimientoRecords as $record): ?>
<b><?php echo $record['title'] ?></b><br/>
Publicado el: <?php echo date("D, M jS, Y g:i:s a", strtotime($record['date'])) ?><br/>
<!-- For date formatting codes see:
http://www.php.net/date -->
<img src="<?php echo $upload['urlPath'] ?>" alt="" />
<?php echo $record['content'] ?><!-- STEP 2a: Display Uploads for field 'documento' (Paste this anywhere inside STEP2 to display uploads) --><!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 --><?php foreach ($record['documento'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<P><img border="0" src="images/download15x15.jpg" width="15" height="15">Descargar:
<a href="<?php echo $upload['urlPath'] ?>"> <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->
</font>
<hr/>
<font size="2">
<?php endforeach ?>
<?php if ($gestion_del_conocimientoMetaData['invalidPageNum']): ?>
Results page '<?php echo $gestion_del_conocimientoMetaData['page']?>'
not found, <a href="<?php echo $gestion_del_conocimientoMetaData['firstPageLink'] ?>">
start over >></a>.<br/><br/>
<?php elseif (!$gestion_del_conocimientoRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
<!-- /STEP2: Display Records -->
<!-- STEP3: Display Page Links (Paste anywhere below "Load Record List") -->
<?php if ($gestion_del_conocimientoMetaData['prevPage']): ?>
<a href="<?php echo $gestion_del_conocimientoMetaData['prevPageLink'] ?>">
<< previo</a>
<?php else: ?>
<< previo
<?php endif ?>
- página <?php echo $gestion_del_conocimientoMetaData['page'] ?>
de <?php echo $gestion_del_conocimientoMetaData['totalPages'] ?>
-
<?php if ($gestion_del_conocimientoMetaData['nextPage']): ?>
<a href="<?php echo $gestion_del_conocimientoMetaData['nextPageLink'] ?>">
siguiente >></a>
<?php else: ?>
siguiente >>
<?php endif ?>
<!-- /STEP3: Display Page Links -->
<!-- /CONTENIDO -->
</font>
</td>
</tr>
</table>
<p align="left">
</td>
<td width="200" bgcolor="#BFC898" valign="top" align="center">
<p>
<?php include('aaa-lateral.htm'); ?> </td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="1000" id="table6" bgcolor="#FFFFFF">
<tr>
<td>
<p align="center">
<?php include('aaa-footer.htm'); ?></td>
</tr>
</table>
</div>
</body>
</html>
Sven Sanchez
www.deguate.com