<?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/seagateo/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($furn_portfolioRecords, $furn_portfolioMetaData) = getRecords(array(
    'tableName'   => 'furn_portfolio',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $furn_portfolioRecord = @$furn_portfolioRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$furn_portfolioRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }
  
  // load viewer library
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('/home/seagateo/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($portfolio_contentRecords, $portfolio_contentMetaData) = getRecords(array(
    'tableName'   => 'portfolio_content',
  ));


?>

<!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=utf-8" />
<title><?php echo $furn_portfolioRecord['meta_title'] ?></title>
<meta name="description" content="<?php echo $furn_portfolioRecord['meta_desc'] ?>" />
<meta name="keywords" content="<?php echo $furn_portfolioRecord['meta_keywords'] ?>" />

<!-- SCRIPTS -->      
  <script type="text/javascript" src="js/swfobject.js"></script> 
<!-- LINKS -->  
  <link rel="stylesheet" href="css/layout.css" type="text/css" media="screen" />
  <link rel="stylesheet" href="css/redskin.css" type="text/css" media="screen" />
  
<style type="text/css">
<!--
#contents ul li {
	list-style-type: disc;
	list-style-position: inside;
	margin-bottom: 5px;
}
.profile {
	height: auto;
	width: 590px;
}
.client {
	padding-left: 20px;
}
.smaller {
	font-size: 85%;
}
.pict {
	width: 260px;
	height: 172px;
	padding-right: 0px;
	padding-bottom: 8px;
	padding-left: 20px;
}
-->
</style>

</head>

<body class="eci"> 
<div id="wrapper">
<div id="container">
  
  <div id="headerDate">
  <span class="date">
  	<script type="text/javascript" language="JavaScript">
		  <!--
		  function makeArray() {
		  for (i = 0; i<makeArray.arguments.length; i++)
		  this[i + 1] = makeArray.arguments[i];
		  }
		  var months = new makeArray('January','February','March',
		  'April','May','June','July','August','September',
		  'October','November','December');
		  var date = new Date();
		  var day  = date.getDate();
		  var month = date.getMonth() + 1;
		  var yy = date.getYear();
		  var year = (yy < 1000) ? yy + 1900 : yy;
		  document.write(months[month] + " " + day  + ", " + year);
		  //-->
		</script>
    </span>
  </div><!-- // END #headerDate DIV // -->
  <div id="headerNav">
       
  </div><!-- // END headerNav DIV // -->
  <div id="nav">
  </div><!-- // END #nav DIV // -->
  <div id="mainStage">
  	<?php include 'includes/navigation_inc.php'?>
  <div id="main">
    <div id="contents">
      <h1><?php echo $furn_portfolioRecord['title'] ?></h1>
      
      <div class="profile">
      <table>
        <?php foreach ($portfolio_contentRecords as $record): ?>
        <tr>
          <td class="pict"><?php foreach ($record['image'] as $upload): ?>
          <?php ($upload['hasThumbnail']) ?>
            <a href="<?php echo $upload['urlPath'] ?>" title="<?php echo $record['client'] ?> profile" target="_blank">
            <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /></a>
        <?php endforeach ?></td>
          <td class="client">
          
             
		     <a href="<?php echo $upload['urlPath'] ?>" title="<?php echo $record['client'] ?> profile" target="_self"><?php echo $record['client'] ?></a><br />
     		 <span class="smaller"><?php echo $record['location'] ?></span>
          </td>
        </tr>
        <?php endforeach ?>

    
      </table>
      </div>
    
      
    </div><!-- // END contents DIV // -->
    <div id="rightcolumn">
      <?php include 'includes/ecilogin_inc.php'?>
      <?php echo $furn_portfolioRecord['right_sidebar'] ?>
    </div><!-- // END rightcolumn // -->
  </div><!-- // END main DIV // -->

	
  </div><!-- // END #mainstage DIV // -->
  <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
  <?php include 'includes/footer_inc.php'?>
  
</div><!-- end #container -->
</div><!-- end #wrapper -->
</body>
</html>
