<?php
/**
 * survey_result_view - DESCRIPTION
 *
 * @author $Author: dtong $
 * @version $Id: survey_result_view.php,v 1.1 2011/01/17 03:29:30 dtong Exp $
 * @copyright Copyright (c) 2010, Tiller Software Co., Ltd.
*/
?>
<div style="margin:10px">
<input type="button" value="<?php echo lang('survey_result_done_btn')?>" <?php osa_btn();?>
	onClick="ajaxGetpage('page_content', '<?php echo osa_url_history(CMS_URLHISTORY_SURVEYLIST)?>');return false;" />
<br /><br/>
<?php if ( isset($startdate) ) {
	if ( empty($courses) ) {
		$courses = '&nbsp;';
	}
	if ( empty($blocks) ) {
		$blocks = '&nbsp;';
	}
?>
	<table border='1' width='90%'>
	<tr>
		<td width='30%'><b><?php echo lang('survey_result_table_title')?></b></td>
		<td width='40%'><b><?php echo lang('survey_list_table_courses')?></b></td>
		<td width='10%'><b><?php echo lang('survey_list_table_blocks')?></b></td>
		<td width='10%'><b><?php echo lang('survey_list_table_startdate')?></b></td>
		<td width='10%'><b><?php echo lang('survey_list_table_enddate')?></b></td>
	</tr>
	<tr>
		<td><?php echo $title?></td>
		<td><?php echo $courses?></td>
		<td><?php echo $blocks?></td>
		<td><?php echo $startdate?></td>
		<td><?php echo $enddate?></td>
	</tr>
	</table>
	<br />
<?php } ?>
<?php
	if ( isset($ext_title) ) {
		echo "<b><font size='+1'>" . lang('survey_result_combined_results') . " ({$ext_title})</font></b><br /><br />";
	}
?>
<?php
foreach ( $questions as $index => $q ) {
	echo '<div style="margin-bottom:3px">' . "{$index}. {$q}" . '</div>';
	echo "<div id='surveychart_{$index}'></div>&nbsp;&nbsp;&nbsp;";
	echo "<div id='surveychart_{$index}t'></div><br /><br />";
	//break;
}
?>
<input type="button" value="<?php echo lang('survey_result_done_btn')?>" <?php osa_btn();?>
	onClick="ajaxGetpage('page_content', '<?php echo osa_url_history(CMS_URLHISTORY_SURVEYLIST)?>');return false;" />

</div>