<?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/opsjobs/domains/opsjobs.com.au/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($google_analyticsRecords, $google_analyticsMetaData) = getRecords(array(
    'tableName'   => 'google_analytics',
  ));
  $google_analyticsRecord = @$google_analyticsRecords[0]; // get first record

  // load records
  list($forms_metaRecords, $forms_metaMetaData) = getRecords(array(
    'tableName'   => 'forms_meta',
  ));
  $forms_metaRecord = @$forms_metaRecords[0]; // get first record

  // load records
  list($sloganRecords, $sloganMetaData) = getRecords(array(
    'tableName'   => 'slogan',
  ));
  $sloganRecord = @$sloganRecords[0]; // get first record
  
  // load records
  list($post_your_resumeRecords, $post_your_resumeMetaData) = getRecords(array(
    'tableName'   => 'post_your_resume',
  ));
  $post_your_resumeRecord = @$post_your_resumeRecords[0]; // get first record

  // load records
  list($servicesRecords, $servicesMetaData) = getRecords(array(
    'tableName'   => 'services',
    'loadUploads' => '0',
    'allowSearch' => '0',
  ));
  
  // load records
  list($newsRecords, $newsMetaData) = getRecords(array(
    'tableName'   => 'news',
    'limit'       => '5',
    'loadUploads' => '0',
    'allowSearch' => '0',
  ));
  
  // load records
  list($contact_usRecords, $contact_usMetaData) = getRecords(array(
    'tableName'   => 'contact_us',
  ));
  $contact_usRecord = @$contact_usRecords[0]; // get first record    

  // load employer form records 
  list($employerFormsRecords, $employerFormsMetaData) = getRecords(array( 
    'tableName'   =>  'forms', 
    'allowSearch' =>  false, 
    'where'       =>  "section = 'employer'" 
  )); 
   
  // load employee form records 
  list($employeeFormsRecords, $employeeFormsMetaData) = getRecords(array( 
    'tableName'   =>  'forms', 
    'allowSearch' =>  false, 
    'where'       =>  "section = 'employee'" 
  )); 

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo $forms_metaRecord['page_title'] ?></title>
<meta name="keywords" content="<?php echo $forms_metaRecord['keywords'] ?>" />
<meta name="description" content="<?php echo $forms_metaRecord['description_tag'] ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
	<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
	<script src="js/cufon-yui.js" type="text/javascript"></script>
	<script src="js/cufon-replace.js" type="text/javascript"></script>
<script src="js/Myriad_Pro_400.font.js" type="text/javascript"></script>
<script src="js/Myriad_Pro_900.font.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.jqtransform.js" ></script>
<script type="text/javascript">
	$(function(){
		$('#search-form, #agent-search-form').jqTransform({imgPath:'jqtransformplugin/img/'});
	});
</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '<?php echo $google_analyticsRecord['content'] ?>']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>

<body id="page2">
<div id="header">
   <div class="main bg-top">
   		<div class="indent">
        	<ul class="ul">
                <li><a href="#"><img alt="" src="images/icon1.gif" /></a></li>
                <li><a href="#"><img alt="" src="images/icon2.gif" /></a></li>
                <li><a href="#"><img alt="" src="images/icon3.gif" /></a></li>
                <li><a href="#"><img alt="" src="images/icon4.gif" /></a></li>
            </ul>
        </div>
     <div class="menu">
        	<ul class="ul1">
                <li><a href="index.php">Home</a></li>
                <li><a href="about-us.php">About us</a></li>
                <li><a href="services.php">Services</a></li>
                <li><a href="current-job-vacancies.php">Job listing</a></li>
                <li><a href="contact-us.php">Contact us</a></li>
            </ul>
        </div>
        <a href="index.php"><img alt="" src="images/opslogo.png" class="logo" /></a><br />
   </div> 
</div>
<div id="content">
   <div class="main">
     <div class="indent-main">
         <div class="container">
                <div class="col-1">
                	<div class="indent4">
                    	<div class="banner2">
                        	<div class="indent-banner1">
                                <a href="post-resume.php" class="button2">Post a resume</a><a href="post-resume.php" class="button3">Upload a resume</a>
                        </div>
                        	<div class="indent-banner">
                            	<h1><?php echo $post_your_resumeRecord['title'] ?></h1>
                                <div class="postrestxt"><?php echo $post_your_resumeRecord['content'] ?></div>
                            </div>
                        </div>
                   	  <div class="indent">
                       	  <h2>OPS Jobs Forms Downloads</h2>
                            <div class="container">
                              <p><h2>Employer Forms</h2>
  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
    <?php foreach ($employerFormsRecords as $record): ?>
      <strong><?php echo $record['title'] ?></strong><br/>
      <?php echo $record['content'] ?><br/>
      <!-- STEP 2a: Display Uploads for field 'forms' (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 ($employerFormsRecord['forms'] 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'] ?>" target="_blank">Download <?php echo $upload['filename'] ?></a><br/><br />

          <?php endif ?>
        <?php endforeach ?>
      <!-- STEP2a: /Display Uploads -->


................................................................................................................................................................................................................................
    <?php endforeach ?>

    <?php if (!$employerFormsRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->
<h2>Employee Forms</h2>
  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
    <?php foreach ($employeeFormsRecords as $record): ?>
      <strong><?php echo $record['title'] ?></strong><br/>
      <?php echo $employeeFormsRecord['content'] ?><br/>
      <!-- STEP 2a: Display Uploads for field 'forms' (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['forms'] 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'] ?>" target="_blank">Download <?php echo $upload['filename'] ?></a><br/><br />

          <?php endif ?>
        <?php endforeach ?>
      <!-- STEP2a: /Display Uploads -->


................................................................................................................................................................................................................................
    <?php endforeach ?>

    <?php if (!$employeeFormsRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->

</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-2">
                	<div class="indent2">
                    	<div class="block">
                        	<div class="block-top">
                            	<div class="block-bot">
                                	<div class="indent-block">
                                    	<h2><?php echo $contact_usRecord['title'] ?>:</h2>
                                        <h3><?php echo $contact_usRecord['address'] ?>
                                        Phone: <?php echo $contact_usRecord['phone'] ?><br />
										Fax:&nbsp;&nbsp;&nbsp;   <?php echo $contact_usRecord['fax'] ?></h3>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="indent1">
                    	<div class="box1">
                            <div class="border-top">
                                <div class="border-bottom">
                                    <div class="border-right">
                                        <div class="border-left">
                                            <div class="corner-top-right">
                                                <div class="corner-top-left">
                                                    <div class="corner-bottom-left">
                                                        <div class="corner-bottom-right"> 
                                                            <div class="indent-box">
                                                                <h2>Industries Serviced</h2>
                                                                <ul><?php foreach ($servicesRecords as $record): ?>
                                                                      <li><a href="<?php echo $record['_link'] ?>"><strong><?php echo $record['title'] ?></strong></a></li>
                                                                      <?php endforeach ?>
   																	  <?php if (!$servicesRecords): ?>
     																    No records were found!<br/><br/>
																	  <?php endif ?>
                                                                </ul>
                                                                <h2>News</h2>
                                                                <ul><?php foreach ($newsRecords as $record): ?>
                                                                      <li><a href="<?php echo $record['_link'] ?>"><strong><?php echo $record['title'] ?></strong></a>&nbsp; <?php echo date("jS M", strtotime($record['date'])) ?></li>
																	  <?php endforeach ?>
                                                                      <?php if (!$newsRecords): ?>
                                                                        No records were found!<br/><br/>
                                                                      <?php endif ?>
                                                                </ul>

                                                            </div>                                     
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="container"><a href="#" class="link-1"><em><b>view more news</b></em></a></div>
                    
                </div>
       </div>
     </div>
  </div> 
</div>
<div id="footer">
   <div class="main">
   		<div class="indent-footer">
        	<?php include("includes/footer.inc.php"); ?>
        </div>
   </div> 
</div>
  

<script type="text/javascript"> Cufon.now(); </script>
</body>
</html>