<?php  
class ControllerModuleCreativecp extends Controller {
	protected function index($setting) {
		
		//echo '<pre>'; print_r($setting); echo '</pre>';
		
		$this->data['abouttext'] = $setting['abouttext'];
		$this->data['cphone'] = $setting['cphone'];
		$this->data['cmobile'] = $setting['cmobile'];
		$this->data['cemail'] = $setting['cemail'];
		$this->data['twitterid'] = $setting['twitterid'];
		$this->data['fbid'] = $setting['fbid'];
		$this->data['fburl'] = $setting['fburl'];
		$this->data['twurl'] = $setting['twurl'];
		$this->data['goourl'] = $setting['goourl'];
		$this->data['ctitle'] = $setting['ctitle'];
		$this->data['abouttitle'] = $setting['abouttitle'];
		$this->data['appid'] = $setting['appid'];
		
		## theme settings
		$this->data['topbarbg'] = $setting['topbarbg'];
		$this->data['topbarlink'] = $setting['topbarlink'];
		$this->data['categorymenulink'] = $setting['categorymenulink'];
		$this->data['categorymenuddbg'] = $setting['categorymenuddbg'];
		$this->data['categorymenufontsize'] = $setting['categorymenufontsize'];
		$this->data['categorymenuddlink'] = $setting['categorymenuddlink'];
		$this->data['productlink'] = $setting['productlink'];
		$this->data['buttonbg'] = $setting['buttonbg'];
		$this->data['buttonlink'] = $setting['buttonlink'];
		$this->data['buttonbgfe'] = $setting['buttonbgfe'];
		$this->data['buttonlinkfe'] = $setting['buttonlinkfe'];
		$this->data['bodybg'] = $setting['bodybg'];
		$this->data['bodytexture'] = '';
		if(isset($setting['bodytexture'])){
			$this->data['bodytexture'] = $setting['bodytexture'];
		}
		$this->data['bodytext'] = $setting['bodytext'];
		$this->data['bodyfont'] = $setting['bodyfont'];
		$this->data['headingfont'] = $setting['headingfont'];
		$this->data['headingfonttext'] = $setting['headingfonttext'];
		$this->data['footerheading'] = $setting['footerheading'];
		$this->data['footerlinks'] = $setting['footerlinks'];
		$this->data['footerbg'] = $setting['footerbg'];
		$this->data['footerbarbg'] = $setting['footerbarbg'];
		$this->data['footerbarlink'] = $setting['footerbarlink'];
		
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/creativecp.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/creativecp.tpl';
		} else {
			$this->template = 'default/template/module/creativecp.tpl';
		}
		
		$this->render();
	}
}
?>