<?php
class Photo_index extends Controller
{
	function Photo_index()
	{
		parent::Controller();
	}

	function index()
	{
		$this->load->model('minterview');
		
		if(hun()){
			$data['page'] = $page=$this->mpages->get_row(516);
		}
		else
		{
		   $data['page'] = $page=$this->mpages->get_row(503);
		}
		
    	$data['title'] = hun() ? 'ARCHLine.XP Photo Edition program' : 'ARCHLine.XP Photo Edition Software';
        $data['tartalom'] = 'photo/index';
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'interior_menu', 'interior_banner');
        
        $data['csik']=array('home','products');

		$this->load->view('site',$data);
	}
	
	function workflow()
	{
        if(hun())
		    $data['cimlap'] = $this->mpages->get_row(289);
		elseif(jap())
		    $data['cimlap'] = $this->mpages->get_row(300);
  		elseif(be())
		    $data['cimlap'] = $this->mpages->get_row(361);
		else
			$data['cimlap'] = $this->mpages->get_row(288);

		$data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Munkamenet' : 'ARCHLine.XP Interior Design Software - Workflow';
        $data['tartalom'] = '/interior/workflow';
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'interior_menu', 'interior_banner');
        
		$this->load->view('site',$data);
	}
	
	function powerful()
	{
		if(hun())
		    $data['cimlap'] = $this->mpages->get_row(285);
        elseif(be())
		    $data['cimlap'] = $this->mpages->get_row(354);
		elseif(jap())
		    $data['cimlap'] = $this->mpages->get_row(302);
		else
			$data['cimlap'] = $this->mpages->get_row(284);

		$data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Kiemelkedő Jellemzők' : 'ARCHLine.XP Interior Design Software - Powerful Features';
        $data['tartalom'] = 'interior/powerful';
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'interior_menu', 'interior_banner');
        
		$this->load->view('site',$data);
	}
	
	function comparison()
	{
        if(hun())
		    $data['cimlap'] = $this->mpages->get_row(290);
        elseif(be())
		    $data['cimlap'] = $this->mpages->get_row(362);
		elseif(jap())
		    $data['cimlap'] = $this->mpages->get_row(301);
		else
			$data['cimlap'] = $this->mpages->get_row(292);

        $data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Összehasonlítás' : 'ARCHLine.XP Interior Design Software - Comparison';
        $data['tartalom'] = 'interior/comparison';
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'comparison', 'interior_menu', 'interior_banner');
        
		$this->load->view('site',$data);
	}
	
	function videos()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Videók' : 'ARCHLine.XP Interior Design Software - Videos';
        $data['tartalom'] = 'interior/videos';
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'interior_menu', 'show_slide', 'tooltip', 'interior_banner');
		
        if(hun()){
            $data['cimlap'] = $this->mpages->get_row(475);
        } else {
            $data['cimlap'] = $this->mpages->get_row(476);
        }
        
        $data['csik']=array('home','videos');
		
		$this->load->view('site',$data);
	}
	
	function tutorials()
	{
		$data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Oktatóvideók' : 'ARCHLine.XP Interior Design Software - Tutorials';
        $data['tartalom'] = 'interior/tutorials';
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'interior_menu', 'show_slide', 'tooltip', 'interior_banner');
        
		$this->load->view('site',$data);
	}
	
	function buy()
	{
		if(hun())
		    $data['cimlap'] = $this->mpages->get_row(287);
        elseif(be())
		    $data['cimlap'] = $this->mpages->get_row(360);
		elseif(jap())
		    $data['cimlap'] = $this->mpages->get_row(299);
		else
			$data['cimlap'] = $this->mpages->get_row(446);

        $data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Vásárlás' : 'ARCHLine.XP Interior Design Software - Purchase';
        $data['tartalom'] = 'interior/buy';
        $data['javascript'] = array('interior_menu');
        
		$this->load->view('site',$data);
	}
	
	function download()
	{
		if( $this->uri->segment(3) == "esp" ){
			redirect('settings/lang2/esp');
		}
		
        $this->load->model('mctr');

		$data['ctr'] = hun() ? $this->mctr->get_all_ctr('ctrNameHun') : $this->mctr->get_all_ctr();
		
        if(hun())
		    $data['cimlap'] = $this->mpages->get_row(291);
        elseif(be())
		    $data['cimlap'] = $this->mpages->get_row(363);
		elseif(jap())
		    $data['cimlap'] = $this->mpages->get_row(303);
		elseif( esp() )
			$data['cimlap'] = $this->mpages->get_row(453);
		else
			$data['cimlap'] = $this->mpages->get_row(293);

        $data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Letöltés' : 'ARCHLine.XP Interior Design Software - Download';
        $data['tartalom']='interior/download';
        //$data['javascript'] = array('intkit/JavaScriptFlashGateway', 'comparison', 'interior_menu', 'interior_banner', 'downloads_int');
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'comparison', 'interior_menu', 'downloads_int');
        
        $data['csik']=array('home','downloads');
		$this->load->view('site',$data);
	}
	
	function updates()
	{
		$this->load->model('mdownloads');
		$this->load->model('mctr');
		
		$data['heading']=$this->mdownloads->get_heading('updates');
		$data['downloads']=$this->mdownloads->get_category('updates',$this->muser->user['lang']);
		$data['aktiv']=2;
		
		$data['lang']=$this->muser->user['lang'];
		$data['tartalom']='interior/list2';
		$data['csik']=array('home','interior','updates');
		$data['title']='ARCHline.XP CAD Software - Download Updates';
		$this->load->view('site',$data);
	}
	
	function drivers()
	{
		$this->load->model('mdownloads');
		$this->load->model('mctr');
		
		$data['heading']=$this->mdownloads->get_heading('drivers');
		$data['downloads']=$this->mdownloads->get_category('drivers',$this->muser->user['lang']);
		$data['aktiv']=3;
		
		$data['lang']=$this->muser->user['lang'];
		
		$data['title'] = hun() ? 'ARCHLine.XP Driverek' : 'ARCHLine.XP Drivers';
		$data['tartalom']='interior/list2';
		$data['csik']=array('home','interior','drivers');
		$this->load->view('site',$data);
	}
	
	function support()
	{
		$this->load->model('mdownloads');
		$this->load->model('mctr');
		
		$data['heading']=$this->mdownloads->get_heading('support');
		$data['downloads']=$this->mdownloads->get_category('support',$this->muser->user['lang']);
		$data['aktiv']=4;
		
		$data['lang']=$this->muser->user['lang'];
		$data['title'] = hun() ? 'ARCHLine.XP Támogatás' : 'ARCHLine.XP Support';
		$data['tartalom']='interior/list2';
		$data['csik']=array('home','interior','support');
		$this->load->view('site',$data);
	}
	
	function learn()
	{
		$data['learn_url'] = base64_decode($this->uri->segment(4));
        $data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Oktatás' : 'ARCHLine.XP Interior Design Software - Learn';
        $data['tartalom'] = 'interior/learn';
        $data['javascript'] = array('prototype', 'base64', 'anchor.jquery', 'learn', 'interior_menu', 'tooltip');
        !hun() ? $data['javascript'][3] = 'learn_eng' : '';

		$this->load->view('site',$data);
	}
	
	function system()
	{
        if(hun())
		    $data['cimlap'] = $this->mpages->get_row(275);
        elseif(be())
		    $data['cimlap'] = $this->mpages->get_row(355);
		else
			$data['cimlap'] = $this->mpages->get_row(274);
			
		$data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Rendszerkövetelmények' : 'ARCHLine.XP Interior Design Software - System Requirements';
        $data['tartalom'] = 'interior/system';
        $data['javascript'] = array('interior_menu');
        
        $data['csik']=array('home', 'rendszer');

		$this->load->view('site', $data);
	}
	
	function gallery()
	{
		$this->load->model('mgallery');
		
		if(!$this->uri->segment(3))
		{
            $data['lang']=$this->muser->user['lang'];
			$data['csik']=array('home','gallery');

			$data['title'] = hun() ? 'ARCHLine.XP Interior Multimédia' : 'ARCHLine.XP Interior Multimedia';
			$data['javascript'] = array('interior_menu');
			$data['tartalom'] = 'interior/gallery';

			$this->load->view('site',$data);
		}
		else
		{
            $folder = $this->uri->segment(3);
			if($folder && $this->mgallery->checkFolder($folder))
			{
				//create thumbs if they are missing
				$this->mgallery->prepImages($folder);

		        $data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Galéria' : 'ARCHLine.XP Interior Design Software - Gallery';

	            $data['tartalom'] = 'interior/gallery';
				$data['javascript'] = array(
										'interior_menu',
	         							'fancybox/jquery-1.3.2.min',
										'fancybox/jquery.easing.1.3',
										'fancybox/jquery.fancybox-1.2.1.pack',
										'fancybox/fancy'
										);

				$data['style'] = array('fancybox');

				//set the folder's name
				$data['folder'] = $folder;

				//load images from the folder
				$data['images'] = $this->mgallery->getImages($folder);

				$this->load->view('site',$data);
			}
			else
			{
	            redirect('interior');
			}
		}
	}
	
	function events()
	{
		$this->load->model('mevents');

		$data['counties'] = array(
						-1 => '-- válasszon --',
						'Bács-Kiskun' => 'Bács-Kiskun',
						'Baranya' => 'Baranya',
						'Békés' => 'Békés',
						'Borsod-Abaúj-Zemplén' => 'Borsod-Abaúj-Zemplén',
						'Budapest' => 'Budapest',
						'Csongrád' => 'Csongrád',
						'Fejér' => 'Fejér',
						'Győr-Moson-Sopron' => 'Győr-Moson-Sopron',
						'Hajdú-Bihar' => 'Hajdú-Bihar',
						'Heves' => 'Heves',
						'Jász-Nagykun-Szolnok' => 'Jász-Nagykun-Szolnok',
						'Komárom-Esztergom' => 'Komárom-Esztergom',
						'Nógrád' => 'Nógrád',
						'Pest' => 'Pest',
						'Somogy' => 'Somogy',
						'Szabolcs-Szatmár-Bereg' => 'Szabolcs-Szatmár-Bereg',
						'Tolna' => 'Tolna',
						'Vas' => 'Vas',
						'Veszprém' => 'Veszprém',
						'Zala' => 'Zala'
						);

		$data['lang']=$this->muser->user['lang'];
		$data['title'] = hun() ? 'ARCHLine.XP CAD Software - Bemutatók' : 'ARCHLine.XP CAD Software - Events';
		$data['tartalom']='interior/events';
		$data['csik']=array('home','support');

		if(hun())
			$data['javascript'] = array('events');

		$data['events'] = $this->mevents->get_latest('30',$this->muser->user['lang']);

		$data['aktiv']=2;

		$data['faqs'] = $this->mevents->get_latest('faq_date');

		$error = false;

		if($this->input->post('do')!=false)
		{
			if(hun())
			{
				$arr = array('event_id','nev','cegnev','varos','irsz','tel','kamsz','county','fax','email','comment','cim');
				foreach($arr as $a)
				{
					$tomb[$a] = $this->input->post($a);

					if($tomb[$a]==false && $a!='fax' && $a !='comment' && $a!='cegnev' && $a!='kamsz' && $a!='county')
					{
						$error = "Minden vastaggal jelölt mezőt ki kell tölteni ($a hiányzik)";
					}
					else
					{
						$event_id = explode('|',$tomb['event_id']);
						$event_id = $event_id[0];

						if($a=='event_id' && !is_numeric($event_id))
						{
							$error = 'Hibás azonosító: '.$a;
						}
					}
				}

				if($tomb['kamsz']!='' && $tomb['county']==-1)
				{
					$error = "A kamarai névjegyzéki számhoz meg kell adnia a megyét is.";
				}

				$event_id = explode('|',$tomb['event_id']);
				$event_id = $event_id[0];

				if(!is_numeric($event_id))
				{
					$error = 'Hiábás esemény azonosító';
				}
				else
				{
					$tomb['esemeny']=$this->mevents->get_row($event_id);
				}
			}
			elseif(jap())
			{
				$arr = array('event_id','nev','pron','cegnev','cim','tel','fax','email','comment','other');
				foreach($arr as $a)
				{
					$tomb[$a] = $this->input->post($a);

					if($tomb[$a]==false && $a=='tel' && $a =='nev' && $a=='cegnev')
					{
						$error = "You have to fill all form fields marked with bold text ($a is missing)";
					}
					else
					{
						if($a=='event_id' && !is_numeric($tomb[$a]))
						{
							$error = 'Invalid id: '.$a;
						}
					}
				}

				if(!is_numeric($tomb['event_id']))
				{
					$error = 'You have not selected an event, please select one!';
				}
				else
				{
					$tomb['esemeny']=$this->mevents->get_row($tomb['event_id']);
				}


				$egyebcad = array('AutoCAD','VectorWorks','ArchiCAD','JWCAD','ARCHITREND','GoogleSketchup','DRACAD','SuperSoft','???');

				$valasztott = array();

				foreach($egyebcad as $key => $cad)
				{
					$no = $key+1;
					$keres = 'cb'.$no;

					if($this->input->post($keres)=='on')
					{
						$valasztott[]=$cad;
					}
				}

				if(count($valasztott)==0)
				{
					$tomb['egyebcad']=false;
				}
				else
				{
					$tomb['egyebcad']=$valasztott;
				}
			}
			else
			{
				$arr = array('event_id','nev','cegnev','varos','irsz','tel','fax','email','comment','cim');
				$names = array('event_id' => 'event id', 'nev' => 'name', 'cegnev' => 'company name', 'varos' => 'city', 'irsz' => 'zip code', 'tel' => 'phone number', 'fax' => 'fax number', 'email' => 'e-mail', 'comment' => 'comment', 'cim' => 'address');
				foreach($arr as $a)
				{
					$tomb[$a] = $this->input->post($a);

					if($tomb[$a]==false && $a!='fax' && $a !='comment' && $a!='cegnev')
					{
						$error = "Fill out every bold field ({$names[$a]} missing)";
					}
					else
					{
						$event_id = explode('|',$tomb['event_id']);
						$event_id = $event_id[0];

						if($a=='event_id' && !is_numeric($event_id))
						{
							$error = 'Wrong identifier: '.$a;
						}
					}
				}

				$event_id = explode('|',$tomb['event_id']);
				$event_id = $event_id[0];

				if(!is_numeric($event_id))
				{
					$error = 'You have to specify an event!';
				}
				else
				{
					$tomb['esemeny']=$this->mevents->get_row($event_id);
				}
			}



			if(!$error)
			{
				$this->load->library('email');
				$this->load->helper('email');
				$this->email->initialize();
				$this->email->addOfficialImages();


				if(hun())
				{

					$e = explode('|',$tomb['event_id']);

					$tomb['egyeb'] = $e[1];
					$tomb['mailcontent'] = 'support/eventmail';

					$this->email->from('info@cadline.hu', 'Cadline Weboldal');
					$this->email->subject('Esemenyek jelentkezes');
					$this->email->message($this->load->view('mail',$tomb,true));
					$this->email->send('info@cadline.hu','smtp');
					
					//Kintre:
					$this->email->clear();
					$mailnek['mailcontent'] = 'support/eventmail_ki';
					
					$mailnek['esemeny']=$tomb['esemeny'];
					
					$e = explode('|',$tomb['event_id']);
					$bem = $this->mevents->get_row($e[0]);
					$mailnek['datum'] = $bem->event_ev.'-'.$bem->event_ho.'-'.$bem->event_nap;
					$mailnek['datum'] = $e[1];
					
					$this->email->from('info@cadline.hu', 'Cadline Weboldal');
					$this->email->subject('Regisztracio bemutatora');
					$this->email->message($this->load->view('mail',$mailnek,true));
					$this->email->send($tomb['email'],'smtp');
				}
				elseif(jap())
				{
					$this->email->from('info@cadline.hu', 'Cadline Weboldal');
					$this->email->subject('Event SignUp Notification');
					$this->email->message($this->load->view('support/eventmail',$tomb,true));
					$this->email->send('living-cg@leaf.ocn.ne.jp','smtp');
				}
				
				elseif(eng()){
					$e = explode('|',$tomb['event_id']);

					$tomb['egyeb'] = $e[1];
					$mailnek=$tomb;
					$tomb['mailcontent'] = 'support/eventmail';

					$this->email->from('info@cadline.hu', 'Cadline Weboldal');
					$this->email->subject('Esemenyek jelentkezes');
					$this->email->message($this->load->view('mail',$tomb,true));
					$this->email->send('info@archlinexp.com','smtp');
					
					//Kintre
					/*
					$this->email->clear();
					$mailnek['mailcontent'] = 'support/eventmail_ki';
					
					$bem = $this->mevents->get_row($e[0]);
					$mailnek['datum'] = $bem->event_ev.'-'.$bem->event_ho.'-'.$bem->event_nap;
					
					$this->email->from('info@cadline.hu', 'Cadline Weboldal');
					$this->email->subject('Registration for free traning session at BIDA');
					$this->email->message($this->load->view('mail_eng',$mailnek,true));
					//$this->email->send($tomb['email'],'smtp');
					*/
					
				}
				else
				{

					$e = explode('|',$tomb['event_id']);

					$tomb['egyeb'] = $e[1];
					$tomb['mailcontent'] = 'support/eventmail';

					$this->email->from('info@cadline.hu', 'Cadline Weboldal');
					$this->email->subject('Esemenyek jelentkezes');
					$this->email->message($this->load->view('mail',$tomb,true));
					$this->email->send('info@archlinexp.com','smtp');
				}

				redirect('interior/eventok');
			}

		}

		$data['error']=$error;
		$this->load->view('site',$data);
	}

	function eventok()
	{
		$data['lang']=$this->muser->user['lang'];
		$data['javascript'] = array('interior_menu');
		$data['tartalom']='interior/eventok';
		$data['csik']=array('home','support');
		$data['aktiv']=2;

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

		$data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - 10 ok a vásárlásra' : 'ARCHLine.XP Interior Design Software - 10 reasons to buy';
        $data['tartalom'] = '/interior/reasons';
        $data['javascript'] = array('interior_menu');
        
        $data['csik']=array('home','10ok');

		$this->load->view('site',$data);
	}
	
	function interview()
	{
		$id = $this->uri->segment(3);

        $data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program - Interjúk' : 'ARCHLine.XP Interior Design Software - Interviews';

		if($id)
		{
			$data['interview'] = $this->load->view('interview/' . $id, null, true);
			$data['tartalom'] = 'interview/index';
			$data['javascript'] = array('intkit/JavaScriptFlashGateway', 'interview', 'interior_menu', 'interview/loader');
		}
		else
		{
            $data['cimlap'] = $this->mpages->get_row(368);
	        $data['tartalom'] = 'interior/interview';
	        $data['javascript'] = array('jquery.color', 'interview', 'interior_menu');
		}

		$data['style'] = array('interview');
		$data['csik']=array('home','interview');

		$this->load->view('site', $data);
	}
	
	function sentint()
	{
        $data['title'] = hun() ? 'ARCHLine.XP Interior Letöltés - Sikeres' : 'ARCHLine.XP Interior Download - Successful';
		$data['tartalom']='downloads/sentint';
		$data['csik']=array('home','downloads');
		$data['lang']=$this->muser->user['lang'];

		$this->load->view('site',$data);
	}
	
	function ticket()
	{
		$do = $this->input->post('do');

		if($do && $do=='ticket')
		{
			$fajlnev = "ticket_a.txt";
			$fa = fopen( $fajlnev, "r" ) or die("$fajlnev nem nyitható meg");
			$db = fgets( $fa, 1024);
			fclose($fa);
			
			if($db > 0){
				
				$fajlnev = "ticket_a.txt";
				chmod($fajlnev, 0777);
				$fa = fopen( $fajlnev, "w" ) or die("$fajlnev nem nyitható meg");
				fwrite ( $fa, ($db-1));
				fclose( $fa );
				
				$name = $this->input->post('name');
				$address = $this->input->post('address');
				$city = $this->input->post('city');
				$zip = $this->input->post('zip');
				$email = $this->input->post('email');
				
				if(!$name || !$address || !$city || !$zip || !$email || $name=='' || $address=='' || $city=='' || $zip=='' || $email=='')
					redirect('interior/ticket');
				
				$mail_vars['event'] = "Awards Preview Evening Invitation ";
				$mail_vars['name'] = $name;
				$mail_vars['address'] = $address;
				$mail_vars['city'] = $city;
				$mail_vars['zip'] = $zip;
				$mail_vars['email'] = $email;
				$mail_vars['jegydb'] = $db-1;
	
				$this->load->library('email');
				$this->email->clear();
				$this->email->initialize();
	
				$this->email->from('info@cadline.hu', 'CadLine');
				$this->email->subject('ARCHLine.XP Kedvezmenyes Belepo');
				$this->email->message($this->load->view('mail/interior_ticket', $mail_vars, true));
	
				//$this->email->send('margo.flaisz@cadline.hu', 'smtp');
				$this->email->send('rita.vasifodor@archlinexp.com', 'smtp');
				//$this->email->send('sztikee@gmail.com', 'smtp');
				
				
				$this->email->clear();
				$this->email->initialize();
	
				$this->email->from('info@cadline.hu', 'CadLine');
				$this->email->subject('ARCHLine.XP Kedvezmenyes Belepo');
				$this->email->message($this->load->view('mail/interior_ticket', $mail_vars, true));
				$this->email->send('info@cadline.hu', 'smtp');
				//$this->email->send('sztikee@gmail.com', 'smtp');
				
				
				$data['tartalom'] = 'interior/ticket_sent';
			}else{
				print "Nincs tobb jegy";
				$data['tartalom'] = 'interior/ticket_sent_0';
			}
			
			
			
            $this->load->view('site', $data);
            
            
		}
		else
		{
            $data['tartalom'] = 'interior/ticket';

			$this->load->view('site', $data);
		}
	}
	
	function ticketcomp()
	{
		$do = $this->input->post('do');

		if($do && $do=='ticket')
		{
			$fajlnev = "ticket_c.txt";
			$fa = fopen( $fajlnev, "r" ) or die("$fajlnev nem nyitható meg");
			$db = fgets( $fa, 1024);
			fclose($fa);
			
			if($db > 0){
				
				$fajlnev = "ticket_c.txt";
				chmod($fajlnev, 0777);
				$fa = fopen( $fajlnev, "w" ) or die("$fajlnev nem nyitható meg");
				fwrite ( $fa, ($db-1));
				fclose( $fa );
				
				$name = $this->input->post('name');
				$address = $this->input->post('address');
				$city = $this->input->post('city');
				$zip = $this->input->post('zip');
				$email = $this->input->post('email');
				
				if(!$name || !$address || !$city || !$zip || !$email || $name=='' || $address=='' || $city=='' || $zip=='' || $email=='')
					redirect('interior/ticketcomp');
				
				$mail_vars['event'] = "Complimentary Ticket ";
				$mail_vars['name'] = $name;
				$mail_vars['address'] = $address;
				$mail_vars['city'] = $city;
				$mail_vars['zip'] = $zip;
				$mail_vars['email'] = $email;
				$mail_vars['jegydb'] = ($db-1);
	
				$this->load->library('email');
				$this->email->clear();
				$this->email->initialize();
	
				$this->email->from('info@cadline.hu', 'CadLine');
				$this->email->subject('ARCHLine.XP Kedvezmenyes Belepo');
				$this->email->message($this->load->view('mail/interior_ticket', $mail_vars, true));
	
				//$this->email->send('margo.flaisz@cadline.hu', 'smtp');
				$this->email->send('rita.vasifodor@archlinexp.com', 'smtp');
				//$this->email->send('sztikee@gmail.com', 'smtp');
				
				
				$this->email->clear();
				$this->email->initialize();
	
				$this->email->from('info@cadline.hu', 'CadLine');
				$this->email->subject('ARCHLine.XP Kedvezmenyes Belepo');
				$this->email->message($this->load->view('mail/interior_ticket', $mail_vars, true));
				$this->email->send('info@cadline.hu', 'smtp');
				//$this->email->send('sztikee@gmail.com', 'smtp');
				
				
				$data['tartalom'] = 'interior/ticket_sent';
			}else{
				//print "Nincs tobb jegy";
				$data['tartalom'] = 'interior/ticket_sent_0';
			}
			$this->load->view('site', $data);
		}
		else
		{
            $data['tartalom'] = 'interior/ticketcomp';

			$this->load->view('site', $data);
		}
	}
	
	function special_offer()
	{
        $data['title'] = 'ARCHLine.XP Interior - Special Offer';
		$data['tartalom']='interior/special_offer';
		$data['cimlap'] = $this->mpages->get_row(430);
		$data['csik']=array('home','interior');

		$this->load->view('site',$data);
	}
	
	function academic(){
		$data['title'] = 'ARCHLine.XP Academic';
		$data['tartalom']='academic/index';
		$data['csik']=array('home','academic');
		
		/*if(hun())
			$data['cimlap'] = $this->mpages->get_row(304);
		elseif(be())
			$data['cimlap'] = $this->mpages->get_row(364);
		else*/
			$data['cimlap'] = $this->mpages->get_row(452);
		
		$this->load->view('site',$data);
	}
	
	// 2010 nov. 13-a elotti interior fooldal
	function old(){
		$this->load->model('minterview');
		
		if(eng()){
			$data['page'] = $page=$this->mpages->get_row(474);
		}
		
    	$data['title'] = hun() ? 'ARCHLine.XP Interior Belsőépítész program' : 'ARCHLine.XP Interior Design Software';
        $data['tartalom'] = 'interior/index_old';
        $data['javascript'] = array('intkit/JavaScriptFlashGateway', 'interior_menu', 'interior_banner');
        
        $data['csik']=array('home','products');

		$this->load->view('site',$data);
	}
}
?>