<?php
include("inserts/_insertSiteWideNutsCode.php");
?>   
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/var/www/forrest.id.au/public_html/nutsDemo/lib/viewer_functions.php";

	list($l_client_areaRecords, $l_client_areaMetaData) = getRecords(array(  
	  'tableName' => 'l_client_area',  
	  'where'        => mysql_escapef(" client_list = ? ", $CURRENT_USER['num'] ),  
	));

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>

<!-- Page Meta Data -->
    <title>Nuts'n'Bolts | Latest News</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <meta name="keywords" content=""> <!--Insert Section Code -->
    <meta name="description" content=""> <!--Insert Section Code -->

    <meta name="robots" CONTENT="NOINDEX, NOFOLLOW"> <!--INDEX / NOINDEX  |  FOLLOW / NOFOLLOW -->
    

<!-- CSS Links -->
    <?php
    include("inserts/_insertSiteWideCss.php");
    ?>   

<!-- Java Links etc -->
    <?php
    include("inserts/_insertSiteWideCode.php");
    ?>   

</head>

<body>
    <?php
    include("inserts/_insertOldBrowserAlert.php");
    ?>   
    <?php
    include("inserts/_insertLoginSlider.php");
    ?>   

<div id="pagewidth" >

    <?php
    include("inserts/_insertHeader.php");
    ?>   

    <?php
    include("inserts/_insertNavigation.php");
    ?>   

    <div id="wrapper" class="clearfix" > 
        <div id="maincol" >
        <div id="breadbcrumb"></div>
        <h1>Welcome, <?php echo $CURRENT_USER['fullname'] ?>!</h1>
        
        <!-- This is their Group Membership details -->
        <h3>Group Membership</h3>
        <?php if ($CURRENT_USER['membership'] == "Group 1"): ?>You are a member of Group 1
        <?php endif ?>

        <?php if ($CURRENT_USER['membership'] == "Group 2"): ?>You are a member of Group 2
        <?php endif ?>

        <?php if (!$CURRENT_USER['membership']): ?>
        You are not currently a member of any groups.
        <?php endif ?>
        
        <br /><br />

        <!-- This is their Andividual Membership details -->
            <h3>Individual Content</h3>
            <?php foreach ($l_client_areaRecords as $record): ?>
              Client List (client_list): <?php echo join(', ', getListLabels('l_client_area', 'client_list', $record['client_list'])); ?><br/>
              Current User (current_user_num). <?php echo $CURRENT_USER['num'] ?><br />
              Content: <?php echo $record['content'] ?><br/>
              <hr/>
            <?php endforeach ?>
        
            <?php if (!$l_client_areaRecords): ?>
              There is no content available specifically for you!<br/><br/>
            <?php endif ?>
          
        </div>
        <div id="leftcol" >
		  <?php if (!@$errorsAndAlerts) { $errorsAndAlerts = alert(); } ?>
		  <?php if (@$errorsAndAlerts): ?>
            <div id="alertBox">
              <?php echo $errorsAndAlerts; ?>
            </div>
          <?php endif ?>
       </div>
    </div>

	<?php
    include("inserts/_insertFooter.php");
    ?>    

</div>
    <?php
    include("inserts/_insertGoogleCode.php");
    ?>   
</body>

</html>