<?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/fhlinux142/m/mercerdesign.biz/user/htdocs/','','../','../../','../../../');
  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($work_listRecords, $work_listMetaData) = getRecords(array(
    'tableName'   => 'work_list',
  ));

?>
<!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">
<title>Mercer work list</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<style type="text/css">
body {
	background-color: #412c36;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.bodytext {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9pt;
	line-height: 11pt;
	color: #333;
	text-decoration: none;
	padding-top: 20px;
	padding-right: 20px;
	padding-left: 20px;
}
.link {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9pt;
	line-height: 11pt;
	color: #333;
	text-decoration: none;
	font-weight: bold;
}
.bodyline {
	text-decoration: none;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #412C36;
	margin: 0px;
	padding: 0px;
}
.headinggreen {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15pt;
	line-height: 15pt;
	color: #78953c;
	text-decoration: none;
	font-weight: bold;
}
.subheadinggreen {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12pt;
	line-height: 15pt;
	color: #78953c;
	text-decoration: none;
	font-weight: bold;
}
.update {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9pt;
	line-height: 15pt;
	color: #FFF;
	text-decoration: none;
}
#update_link {
	float: right;
	width: 500px;
	margin-top: 15px;
	margin-bottom: 15px;
	text-align: right;
	height: 30px;
	position: relative;
}
#logo {
	float: left;
	width: 200px;
	margin-top: 15px;
	margin-bottom: 15px;
	height: 30px;
}
a:link {
	color: #412c36;
}a:visited {
	color: #412c36;
}a:hover {
	color: #78953c;
}a:active {
	color: #412c36;
}
#content {
	width: 800px;
	margin-right: auto;
	margin-left: auto;
}
#left_column {
	float: left;
	width: 510px;
	margin-right: 20px;
	position: relative;
	margin-bottom: 20px;
	background-color: #FFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9pt;
	line-height: 11pt;
	color: #333;
	text-decoration: none;
	padding: 20px;
}
#right_column {
	float: right;
	width: 190px;
	position: relative;
	margin-bottom: 20px;
	background-color: #FFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9pt;
	line-height: 11pt;
	color: #333;
	text-decoration: none;
	padding: 20px;
}
#update_link_bottom {
	float: right;
	width: 800px;
	margin-bottom: 15px;
	text-align: right;
	height: 30px;
	position: relative;
}
#spacer {
	clear: both;
	height: 5px;
	position: relative;
	top: 5px;
	margin-bottom: 2px;
}
</style>
</head>

<body>
<div id="content">
<div id="logo"><img src="Images/mercerlogo.jpg" width="149" height="28" border="0" /></div>
   <div id="update_link"> <span class="update"><a href="http://www.mercerdesign.biz/cmsAdmin/admin.php" target="_new" class="update">Update this page</a></span></div><br />
  <div id="left_column"><!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
    <span class="headinggreen"> Work list</span><br /><br />
<?php foreach ($work_listRecords as $record): ?>
<span class="subheadinggreen"><br />
<?php echo $record['title'] ?></span><br/>
<?php echo $record['work_list'] ?><br/><br />


      <!-- STEP 2a: Display Uploads for field 'uploads' (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 -->
       <strong>File upload:</strong><br />
       <?php foreach ($record['uploads'] 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 else: ?>
<a href="<?php echo $upload['urlPath'] ?>"><img src="Images/adobe_pdf_icon.jpg" width="30" height="19" border="0" /><?php echo $upload['filename'] ?></a><br/>

          <?php endif ?>
        <?php endforeach ?><br /><br />
      <!-- STEP2a: /Display Uploads -->
<hr />

    <?php endforeach ?>

   </div>
  <div id="right_column">     
  <strong>Incoming Jobs:</strong> <br />
<?php echo $record['incoming_jobs'] ?><br/>
<hr />
<br />
      <strong>At Printer:</strong><br />
 <?php echo $record['at_printer'] ?><br/>
 <hr />
<br />
      <strong>Lost Contact:</strong><br />
<?php echo $record['lost_contact'] ?><br/>
<hr />
<br />
      <strong>Ideas:</strong> <br />
<?php echo $record['ideas'] ?><br/><br />
</div>

 <?php if (!$work_listRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->
  <div id="update_link_bottom"> <span class="update"><a href="http://www.mercerdesign.biz/cmsAdmin/admin.php" target="_new" class="update">Update this page</a></span></div>
  <div id="spacer"></div>
</div>
</body>
</html>
