<?php

	Class PHPSET
	{
		/**Boolean <br />Holds debugTesting status. <br />*/
		Const DEBUG_MODE =  true;
		Const LOCAL_MODE =  false;
		Const REPORT_ERROR_LEVEL = 100;
		
		// URLs
		/**String <br />Holds the index.php's directory.<br />*/
		Public Static $ROOT = '';
		Public Static $SITE_URL = '';
		
		// SQL
		Public Static $SQL_DATA_SOURCE = "";
		Public Static $SQL_DATABASE_NAME = "";
		Public Static $SQL_DATABASE_USER = "";
		Public Static $SQL_DATABASE_PASSWORD = "";
		
		// Request Parameter
		Const SITE_ARRAY_REQUEST_LIMIT = 200; // Limit of $_GET / $_POST array per request.
		Public Static $SITE_REQUESTED_TIME = '';
		
		// Paging
		Const SITE_SHOW_RESULT_PER_PAGE = 30;
		Const SITE_SHOW_RESULT_PER_PAGE_PLAIN_TEXT = 300;
		
		// Time Settings
		Const SITE_TIME_ZONE = "Asia/Manila";
		Const SITE_TIME_ZONE_HOUR_DIFF = 8;
		Const SITE_TIME_ZONE_MIN_DIFF = 0;
		
		// Session Parameter
		Const SESSION_NAME = "peak_web_session";
		Const SESSION_EXPIRY = 60 * 4; // in minutes
		Const SESSION_NONCE_EXPIRY = 300; // in seconds
		Const SESSION_AGENT_DEPENDENT = True; // When agent does not match, destroy session.
		
		// Chikka Parameter
		Const CHIKKA_DEFAULT_CHARGE = "P1.00";
		Const CHIKKA_ENABLED = false;
		
		// Encryption Parameter
		Public Static $SQL_ENCRYPTION_KEY = "fyim19jrvxscgyfrcettozgeu89u795uqo976c0k";
		Public Static $PHP_ENCRYPTION_KEY = "snzSVbk1HsaHK/yOUOabpAmRf1GNmxlVdPrekHyZgrs=";
		Public Static $DEVICE_PUBLIC_KEY = "VKWGX-KUGFI-0TZ7H-ZSGUU-BEUKE-WSYPI-U";
		Public Static $DEVICE_PRIVATE_KEY = "WCJ7S-HDXMP-YSPD6-KJA5P-MIPVI-TVURE-T";
		
		// Mobile Auth
		Public Static $MOBILE_USERNAME = '';
		Public Static $MOBILE_PASSWORD = '';
		Public Static $MOBILE_URL = 'https://youattend.dsasoftware.com.ph/Record/sms_broadcast/send';
		Public Static $MOBILE_ATTENDANCE_URL = 'https://youattend.dsasoftware.com.ph/Record/sms_queue/send';
		Public Static $MOBILE_BALANCE = 'https://youattend.dsasoftware.com.ph/Record/sms/balance';
		
		// SYSTEM_AUTHENTICATION
		Public Static $SYSTEM_USERNAME = "system";
		Public Static $SYSTEM_PASSWORD = 'this feature is not';
		
		// FOR SYNC
		Const SYNC_REQUEST_KEY = "47KTtKAQSoIO9ujDrEx8ASO6hpuZs0gfNncYGxjkRnnmniaBliSbRooYL1";
		
		/**
		 * Loads PHP settings (URLs, Time Setting, Authentication, etc.)
		 * @return null
		 */
		Public Static Function SET_LOAD($ROOT)
		{
			if(self::LOCAL_MODE)
			{
				self::$SITE_URL = 'https://' . gethostbyname(gethostname()) . '/peak_web';
				self::$SQL_DATA_SOURCE = "localhost";
				self::$SQL_DATABASE_NAME = "peak_web2";
				self::$SQL_DATABASE_USER = "root";
				self::$SQL_DATABASE_PASSWORD = "";
			}
			else
			{
				self::$SITE_URL = 'https://water202207.peakpos.com.ph';
				self::$SQL_DATA_SOURCE = "localhost";
				self::$SQL_DATABASE_NAME = "peakpos_water202207";
				self::$SQL_DATABASE_USER = "peakpos_main";
				self::$SQL_DATABASE_PASSWORD = 'vXahmLaKyJPynS~7QvHXPLA:wsciKM}d';
			}
			
			self::$ROOT = $ROOT;
			date_default_timezone_set(PHPSET::SITE_TIME_ZONE);
			self::$SITE_REQUESTED_TIME = PHPVC_DATETIME::VAR_NOW();
		}
		
	}
?>