<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block to the TOP of your page BEFORE anything else. */
  require_once "/home/fhlinux142/m/mercerdesign.biz/user/htdocs/cmsAdmin/lib/viewer_functions.php";

  list($teamRecords, $teamMetaData) = getRecords(array(
    'tableName'   => 'team',
  ));
  
  list($school_2Records, $selectedCategory) = getCategories(array(
    'tableName'           => 'school_2',
    'selectedCategoryNum' => '',         // defaults to getNumberFromEndOfUrl()
    'categoryFormat'      => 'showall',  // showall, onelevel, twolevel
  ));

?>
<!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>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
  #topMenu {
	height: 30px;
	width: 500px;
}
  #topMenu a {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11pt;
	color: #FFFFFF;
	text-decoration: none;
	display: inline;
}
  #topMenu a:active {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: #0099CC;
	text-decoration: none;
	display: inline;
}
h1 {
	font-size: 16pt;
	color: #99CC00;
	font-family: Arial, Helvetica, sans-serif;
}

  #topMenu li {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: #999999;
	text-decoration: none;
	display: inline;
	list-style-type: none;
}
  p {
}
#teamBox {
	width: 300px;
}
-->
</style>
<link href="../cmsb-test.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" table height="100%"cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="top"><table width="905" height="793" cellpadding="0" cellspacing="0">
      <tr>
        <td height="296" valign="bottom" bgcolor="#006699">
        
        <table width="905" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="../images/banner2.jpg" width="905" height="296" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="30" bgcolor="#999933"><table width="905" height="72" cellpadding="0"cellspacing="0" table>
          <tr>
            <td height="70">
       <div id="topMenu">  
<ul>  
<li>  
<?php foreach ($school_2Records as $school_2Record): ?>  
<?php echo $school_2Record['_listItemStart'] ?>  
 
<?php //Ross Code Starts Here ?> 
<?php if ($school_2Record['url']): ?> 
	<a href="<?php echo $school_2Record['url'] ?>"> 
<?php else: ?> 
	<a href="<?php echo $school_2Record['url'] ?>"> 
<?php endif ?> 
<?php //Ross Code Ends Here ?> 
 
| <?php echo $school_2Record['name'] ?></a>  
 
<?php echo $school_2Record['_listItemEnd'] ?>  
<?php endforeach; ?>  
</a>  
<![endif]-->  
</ul>  
</li>  
</div>        </td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td height="18" class="topbuttonsSub" id="subMenu"></td>
        </tr>
      <tr>
      
        <td height="400" valign="top">
     
          
          <h1>Team - List Page Viewer</h1>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr><?php foreach ($teamRecords as $record): ?>
              <td width="230" valign="top">      <!-- STEP 2a: Display Uploads for field 'photo' (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['photo'] 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'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
                <?PHP endif ?>
              <?PHP endforeach ?><!-- STEP2a: /Display Uploads --></td>
          <td width="396" valign="top" class="bodytext" id="teamBox"><strong><?php echo $record['name'] ?></strong><br/>            
            <?php echo $record['title'] ?><br/>            <?php echo $record['email'] ?><br/>            <?php echo $record['biography'] ?><br/>
  <a href="<?php echo $record['_link'] ?>"> see more &gt;</a> </td>
  
			  <?php $maxCols=3; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?> 
          					  <?php endforeach ?>
          					  </tr>
          </table>
          <br/>

          <p><br />
            <br />
          </p></td>
        </tr>
      <tr>
        <td height="40">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>

</body>
</html>
