<?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/mvrentals/www/mesaverderentals.com/','','../','../../','../../../');
  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 from 'rentals'
  list($rentalsRecords, $rentalsMetaData) = getRecords(array(
    'tableName'   => 'rentals',
    'loadUploads' => true,
    'allowSearch' => false,
  ));

?><?php include "inc_top.php"; ?>

  
    <div align="center">
	<p align="left"><font face="Copperplate Gothic Bold" size="4">Rental 
	Properties</font></p>
	<p><font face="Verdana" size="1">click on images for more information</font>
	<table width="940" border="2" cellpadding="0" bordercolor="#666633">
	 <?php foreach ($rentalsRecords as $record): ?>		<td width="33%" valign="top">
				 
	
				
					
				
					<p align="center"> <font face="Verdana" size="2"> 
				 <b> <a href="<?php echo $record['_link'] ?>" style="text-decoration: none"><font color="#000000"><?php echo htmlencode($record['address']) ?><br>
					<?php echo join(', ', $record['City:values']); ?>, <?php echo htmlencode($record['state']) ?> <?php echo htmlencode($record['zip']) ?>
					</a></b></font>
					<br>
					<?php foreach ($record['photos'] as $upload): ?>	                                             
        <a href="<?php echo $record['_link'] ?>"> 
					<img  src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['thumbWidth2'] ?>" height="<?php echo $upload['thumbHeight2'] ?>" alt="" border="1" /></a>
                                                  <?php break; ?>
                                                  <?php endforeach ?><br> 
          			<font face="Verdana" size="2"> 
          		<b><?php echo $record['bedroom'] ?> Beds&nbsp;<?php echo join(', ', $record['extra_rooms:values']); ?>&nbsp;<?php echo $record['bath'] ?>&nbsp;Baths <?php if ($record['pool'] == 'Yes'): ?>&nbsp;Pool<?php endif ?>&nbsp;<?php echo htmlencode($record['rent']) ?>
					</b>	<br> 
						
							</font> 
						
							<font face="Verdana" color="#800000"><b> 
						
							<?php if ($record['move_in'] == 'Yes'): ?>
					<?php echo htmlencode($record['move_in_pending']) ?>
			<?php endif ?>
				
         			</b></font>
				
     


      			</td><?php $maxCols=3; if (@++$count % $maxCols == 0): ?>    <tr></tr>
														    <?php endif; ?>  
												  <?php endforeach ?> 		</table>
	</div>

 

    <p align="center"><font face="Copperplate Gothic Bold" size="4">

  

    <?php if (!$rentalsRecords): ?><font color="#800000">
      No properties at this time check back soon!</font><br/></font> <?php endif ?><br/>
    </p>

   <?php include "inc_footer.php"; ?>