<?php
// Resource functions

	// Get email Template Path
	function _emailTempate($tmpName)
	{
		global $const_website_root_absPath;			
		return $const_website_root_absPath.'resources/email-templates/'.$tmpName;
	}	

	// Include resource files
	function _includeResource($fileLocation)
	{
		global $mailer;		
		global $const_website_root_absPath;
		include_once($const_website_root_absPath.'resources/'.$fileLocation);
	}
	
	// Init PHP Mailer
	function _initPHPMailer()
	{
		global $mailer;		
		_includeResource('PHPMailer/mailer.php');
	}
	
	// Init TC Pdf
	function _initTCPdf()
	{	
		_includeResource('TCPdf/examples/tcpdf_include.php');
	}	
	
	// Get Storage Path
	function _getStoragePath($path='')
	{
		global $setting_storagePath;
		global $const_website_root_absPath;		
		return $const_website_root_absPath.$setting_storagePath.'/'.$path;
	}
	
	
	// Get Upload Path
	function _getUploadpath($path='')
	{
		global $setting_uploadPath;
		global $setting_publicPath;
		global $const_website_root_absPath;		
		return $const_website_root_absPath.$setting_publicPath.'/'.$setting_uploadPath.'/'.$path;
	}	
?>
