<?php
class ControllerAccountSelect extends Controller {
	private $error = array();

	public function index() {
		if ($this->customer->isLogged()) {
      		$this->redirect($this->url->link('account/account', '', 'SSL'));
    	}

    	$this->language->load('account/select');

    	$this->document->setTitle($this->language->get('heading_title'));

      	$this->data['breadcrumbs'] = array();

      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
        	'separator' => false
      	);

      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_account'),
			'href'      => $this->url->link('account/account', '', 'SSL'),
        	'separator' => $this->language->get('text_separator')
      	);

      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_select'),
			'href'      => $this->url->link('account/login', '', 'SSL'),
        	'separator' => $this->language->get('text_separator')
      	);

      	$this->data['heading_title'] = $this->language->get('heading_title');

		$this->data['button_login'] = $this->language->get('button_login');
		$this->data['button_register'] = $this->language->get('button_register');

		$this->data['login'] = $this->url->link('account/login', '', 'SSL');
		$this->data['register'] = $this->url->link('account/register', '', 'SSL');

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/select.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/account/select.tpl';
		} else {
			$this->template = 'default/template/account/select.tpl';
		}

		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);

		$this->response->setOutput($this->render());
  	}
}
?>