Your IP : 172.28.240.42


Current Path : /var/www/html/clients/nsmk.e-nk.ru/application/controllers/
Upload File :
Current File : /var/www/html/clients/nsmk.e-nk.ru/application/controllers/p.php-distr

<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); 

/**
 * MaxSite CMS
 * (c) http://max-3000.com/
 */
 
	# http://max-3000.com/?p=77 - ищем page_id = 77
	
	if (isset($_SERVER['QUERY_STRING']) and $_SERVER['QUERY_STRING'])
	{
		parse_str($_SERVER['QUERY_STRING'] , $in);
		if (isset($in['p']) and abs((int) $in['p']))
		{
			$page_id = abs((int) $in['p']);

			$this->db->select('page_slug');
			$this->db->where('page_id', $page_id);
			$this->db->limit('1');
			
			$query = $this->db->get('page');
			if ($query->num_rows() > 0) // есть страница
			{
				$result = $query->result_array();
				$out = array(1=>'page', 2=>$result[0]['page_slug']);
				$this->data_def['uri_segment'] = $out;
				$this->_view_i('page');
			}
			else $this->_view_i('page_404');
		}
		else $this->_view_i('page_404');
	}
	else $this->_view_i('page_404');
		
?>