<?php
/*
* @ServerMon v1.1
* @Developed by Maksa988
* @www.Server-Mon.ru
* @Copyright (C) 2014
*/
 if(!defined('SMON'))
	die('Hacking attempt!');
	
class licenses extends Controller {
	public function __construct() {
		$this->header();
		$this->data['activeSection'] = 'mylicenses';
		$this->data['navbarName'] = 'Мои сайты';
		
		if(empty($_SESSION['user_id'])):
			return $this->view(array('common/header', 'user/access', 'common/footer'), $this->data); //Загружаем шаблон
		endif;
		
		$this->model('licenses');
		
		$licenses = $this->licensesModel->getLicenses("WHERE `user_id` LIKE '{$_SESSION['user_id']}' ORDER BY `license_add_time` ASC");
		$this->data['id'] = '1';
		$this->data['licenses'] = $licenses;
		
		return $this->view(array('common/header', 'licenses/my', 'common/footer'), $this->data); //Загружаем шаблон
	}
}