<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block to the TOP of your page BEFORE anything else. */
  require_once "D:/inetpub/gjdemo/cmsadmin/lib/viewer_functions.php";

  list($investmentRecords, $investmentMetaData) = getRecords(array(
    'tableName'   => 'investment',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $investmentRecord = @$investmentRecords[0]; // get first record

?>

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="978" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><img src="images/top.jpg" width="978" height="106" /><br />
    <img src="images/banner.jpg" width="978" height="220" /></td>
  </tr>
</table>
<table width="978" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td class="leftcol">
	 <div class="subnavcontainer">
	  <div class="menu">Prior Investments</div>
	  <div class="menuon">Current Investments</div>
		 		 <?php foreach ($investmentRecords as $record): ?>
		 
		  <div class="submenu">
		<a href="<?php echo $record['_link'] ?>"><?php echo $record['title'] ?></a><br/>
		</div>
	      <?php endforeach; ?>
    <?php if (!$investmentRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
		  

	    
	</div>
	</td>
    <td class="rightcol">
	<table border="0" cellpadding="0" cellspacing="0" class="detailtb">
     
	 <?php foreach ($investmentRecords as $record): ?>
	  <tr> 
       
		
      <!-- STEP2a: /Display Uploads -->
		<td class="detailtext">
		
	   <div class="head"><?php echo $record['title'] ?></div>
       <?php echo $record['description'] ?><br/>
	 
		</td>
		
		<td class="detaillogo">
        <?php foreach ($record['logo'] 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 endif ?>
        <?php endforeach ?>
		</td>
      </tr>
	      <?php endforeach; ?>

    <?php if (!$investmentRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
    </table></td>
	
  </tr>
</table>
<br />
<br />
</body>
</html>
