<?php
class Products extends Controller
{
	function Products()
	{
		parent::Controller();
	}
	
	function index()
	{
		$data['title'] = hun() ? 'ARCHLine.XP Építészeti tervezőprogram' : 'ARCHLine.XP Architect software';
		$data['tartalom']='products/index';
		$data['csik']=array('home','products');
		$data['mobilink'] = "/mobile/architect";
		
		if(hun())
		{
			$this->uj();
			return;
			
			$data['cimlap']=$this->mpages->get_row(7);
			$data['javascript'] = array('comparison');
		}
		elseif(eng())
		{
			$data['cimlap']=$this->mpages->get_row(68);
	//		$data['javascript'] = array('comparison');
			$data['javascript'] = array('jquery.corner');
			$data['tartalom'] = 'products/buy2';
		}
		elseif(be())
		{
			$data['cimlap']=$this->mpages->get_row(310);
		}
		elseif(cr())
		{
			$data['cimlap']=$this->mpages->get_row(217);
		}
		elseif(gr())
		{
			$data['cimlap']=$this->mpages->get_row(172);
		}
		elseif(jap())
		{
			$data['cimlap']=$this->mpages->get_row(116);
		}
		
		$this->load->view('site',$data);
	}
	
	function uj(){
		$data['title'] = hun() ? 'ARCHLine.XP Építészeti tervezőprogram' : 'ARCHLine.XP Architect software';
		$data['tartalom']='interior/buy2';
		$data['javascript'] = array('jquery.corner');
		$data['csik']=array('home','products');
		$data['mobilink'] = "/mobile/architect";
		$data['cimlap']=$this->mpages->get_row(762);
		$this->load->view('site',$data);
	}
	
	function modules()
	{
        $data['tartalom']='products/modules';
		$data['csik']=array('home','products', 'modules');
		
		$id = $this->uri->rsegment(3); //$this->uri->segment(3)
		if(!is_numeric($id))
		{
			redirect("products");
		}
		
		$data['cimlap']=$this->mpages->get_row($id);
		$data['title'] = hun() ? 'ARCHLine.XP Modulok' : 'ARCHLine.XP Modules';
        
        $data['meta']['desc'] = 'ARCHLine.XP - '.$data['cimlap']->page_title.": ".trim(str_replace("\n"," ",substr(($str=wordwrap(strip_tags($data['cimlap']->page_body),80,'$$')),0,strpos($str,'$$'))." ..."));
        $data['meta']['keyw'] = ', 11111, '.$data['cimlap']->page_title;
        $data['title'] .= ' - '.$data['cimlap']->page_title;
		$this->load->view('site',$data);
		
	}
	
	
	function japanxp()
	{
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','ARCHLine.XP 2008');
		
		
		$data['cimlap']=$this->mpages->get_row(142);
				
		$data['aktiv']=8;
		$this->load->view('site',$data);
	}
	
	
	function japanxppro()
	{
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','ARCHLine.XP 2008 Professional');
		
		
		$data['cimlap']=$this->mpages->get_row(136);
				
		$data['aktiv']=9;
		$this->load->view('site',$data);
	}
	
	
	function lt()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Verziók - LT' : 'ARCHLine.XP Versions - LT';
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','ARCHLine.XP 2008 LT');
		
		if(hun())
  			$data['cimlap']=$this->mpages->get_row(268);
		elseif(be())
		    $data['cimlap']=$this->mpages->get_row(351);
		else
			$data['cimlap']=$this->mpages->get_row(266);
				
		$data['aktiv']=9;
		$this->load->view('site',$data);
	}
	
	function professional()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Verziók - Professional' : 'ARCHLine.XP Versions - Professional';
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','professional');
		
		if(hun())
			$data['cimlap']=$this->mpages->get_row(31);
		elseif(eng())
			$data['cimlap']=$this->mpages->get_row(86);
		elseif(be())
			$data['cimlap']=$this->mpages->get_row(312);
		elseif(cr())
			$data['cimlap']=$this->mpages->get_row(219);
		elseif(gr())
			$data['cimlap']=$this->mpages->get_row(174);
		elseif(jap())
			$data['cimlap']=$this->mpages->get_row(118);
		
		$data['aktiv']=2;
		$this->load->view('site',$data);
	}
	
	function studio()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Építészet Verziók - Studio' : 'ARCHLine.XP Architect Versions - Studio';
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','studio');

		if(hun())
			$data['cimlap']=$this->mpages->get_row(30);
		elseif(eng())
			$data['cimlap']=$this->mpages->get_row(94);
		elseif(be())
			$data['cimlap']=$this->mpages->get_row(336);
		elseif(cr())
			$data['cimlap']=$this->mpages->get_row(243);
		elseif(gr())
			$data['cimlap']=$this->mpages->get_row(198);
		elseif(jap())
			$data['cimlap']=$this->mpages->get_row(142);
			
		$data['aktiv']=3;
		$this->load->view('site',$data);
	}
	
	function buy()
	{
		// Új építészet árlista
		
		if( !hun() ){
			$data['cimlap'] = $this->mpages->get_row(722);
			$data['title'] = 'ARCHLine.XP Architect Software - Purchase';
			$data['tartalom'] = 'products/buy2';
			$data['javascript'] = array('jquery.corner');
			
			$this->load->view('site',$data);
			return;
		}
		
		
		
        $data['title'] = hun() ? 'ARCHLine.XP Vásárlás' : 'ARCHLine.XP Purchase';
        $data['tartalom']='products/buy';
        $data['csik']=array('home','products','buy');
		$this->load->view('site',$data);
	}
	
	function base()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Építészet verziók - Base' : 'ARCHLine.XP Architect versions - Base';
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','base');

		if(hun())
			$data['cimlap']=$this->mpages->get_row(29);
		elseif(eng())
			$data['cimlap']=$this->mpages->get_row(95);
		elseif(be())
			$data['cimlap']=$this->mpages->get_row(337);
		elseif(cr())
			$data['cimlap']=$this->mpages->get_row(244);
		elseif(gr())
			$data['cimlap']=$this->mpages->get_row(199);
		elseif(jap())
			$data['cimlap']=$this->mpages->get_row(261);
		
		$data['aktiv']=4;
		
		if(jap())
		{
			$data['aktiv']=3;
		}
		
		
		$this->load->view('site',$data);
	}
	
	function scada()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Verziók - Scada' : 'ARCHLine.XP Versions - Scada';
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','Scada');

		$data['cimlap']=$this->mpages->get_row(212);

		$data['aktiv']=4;
		$this->load->view('site',$data);
	}
	
	function standard()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Építészet verziók - Standard' : 'ARCHLine.XP Architect versions - Standard';
		$data['tartalom']='products/versions';
		$data['csik']=array('home','products','standard');

		if(hun())
			$data['cimlap']=$this->mpages->get_row(32);
		elseif(eng())
			$data['cimlap']=$this->mpages->get_row(93);
		elseif(be())
			$data['cimlap']=$this->mpages->get_row(330);
		elseif(cr())
			$data['cimlap']=$this->mpages->get_row(237);
		elseif(jap())
			$data['cimlap']=$this->mpages->get_row(93);
		elseif(gr())
			$data['cimlap']=$this->mpages->get_row(192);

		$data['aktiv']=5;
		$this->load->view('site',$data);
		
	}
	
	function reasons()
	{
        if(hun())
		    $data['cimlap'] = $this->mpages->get_row(59);
		else
			$data['cimlap'] = $this->mpages->get_row(96);

		$data['title'] = hun() ? 'ARCHLine.XP Építészet - 10 ok a vásárlásra' : 'ARCHLine.XP Architect - 10 reasons to buy';
        $data['tartalom'] = '/interior/reasons';
        $data['javascript'] = array('interior_menu');
        $data['csik']=array('home','10ok');
		if( $_SERVER['REMOTE_ADDR'] == "46.107.193.123" )
			$this->load->view('site_2012',$data);
		else
			$this->load->view('site',$data);
	}
	
	function interior_2009(){
		if( $this->uri->segment(3) == "comparison" )
			redirect('interior/comparison');
		elseif( $this->uri->segment(3) == "videos" )
			redirect('multimedia/videos/support');
	}
	
}
?>