english/administrator/components/com_aicontactsafe/models/profiles.php
// function to read the content of the css file of a profile
function to read the content of the css file of a profile
function to read the content of the css file of a profile
function readProfileCssFile( $id = 0 ) {
		$css_code = '';
		jimport('joomla.filesystem.file');
		$css_file = JPath::clean(JPATH_ROOT.DS.'media'.DS.'aicontactsafe'.DS.'cssprofiles'.DS.'profile_css_'.$id.'.css');
		if (!is_file($css_file)) {
			$src_file = JPath::clean(JPATH_ROOT.DS.'components'.DS.'com_aicontactsafe'.DS.'views'.DS.'message'.DS.'tmpl'.DS.'profile_align_margin.css');
			JFile::copy($src_file, $css_file);
		}
		$css_code = JFile::read($css_file);
		return $css_code;
	}
function readProfileCssFile ( $ id = 0 ) { $ css_code = '' ; jimport ( 'joomla.filesystem.file' ) ; $ css_file = JPath :: clean ( JPATH_ROOT . DS . 'media' . DS . 'aicontactsafe' . DS . 'cssprofiles' . DS . 'profile_css_' . $ id . '.css' ) ; if ( ! is_file ( $ css_file ) ) { $ src_file = JPath :: clean ( JPATH_ROOT . DS . 'components' . DS . 'com_aicontactsafe' . DS . 'views' . DS . 'message' . DS . 'tmpl' . DS . 'profile_align_margin.css' ) ; JFile :: copy ( $ src_file , $ css_file ) ; } $ css_code = JFile :: read ( $ css_file ) ; return $ css_code ; }
function to read the content of the css file of a profile
function to read the content of the css file of a profile
// if id is 0, then a new profile is edited and the default CSS should be read // import joomla clases to manage file system