<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('/var/www/sctf/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."); }

  list($exec_commRecords, $exec_commMetaData, $selectedCategory) = getRecords(array(
    'tableName'   => 'exec_comm', 
  )); 
  list($ag_scRecords, $ag_scMetaData, $selectedCategory) = getRecords(array(
    'tableName'   => 'ag_sc',
  ));
  list($bii_scRecords, $bii_scMetaData) = getRecords(array(
    'tableName'   => 'bii_sc',
  ));
  list($com_it_scRecords, $com_it_scMetaData) = getRecords(array(
    'tableName'   => 'com_it_sc',
  ));
  list($cj_scRecords, $cj_scMetaData) = getRecords(array(
    'tableName'   => 'cj_sc',
  ));
  list($logs_eqpRecords, $logs_eqpMetaData) = getRecords(array(
    'tableName'   => 'logs_eqp',
  ));
  list($frhm_scRecords, $frhm_scMetaData) = getRecords(array(
    'tableName'   => 'frhm_sc',
  ));
  list($hlth_medRecords, $hlth_medMetaData) = getRecords(array(
    'tableName'   => 'hlth_med',
  ));
  list($imtRecords, $imtMetaData) = getRecords(array(
    'tableName'   => 'imt',
  ));
  list($linksRecords, $linksMetaData) = getRecords(array(
    'tableName'   => 'links',
  ));
  list($pioRecords, $pioMetaData) = getRecords(array(
    'tableName'   => 'pio',
  ));
  list($tng_scRecords, $tng_scMetaData) = getRecords(array(
    'tableName'   => 'tng_sc',
  ));
  list($pol_procdRecords, $pol_procdMetaData) = getRecords(array(
    'tableName'   => 'pol_procd',
  ));
  
  // load records for the page called.
  list($myRecords, $myMetaData) = getRecords(array( 
    'tableName'   => $_REQUEST['section'], 
    'where'       => mysql_escapef('num = ?', $_REQUEST['num']), 
    'limit'       => '1', 
  )); 
  $myRecord = @$myRecords[0]; // get first record

?>

<html>
<head>
<title>South Central PA Counter Terrorism Task Force</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="/css/styles.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/css/ddsmoothmenu.css" />
<link rel="stylesheet" type="text/css" href="/css/ddsmoothmenu-v.css" />
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/ddsmoothmenu.js">

/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "smoothmenu2", //Menu DIV id
	orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
	//customtheme: ["#804000", "#482400"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>

</head>

<body>

<table width=978 cellpadding=0 cellspacing=0 border=0 align=center>
<tr><td valign=top class=tablebg>

<table width=978 cellpadding=0 cellspacing=0 border=0 align=center>
<tr>
<td colspan=4 valign=bottom class=header>
<span class=welcome>Welcome Back</span> <i>Username</i> :: <a href="">LOG OFF</a>
</td>
</tr>
<tr>
<td width=36 valign=top><img src="/images/side-left.gif"></td>
<td width=253 valign=top>
<!--Sideframe begins here-->

<div class=navpadding-inside>
<div id="smoothmenu2" class="ddsmoothmenu-v">
		<?php 
		  $categoryTablenames = array('exec_comm', 'ag_sc', 'bii_sc', 'com_it_sc', 'cj_sc', 'logs_eqp', 'frhm_sc', 'hlth_med', 'imt', 'links', 'pio', 'tng_sc', 'pol_procd');
		 
		  $categoryRecordSets = array(); 
		 
		  foreach ($categoryTablenames as $tablename) { 
			list($categoryRecords,) = getCategories(array( 
			  'tableName'   => $tablename, 
			)); 
			$categoryRecordSets[$tablename] = $categoryRecords; 
		  } 
		?> 
		 <ul id="theMenu">
		 <li><a href="index.php">Home</a></li>
		  <?php foreach($categoryRecordSets as $tablename => $categoryRecords): ?> 
			  <?php foreach ($categoryRecords as $record): ?>
				<?php echo $record['_listItemStart'] ?>
					<a href="contentDetail.php?section=<?php echo $tablename ?>&num=<?php echo $record['num'] ?>"><?php echo htmlspecialchars($record['name']) ?></a>
				<?php echo $record['_listItemEnd'] ?>
			 <?php endforeach ?> 
		  <?php endforeach ?> 
		</ul>
		<br style="clear: left" />
</div>

</div>
<!--<div class=navbutton><div class=navpadding><a href="">Home</a></div></div>
<div class=navbutton><div class=navpadding><a href="">Links</a></div></div>
<div class=navbutton><div class=navpadding><a href="">Press Releases</a></div></div>

<img src="/images/navbottom.gif" width=253 height=218>-->

<!--Sideframe ends here-->
</td>
<td width=653 valign="top">

<div class=content>
<!--Content begins here-->

<h1><?php echo $myRecord['name'] ?></h1>
<h2><?php echo $myRecord['leadership'] ?></h2>
<?php echo $myRecord['content'] ?>
<hr />
<h2>Related Documents</h2>
        <?php foreach ($myRecord['other_docs'] as $upload): ?>
			<a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>
        <?php endforeach ?>
<br /><br />
<h2>Meeting Minutes</h2>		
		  <?php foreach ($myRecord['meeting_minutes'] 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'] ?>"><?php echo $upload['info1'] ?></a><br/>

          <?php endif ?>
        <?php endforeach ?>


<!--<h2>OUR VISION</h2>
<p>The SCTF will be the premier and enduring, "all-hazards" emergency preparedness task force that collaborates and coordinates both public and private sector resources for Regional solutions that provide support to communities when events exceed their capabilities.</p>

<h2>OUR MISSION</h2>
<p>The SCTF will assume a leadership role in delivering a comprehensive and sustainable regional "all-hazards" emergency preparedness program that addresses planning, prevention, response and recovery for events in South Central PA that exceed local capabilities.</p>-->

<!--Content ends here-->
</div>
</td>
<td width=36 valign="top" align="right"><img src="/images/side-right.gif"></td>
</tr>
</table>
</td>
</tr>

<tr>
<td align=center class=copyright>
<img src="/images/tablebottom.gif" width=978 height=88><br>
&copy; <?= date("Y") ?>, South Central Task Force.  All Rights Reserved.

</td>
</tr>
</table>

</body>
</html>