{include file="layouts/forceLoggedIn.tpl"}
{include_php file="shared_handle:company/consumerSurveyList"}

{assign var="pgLayout" value="layouts/withLeftNav.tpl"}
<h1>Healthy For Life</h1>

<table width="100%"><tr><td valign="top">
	<img class="iconClipboard" src="blank.gif" width="1" height="1" alt="" />
</td><td valign="top" width="100%">
	Welcome to Healthy For Life 2006. Participants in this program are awarded points for completing additional activities. Take this short assessment each month and the points you have earned will be tracked throughout the year. This will also serve as a reminder of activities that need to be completed. Remember- proper documentation, including the wellness coordinator’s initials, will still be required.  	
</td></tr>
</table>

<blockquote>
<table width="100%"><tr>
<td valign="top" width="100%">
	<h3>Available Surveys:</h3>
	<table>
	{foreach from=$surveys item=item name="loopSurveys"}<tr><td nowrap>
	<tr><td valign="top" nowrap="nowrap">
		{if $item.dateAvailable gt 0}
			<img class="ico{$item.id}" src="blank.gif" width="1" height="1" alt="" /></td>
		   <td valign="top"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq "Once"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:"g:i A"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:"m/d/y"}{/if}<br />
			{$item.feedbackTitle|default:"No feedback available."}<br />
			<a href="?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}">Click here to learn more<b><i>!</i></b></a><br />
			<br /></td>
		   <td valign="middle" align="right"><em>{$item.pointsEarned}</em></td></tr>
		{else}
			<a href="javascript://" onclick="openSurvey({$item.id});"><img class="ico{$item.id}" src="blank.gif" width="1" height="1" alt="" /></a></td>
		   <td valign="top" nowrap="nowrap"><b><u>{$item.surveyName}</u>:</b> <a href="javascript://" onclick="openSurvey({$item.id});">Available Now</a><br />
			{$item.feedbackTitle|default:"No feedback available."}<br />
			<a href="?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}">Click here to learn more<b><i>!</i></b></a><br />
			<br /></td>
		   <td valign="middle" align="right"><em>{$item.pointsEarned}</em></td></tr>
		{/if}
	{foreachelse}
	<tr><td valign="top" colspan="3">
		None found.</td></tr>
	{/foreach}
	</table>
</td>
</tr>
</table>
</blockquote>