';
$ci =& get_instance();
$cachetoken = '?'.$ci->config->item('fhcomplete_build_version');
if (isset($CSSs))
{
$tmpCSSs = is_array($CSSs) ? $CSSs : array($CSSs);
for ($tmpCSSsCounter = 0; $tmpCSSsCounter < count($tmpCSSs); $tmpCSSsCounter++)
{
$toPrint = sprintf($cssLink, base_url($tmpCSSs[$tmpCSSsCounter]).$cachetoken).PHP_EOL;
if ($tmpCSSsCounter > 0) $toPrint = "\t\t".$toPrint;
echo $toPrint;
}
}
}
/**
* Generates global JS-Object to pass parms to other javascripts
*/
function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
{
$user_language = getUserLanguage();
$toPrint = "\n";
$toPrint .= '';
$toPrint .= "\n\n";
echo $toPrint;
}
/**
* Generates global JS-Object to pass phrases to other javascripts
*/
function generateJSPhrasesStorageObject($phrases)
{
$ci =& get_instance();
$ci->load->library('PhrasesLib', array($phrases), 'pj');
$toPrint = "\n";
$toPrint .= '';
$toPrint .= "\n\n";
echo $toPrint;
}
/**
* Generates tags for the javascripts you want to include, the parameter could by a string or an array of strings
*/
function generateJSsInclude($JSs)
{
$jsInclude = '';
$ci =& get_instance();
$cachetoken = '?'.$ci->config->item('fhcomplete_build_version');
if (isset($JSs))
{
$tmpJSs = is_array($JSs) ? $JSs : array($JSs);
for ($tmpJSsCounter = 0; $tmpJSsCounter < count($tmpJSs); $tmpJSsCounter++)
{
$toPrint = sprintf($jsInclude, base_url($tmpJSs[$tmpJSsCounter].$cachetoken)).PHP_EOL;
if ($tmpJSsCounter > 0) $toPrint = "\t\t".$toPrint;
echo $toPrint;
}
}
}
/**
* Generates all the includes needed by the Addons
*/
function generateAddonsJSsInclude($calledFrom)
{
$aktive_addons = array_filter(explode(";", ACTIVE_ADDONS));
foreach ($aktive_addons as $addon)
{
$hookfile = DOC_ROOT.'addons/'.$addon.'/hooks.config.inc.php';
if (file_exists($hookfile))
{
include($hookfile);
if (key_exists($calledFrom, $js_hooks))
{
foreach ($js_hooks[$calledFrom] as $js_file)
generateJSsInclude('addons/'.$addon.'/'.$js_file);
}
}
}
}
/**
* This function merely print some useful HTML to help some vacuous browsers to handle modern JS features
*/
function generateBackwardCompatibleJSMsIe($js)
{
echo "\n";
}