//Create header (fixes bug #3097) $templatedir = sGetTemplatePath($surveyinfo["template"]); // do we need this to get the path? $surveylanguage = $language; sendcacheheaders(); if ( !$embedded ) { $header= "\n" . "\n"; $header.= "\n"; // NEW part - if(file_exists($templatedir ."/statistics_user_template.js")){ $header.= statistic_user_js_insert($surveyinfo, $thisSurveyCssPath); } $header.= "\n\n"; echo $header; } else { if ( function_exists( $embedded_headerfunc ) ) echo $embedded_headerfunc(); } /* * If you need to modify the public statistic via js, * insert a "statistics_user_template.js" - file in your template folder * by KRAV * * creates js insert for page header */ function statistic_user_js_insert($surveyinfo, $thisSurveyCssPath){ global $rooturl; $js_insert = ''; $js_insert .= ''; return $js_insert; }