shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

footer.php (2382B)


      1 <?php
      2 class ControllerCommonFooter extends Controller {
      3 	public function index() {
      4 		$this->load->language('common/footer');
      5 
      6 		$this->load->model('catalog/information');
      7 
      8 		$data['informations'] = array();
      9 
     10 		foreach ($this->model_catalog_information->getInformations() as $result) {
     11 			if ($result['bottom']) {
     12 				$data['informations'][] = array(
     13 					'title' => $result['title'],
     14 					'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
     15 				);
     16 			}
     17 		}
     18 
     19 		$data['contact'] = $this->url->link('information/contact');
     20 		$data['return'] = $this->url->link('account/return/add', '', true);
     21 		$data['sitemap'] = $this->url->link('information/sitemap');
     22 		$data['tracking'] = $this->url->link('information/tracking');
     23 		$data['manufacturer'] = $this->url->link('product/manufacturer');
     24 		$data['voucher'] = $this->url->link('account/voucher', '', true);
     25 		$data['affiliate'] = $this->url->link('affiliate/login', '', true);
     26 		$data['special'] = $this->url->link('product/special');
     27 		$data['account'] = $this->url->link('account/account', '', true);
     28 		$data['order'] = $this->url->link('account/order', '', true);
     29 		$data['wishlist'] = $this->url->link('account/wishlist', '', true);
     30 		$data['newsletter'] = $this->url->link('account/newsletter', '', true);
     31 
     32 		$data['powered'] = sprintf($this->language->get('text_powered'), $this->config->get('config_name'), date('Y', time()));
     33 
     34 		// Whos Online
     35 		if ($this->config->get('config_customer_online')) {
     36 			$this->load->model('tool/online');
     37 
     38 			if (isset($this->request->server['REMOTE_ADDR'])) {
     39 				$ip = $this->request->server['REMOTE_ADDR'];
     40 			} else {
     41 				$ip = '';
     42 			}
     43 
     44 			if (isset($this->request->server['HTTP_HOST']) && isset($this->request->server['REQUEST_URI'])) {
     45 				$url = ($this->request->server['HTTPS'] ? 'https://' : 'http://') . $this->request->server['HTTP_HOST'] . $this->request->server['REQUEST_URI'];
     46 			} else {
     47 				$url = '';
     48 			}
     49 
     50 			if (isset($this->request->server['HTTP_REFERER'])) {
     51 				$referer = $this->request->server['HTTP_REFERER'];
     52 			} else {
     53 				$referer = '';
     54 			}
     55 
     56 			$this->model_tool_online->addOnline($ip, $this->customer->getId(), $url, $referer);
     57 		}
     58 
     59 		$data['scripts'] = $this->document->getScripts('footer');
     60 		
     61 		return $this->load->view('common/footer', $data);
     62 	}
     63 }