<?php
class ControllerextensionModuledantuwenpic extends Controller {
	public function index($setting) {
		$data['name'] = $setting['name'];
		$data['describecolor'] = $setting['describecolor'];
		$data['titlecss'] = $setting['titlecss'];
		$data['danopacity'] = $setting['danopacity'];
		$data['danrounded'] = $setting['danrounded'];
		$data['dpwidth'] = $setting['dpwidth'];
		$data['wgdlg1'] = $setting['wgdlg1'];
		$data['wgdlg2'] = $setting['wgdlg2'];
		$data['icons1'] = $setting['icons1'];
		$data['icons2'] = $setting['icons2'];
		$data['dpposition'] = $setting['dpposition'];
		$data['pdtop'] = $setting['pdtop'];
		$data['pdbottom'] = $setting['pdbottom'];
		$data['buttoncolor1'] = $setting['buttoncolor1'];
		$data['buttoncolor2'] = $setting['buttoncolor2'];
		$data['buttonsize'] = $setting['buttonsize'];
		$data['buttoninset'] = $setting['buttoninset'];	       
        $data['buttonborder'] = $setting['buttonborder'];
        $data['buttonround'] = $setting['buttonround'];	
        $data['buttonhover'] = $setting['buttonhover'];
        $data['buttond'] = $setting['buttond'];	
		$data['wenziposition'] = $setting['wenziposition'];	
		$data['buttonposition'] = $setting['buttonposition'];	
		static $module = 0;

		$this->load->model('tool/image');

		if (is_file(DIR_IMAGE . $setting['image'])) {
			$image = $setting['image'];
		} else {
			$image = 'placeholder.png';
		}

		$data['image'] = $this->model_tool_image->resize($image, $setting['width'], $setting['height']);

		$data['title'] = $setting['title'];
		$data['section1'] = $setting['section1'];
		$data['section2'] = $setting['section2'];
		$data['section3'] = $setting['section3'];
		$data['buttonname1'] = $setting['buttonname1'];
		$data['buttonname2'] = $setting['buttonname2'];
		$data['link1'] = $setting['link1'];
		$data['link2'] = $setting['link2'];

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . 'extension/module/dantuwenpic.tpl')) {
			return $this->load->view($this->config->get('config_template') . 'extension/module/dantuwenpic.tpl', $data);
		} else {
			return $this->load->view('extension/module/dantuwenpic.tpl', $data);
		}
	}
}