<?php

	/**
	* General Class
	*/
	class Setting
	{

		/*
		 * return base url;
		 */
		public static function base_url()
		{
			return "http://bigorangehotel.com.my";
			// return "http://192.168.0.105/bigorangehotel.com.my";
		}

		/*
		 * return current language selected;
		 */
		public static function current_lang_status($lang)
		{
			if ($_SESSION['bigorange_lang'] == $lang) {
				return true;
			}
			return false;
		}

		/*
		 * set language to session for storage;
		 */
		public static function current_lang()
		{
			if (!isset($_SESSION['bigorange_lang']) AND !isset($_GET['lang'])) {
				$_SESSION['bigorange_lang'] = 'en';
			} elseif(isset($_GET['lang'])) {
				$_SESSION['bigorange_lang'] = $_GET['lang'];
			}
		}

		/*
		 * return current language file to show;
		 */
		public static function switch_lang($lang=null)
		{
			switch ($lang) {
				case 'ch':
					include 'lang/ch.php';
					break;
				
				case 'my':
					include 'lang/my.php';
					break;
				
				default:
					include 'lang/en.php';
					break;
			}

			return $lang_array;
		}

	}

?>