<?php header('Content-type: text/html; charset=utf-8'); ?>

<?php

  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */



  // 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($blogRecords, $blogMetaData) = getRecords(array(

    'tableName'   => 'blog',

    '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:fb="http://www.facebook.com/2008/fbml">

 <head>

  <title>Blog</title>

  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />



 </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">

	<table border="0" width="1000" id="table1" cellspacing="0" cellpadding="0">

		<tr>

			<td>

									

			<?php include('aaa-header.htm'); ?> </td>

		</tr>

	</table>

</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">

					

					

					<h1><font size="1">

					

					

					<br>

			

			

			

			

  					</font><font color="#3366CC" size="5" face="Arial">Blog</font></h1>

    				<font size="2" face="Arial">

    				<p align="left">

    <?php foreach ($blogRecords as $record): ?><b><?php echo $record['title'] ?></b><br/>

      				Fecha de publicación: <?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 -->

					<?php echo $record['content'] ?><br/>

      				<br/>





      <!-- STEP 2a: Display Uploads for field 'uploads' (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['uploads'] 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: ?>

            <a href="<?php echo $upload['urlPath'] ?>">Descargar<?php echo $upload['filename'] ?></a><br/>



          <?php endif ?>

        <?php endforeach ?>

      <!-- STEP2a: /Display Uploads -->





      				</font>





      				</p>


<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&amp;xfbml=1"></script><fb:comments xid="blog-odsan" width="575"></fb:comments>



      <hr align="left"/>

    				<font size="2" face="Arial">

    				<p align="left">

    <?php endforeach ?>



    <?php if ($blogMetaData['invalidPageNum']): ?>

      Results page '<?php echo $blogMetaData['page']?>' not found, <a href="<?php echo $blogMetaData['firstPageLink'] ?>">start over &gt;&gt;</a>.<br/><br/>

    <?php elseif (!$blogRecords): ?>

      No records were found!<br/><br/>

    <?php endif ?>

  <!-- /STEP2: Display Records -->





  <!-- STEP3: Display Page Links (Paste anywhere below "Load Record List") -->

    <?php if ($blogMetaData['prevPage']): ?>

      <a href="<?php echo $blogMetaData['prevPageLink'] ?>">&lt;&lt; previo</a>

    <?php else: ?>

      &lt;&lt; previo

    <?php endif ?>



    - página <?php echo $blogMetaData['page'] ?> de <?php echo $blogMetaData['totalPages'] ?> -



    <?php if ($blogMetaData['nextPage']): ?>

      				<a href="<?php echo $blogMetaData['nextPageLink'] ?>">

					siguiente &gt;&gt;</a>

    <?php else: ?>

      				siguiente &gt;&gt;

    <?php endif ?>

  <!-- /STEP3: Display Page Links -->



  			

			

			

			

			

			

			

			

			

			

			

					

					

					</font>



  			

			

			

			

			

			

			

			

			

			

			

					

					

					</td>

				</tr>

			</table>

			<p align="left">

			&nbsp;</td>

			<td width="200" bgcolor="#BFC898" valign="top" align="center">

			

			

			

			<p align="left">

			

			

			

			<?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>