<?php  /* STEP 1: LOAD RECORDS - Copy this PHP code block to the TOP of your page BEFORE anything else. */  require_once "init.php";  list($listingRecords, $listingDetails) = getRecords(array(    'tableName'   => 'listings',    'joinTable'   => 'homepages',    'where'       => whereRecordNumberInUrl(1),    'limit'       => '1',  ));  $listing = @$listingRecords[0];  if (!$listing) { print "Listing not found!"; exit; }?><?php include "include_header.php"; ?>      <table width="980" border="0" cellspacing="0" cellpadding="0">                  <tr>            <td width="360" rowspan="3" align="left" valign="top" background="images/text-bkg.jpg"><table width="358" border="0" cellpadding="1" cellspacing="0">                            <tr>                <td width="20"><img src="images/1pixel.gif" width="20" height="1" /></td>                <td width="298"><img src="images/1pixel.gif" width="295" height="17" /></td>                <td width="34"><img src="images/1pixel.gif" width="34" height="1" /></td>                </tr>              <tr>                <td>&nbsp;</td>                  <td><h1><?php echo $listing['title'] ?></h1></td>                  <td>&nbsp;</td>                </tr>                            <tr>                <td colspan="3"><img src="images/1pixel.gif" width="1" height="10" /></td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain"><h3><?php echo $listing['subtitle'] ?></h3></td>                  <td class="textmain">&nbsp;</td>                </tr>                            <tr>                <td height="26">&nbsp;</td>                  <td valign="bottom" class="textmain"><img src="images/subt-details.jpg" alt="property details" width="300" height="20" /></td>                  <td valign="bottom" class="textmain">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain"><span class="title"><b>MLS # <?php echo $listing['mls'] ?></b></span></td>                  <td class="textmain">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain"><span class="title"><?php echo $listing['address'] ?></span></td>                  <td class="textmain">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain"><span class="title"><?php echo $listing['city'] ?>, <?php echo $listing['state'] ?></span></td>                  <td class="textmain">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain"><span class="title"><b>$<?php echo number_format($listing['price']) ?></b></span></td>                  <td class="textmain">&nbsp;</td>                </tr>                            <tr>                <td height="26">&nbsp;</td>                  <td valign="bottom" class="textmain"><img src="images/subt-description.jpg" alt="property description" width="300" height="20" /></td>                  <td valign="bottom" class="textmain">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain"><span class="title"><?php echo $listing['description'] ?></span>                  </td>                  <td class="textmain">&nbsp;</td>                </tr>                                      <tr>                 <td>&nbsp;</td>                   <td class="textmain"> 		    <span class="title"> 		      <?php foreach ($listing['pdf_file'] as $pdf): ?> 		        <a href = "<?php echo $pdf['urlPath'];?>" target="blank" class="textmain_title" style="font-weight: bold">CLICK HERE FOR<BR />		        PROPERTY SHEET!</a><br/> 		      <?php endforeach ?> 		    </span>		  </td> 		                     <td class="textmain">&nbsp;</td>               </tr>                            <tr>                <td height="26">&nbsp;</td>                  <td valign="bottom" class="textmain"><img src="images/subt-listed-by-agent.jpg" alt="listed by agent" width="300" height="20" /></td>                  <td valign="bottom" class="textmain">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain_sub_title"><a href="<?php echo $listing['homepages._link'] ?>"><?php echo $listing['homepages.fullname'] ?></a>, <?php echo $listing['listing_company'] ?></td>                  <td class="textmain_sub_title">&nbsp;</td>                </tr>              <tr>                <td colspan="3">Listed Jointly With (values): <?php echo join(', ', $listingsRecord['listed_jointly:values']); ?><br/>      Listed Jointly With (labels): <?php echo join(', ', $listingsRecord['listed_jointly:labels']); ?><br/></td>              </tr>              <tr>                <td colspan="3"><img src="images/1pixel.gif" width="1" height="4" /></td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain_sub_title"><span style="font-weight: bold"><i>Call:</i> <?php echo $listing['homepages.phone'] ?></span></td>                  <td class="textmain_sub_title">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain_sub_title"><a href="listings.php?createdByUserNum=<?php echo $listing['createdByUserNum'] ?>"><b>Click here to view my other listings</b></a></td>                  <td class="textmain_sub_title">&nbsp;</td>                </tr>              <tr>                <td colspan="3"><img src="images/1pixel.gif" width="1" height="4" /></td>                </tr>                            <tr>                <td>&nbsp;</td>                  <td class="textmain"><span class="textmain_italic">Share:</span></td>                  <td class="textmain">&nbsp;</td>                </tr>              <tr>                <td>&nbsp;</td>                  <td class="textmain"><a href="mailto:?subject=SOMEONE%20HAS%20SHARED%20A%20DunhamRealEstateServices.com%20LISTING%20WITH%20YOU&amp;body=<?php echo thisPageUrl() ?>"><b>Email this Page</b></a></td>                  <td class="textmain">&nbsp;</td>                </tr>              <tr>                <td colspan="3">&nbsp;</td>                </tr>                          </table></td>            <td align="left" valign="bottom" STYLE="background-repeat:repeat-x;" class="captions">&nbsp;</td>          </tr>          <tr>          <td height="25" align="left" valign="bottom" background="images/bnr-bkg.jpg" STYLE="background-repeat:repeat-x;" class="captions"><table width="608" border="0" cellspacing="0" cellpadding="0">            <tr>              <td width="420">              <?php foreach ($listingRecords as $record): ?>  <?php if ($record['banner_status'] == 'Sold') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-sold.jpg" width="312" height="25" /><?PHP endif ?>  <?php if ($record['banner_status'] == 'Reduced') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-reduced.jpg" width="312" height="25" /><?PHP endif ?>  <?php if ($record['banner_status'] == 'New') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-new-listing.jpg" width="312" height="25" /><?PHP endif ?> <?php endforeach ?>              </td>              <td width="180" align="right" valign="middle" class="captions">Click photo(s) to enlarge </td>            </tr>          </table>            </td>        </tr>        <tr>          <td width="620" align="center" valign="top" class="captions"><table width="620" height="136" border="0" cellpadding="5">    <tr class="captions">      <?php foreach ($listing['uploads'] as $upload): ?>      <?php if ($upload['hasThumbnail']): ?>      <td align="center" valign="center"><table width="100" height="100" border="0" cellpadding="0" cellspacing="0" id="frame">          <tr>            <td><a href="<?php echo $upload['urlPath'] ?>" rel="lightbox[uploads]" title="<?php echo $upload['info1'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="1" alt="<?php echo $upload['info1'] ?>" /></a><br/>            </td>          </tr>        </table>          <?php echo $upload['info2'] ?><br/>          <?php echo $upload['info3'] ?>      </td>      <?php $maxCols=2; if (@++$count % $maxCols == 0): ?>    </tr>    <tr>      <?php endif; ?>      <?php endif ?>      <?php endforeach ?>    </tr>  </table>  <?php if (!$listing['uploads']): /* if no uploads show this: */ ?>  <table cellspacing="0" cellpadding="0" width="150" class="noPhoto" style="height: 100px">    <tr>      <td bgcolor="#EEEEEE" align="center"><img src="images/no_photo_available.jpg" width="225" height="150" /></td>    </tr>  </table>   <?php endif; ?>          </td>        </tr>        <tr>          <td width="360" background="images/text-bkg.jpg">&nbsp;</td>          <td width="620" height="40">&nbsp;</td>        </tr>      </table>      <?php include "include_footer.php"; ?>