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

{assign var="pgLayout" value="layouts/withLeftNav.tpl"}
<h1>Consumer Tools</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 "Consumer Skills."  From this page you can receive points for being an economic health care consumer.  Click on the survey below or post a message in one of the consumer skills discussion boards to receive points.  Check back every chance you get so you can learn more about Consumer Directed health skills and receive points for your Consumer Skills!	
</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>
<td valign="top" nowrap="nowrap">
	<h3>Company Forums:</h3>
	<ul>
	{foreach from=$companyForums item="cForum"}
	<li><a href="?pg=company_forum&fId={$cForum.id}">{$cForum.name}</a></li>
	{/foreach}
	</ul>
</td>
</tr>
</table>
</blockquote>
