<?php
/**
 * menuhelp_view - Help menu panel. Not a typical view and a lot of code
 *
 * @author $Author: dtong $
 * @version $Id: menuhelp_view.php,v 1.8 2011/03/30 04:33:01 dtong Exp $
 * @copyright Copyright (c) 2009, Tiller Software Co., Ltd.
*/
$link = '';
$description = FALSE;
$massage_help = '';
foreach ($config as $item) {
	$type = $item['type'];
	switch ($type) {
		case 'descrip':
			if (isset($item['text']))
				$massage_help = $item['text'];
			$description = TRUE;
			break;
		case 'title':
			echo "<div class=\"help_title\">{$item['text']}</div>";
			break;
		case 'link':
			$help_path = base_url() . $this->config->item('cms_help_path') . $this->config->item('cms_help_config') .  '/';
			$divid = 'help_content';
			$url   = base_url() . 'menu/help/pdf/';
			$pdf   = str_replace($help_path,'',$item['link']);
			$onClick = "onClick=\"LoadPdfPage('$url', '$pdf', '$divid'); return false;\"";
			echo "<div class=\"help_a\"><a href=\"$url\" class=\"helplink\" $onClick >{$item['text']}</a></div>";
			break;
	}
}
if ( $this->config->item('cms_incompletehelp_msg') ) {
	if ($description == FALSE)
		$massage_help = lang('gen_more_help_soon');
		echo '<div style="margin-top:25px;text-align:center">' . $massage_help . "</div>";
}
?>