<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block to the TOP of your page BEFORE anything else. */
  require_once "/home/d26454/public_html/lib/viewer_functions.php";

  list($filesRecords, $filesDetails) = getRecords(array(
    'tableName'   => 'files',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $filesRecord = $filesRecords[0]; // get first record

?>
<?php include ("toppur.php") ?>
 <head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
 </head>
<body>
  <table width="490" border="0">
  <tr>
    <td><span class="yvirskrift"><?php echo $filesRecord['title'] ?></span>
      <p><?php echo $filesRecord['content'] ?></p>

      <!-- STEP 2a: Display Uploads for field 'downloadPressRelease' (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 ($filesRecord['downloadPressRelease'] 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: ?>
            <b><a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a></b><br>

          <?php endif ?>
        <?php endforeach ?>
        <p>Fyri at lesa PDF skalt tú brúka Acrobat Reader, sum kann takast niður <a href="http://www.adobe.com/products/acrobat/alternate.html" target="_blank">HER</a>.</p></td>
  </tr>
</table><hr size="1" width="490" align="center"><p align="center" class="menuSidur"><a href="#ovast">Til ovast &aacute; s&iacute;&eth;uni</a> | <a href="javascript:history.go(-1)">Til s&iacute;&eth;una frammanundan</a></p><?php include ("botnur.php") ?>