<?php
/**
* @version		3.0.0
* @package		JomLand TicketCenter
* @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
* @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/

defined('_JEXEC') or die();

class JLTicketCenterLinksHelper
{
	
	public static function VenueLink($link_Type,$venue_id=0,$venue_name='',$Itemid=0){
		switch ($link_Type){
			case 2:
				$venue_link = JROUTE::_('index.php?option=com_jlticketcenter&view=event&venue='.$venue_id.'&Itemid='.$Itemid);
				$venue = JHTML::link($venue_link, $venue_name);
			break;
			case 1:
				$venue = $venue_name;
			break;
			default:
				$venue ='';
			break;
		}
		return $venue;
	}//EOF VenueLink;

    public static function CityLink($link_Type,$city_id=0,$city_name='',$Itemid=0){
		//var_dump($link_Type,$city_id,$city_name,$Itemid);
		switch ($link_Type){
			case 3:
				$city_link = JRoute::_('index.php?option=com_jlticketcenter&view=venues&city='.$city_id.'&Itemid='.$Itemid);
				$city = JHTML::link($city_link, $city_name);
			break;
			
			case 2:
				$city_link = JRoute::_('index.php?option=com_jlticketcenter&view=event&city='.$city_id.'&Itemid='.$Itemid);
				$city = JHTML::link($city_link, $city_name);
				
			break;
			case 1:
				$city  = $city_name;
			break;
			default:
				$city  ='';
			break;
		}
		return $city ;
	}//EOF CityLink;

    public static function StateLink($link_Type,$state_id=0,$state_name='',$Itemid=0){
		//var_dump($link_Type,$state_id,$state_name,$Itemid);
		switch ($link_Type){
			case 3:
				$state_link = JRoute::_('index.php?option=com_jlticketcenter&view=venues&state='.$state_id.'&Itemid='.$Itemid);
				$state = JHTML::link($state_link, $state_name);
			break;
			case 2:
				$state_link = JRoute::_('index.php?option=com_jlticketcenter&view=event&state='.$state_id.'&Itemid='.$Itemid);
				$state = JHTML::link($state_link, $state_name);
			break;
			case 1:
				$state  = $state_name;
			break;
			default:
				$state  ='';
			break;
		}
		return $state ;
	}//EOF stateLink;

    public static function CountryLink($link_Type,$country_id=0,$country_name='',$Itemid=0){
		//var_dump($link_Type,$country_id,$country_name,$Itemid);
		switch ($link_Type){
			case 3:
				$country_link = JRoute::_('index.php?option=com_jlticketcenter&view=venues&country='.$country_id.'&Itemid='.$Itemid);
				$country = JHTML::link($country_link, $country_name);
			break;
			
			case 2:
				$country_link = JRoute::_('index.php?option=com_jlticketcenter&view=event&country='.$country_id.'&Itemid='.$Itemid);
				$country = JHTML::link($country_link, $country_name);
				
			break;
			case 1:
				$country  = $country_name;
			break;
			default:
				$country  ='';
			break;
		}
		return $country ;
	}//EOF countryLink;
	
	public static function renderinfo(){
        if(file_exists(JPATH_SITE.'/components/com_jlticketcenter/helpers/helper_pro.php')){
            return;
        }
		$str = 'PGRpdiBzdHlsZT0idGV4dC1hbGlnbjogY2VudGVyOyBjb2xvcjogcmdiKDIxMSwgMjExLCAyMTEpOyI+UG93ZXJlZCBieSA8YSB0aXRsZT0iam9tbGFuZC5jb20iIHRhcmdldD0iX2JsYW5rIiBzdHlsZT0idGV4dC1kZWNvcmF0aW9uOiBub25lOyIgaHJlZj0iaHR0cDovL3d3dy5qb21sYW5kLmNvbS8iPkpvbUxhbmQ8L2E+IDxhIHRpdGxlPSJUaWNrZXRzIENlbnRlciIgdGFyZ2V0PSJfYmxhbmsiIHN0eWxlPSJ0ZXh0LWRlY29yYXRpb246IG5vbmU7IiBocmVmPSJodHRwOi8vd3d3LmpvbWxhbmQuY29tL2V4dGVuc2lvbnMvamx0aWNrZXRjZW50ZXIvb3ZlcnZpZXciPlRpY2tldHMgQ2VudGVyPC9hPjwvZGl2Pg==';
		echo "<br>" .base64_decode($str);
		return;
	}

}//EOC