<?php
class Pagesimple extends Controller
{
	function Pagesimple()
	{
		parent::Controller();
	}
	
	function index()
	{
		redirect('');
	}
	
	function kapcsolat()
	{
		redirect('page/show/27');
	}
	
	function show()
	{
		$notitle = $this->uri->segment(4);
		if($notitle)
		{
			$data['notitle']=true;
		}
		else
		{
			$data['notitle']=false;
		}
		
		$page_id = $this->uri->rsegment(3);
		if(!$page_id || !is_numeric($page_id))
		{
			redirect('page');
		}
		else
		{
			$page=$this->mpages->get_row($page_id);
			if(!$page)
			{
				show_404();
			}
			else
			{
				$data['tartalom']='page/show';
				$data['csik']=array('home', $page->page_title);
				
				switch($this->uri->segment(3))
				{
					case 278:
					    $data['javascript'] = array('intkit/JavaScriptFlashGateway');
					    break;

                    case 279:
					    $data['javascript'] = array('intkit/JavaScriptFlashGateway');
					    break;
                        
                    case 437:
					    $data['javascript'] = array('intkit/JavaScriptFlashGateway');
					    break;
                        
                    case 436:
                        $data['javascript'] = array('intkit/JavaScriptFlashGateway');
					    break;
					case 556:
                        $data['javascript'] = array('fancybox/jquery-1.3.2.min','fancybox/jquery.easing.1.3','fancybox/jquery.fancybox-1.2.1.pack','fancybox/fancy');
                        $data['style'] = array('fancybox2');
					    break;
					case 590:
						redirect('webrender');
					    break;
				}
                
                $data['page']=$page;

				$data['meta']['keyw'] = !hun() ? 'ARCHLine.XP, ARCHLine.XP 2009, Interior, Design, CAD, Architect, Architectural' : 'ARCHLine.XP, ARCHLine.XP 2009, Interior, Terv, Tervezés, CAD, Építész, Építészet, Belsőépítész';
				$data['meta']['keyw'] .= ', '.$page->page_title;
				$data['title']='ARCHline.XP ' . $page->page_title;
				
				$this->load->view('site_simple',$data);
			}
		}
	}
}
?>