<?php
class ControllerExtensionModuleAccount extends Controller {
	public function index() {
		$this->load->language('extension/module/account');

		$data['logged'] = $this->customer->isLogged();
		$data['register'] = $this->url->link('account/register', '', true);
		$data['login'] = $this->url->link('account/login', '', true);
		$data['logout'] = $this->url->link('account/logout', '', true);
		$data['forgotten'] = $this->url->link('account/forgotten', '', true);
		$data['account'] = $this->url->link('account/account', '', true);
		$data['edit'] = $this->url->link('account/edit', '', true);
		$data['password'] = $this->url->link('account/password', '', true);
		$data['address'] = $this->url->link('account/address', '', true);
		$data['wishlist'] = $this->url->link('account/wishlist');
		$data['order'] = $this->url->link('account/order', '', true);
		$data['download'] = $this->url->link('account/download', '', true);
		$data['reward'] = $this->url->link('account/reward', '', true);
		$data['return'] = $this->url->link('account/return', '', true);
		$data['transaction'] = $this->url->link('account/transaction', '', true);

        if($this->config->get("offerpage_installed")) {
          $this->load->language('extension/module/salescombopge');
          $data['salescombopge_info'] = array();
          $this->load->model('extension/module/salescombopge');
          $salescombopge_info = $this->model_extension_module_salescombopge->getPages();
          foreach ($salescombopge_info as $key => $value) {
            if($value['top']) {
              $data['salescombopge_info'][] = array(
                'name'=> $value['title'],
                'href' => $this->url->link('extension/module/salescombopge', 'page_id=' .  $value['salescombopge_id'])
              );
            }  
          }
        }  
        
		$data['newsletter'] = $this->url->link('account/newsletter', '', true);
		$data['recurring'] = $this->url->link('account/recurring', '', true);

		return $this->load->view('extension/module/account', $data);
	}
}