XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
rmc_header.php
Go to the documentation of this file.
1 <?php
2 
4 
5 $scripts = '';
6 $tscript = '';
7 $fscripts = '';
8 $temp = $tpl->get_scripts();
9 foreach ($temp as $script){
10 
11  if((!isset($script['footer']) || !$script['footer']) && (strpos($script['url'], 'jquery-latest.js')!==FALSE || strpos($script['url'], 'jquery.min.js')!==FALSE || strpos($script['url'], 'jquery-ui.min.js'))){
12  $tscript .= '<script type="'.$script['type'].'" src="'.$script['url'].'"></script>'."\n";
13  } elseif(!$script['footer']) {
14  $scripts .= '<script type="'.$script['type'].'" src="'.$script['url'].'"></script>'."\n";
15  } else {
16  $fscripts .= '<script type="'.$script['type'].'" src="'.$script['url'].'"></script>'."\n";
17  }
18 }
19 
20 $scripts = $tscript.$scripts;
21 unset($tscript);
22 
23 $styles = '';
24 $fstyles = '';
25 $temp = $tpl->get_styles();
26 foreach ($temp as $style){
27  if($style['footer'])
28  $fstyles .= '<link rel="stylesheet" type="text/css" media="'.$style['media'].'" href="'.$style['url'].'"'.($style['more']!=''?' '.$style['more']:'').' />'."\n";
29  else
30  $styles .= '<link rel="stylesheet" type="text/css" media="'.$style['media'].'" href="'.$style['url'].'"'.($style['more']!=''?' '.$style['more']:'').' />'."\n";
31 }
32 
33 $heads = '';
34 foreach ($tpl->tpl_head as $head){
35  $heads .= $head."\n";
36 }
37 $heads .= $tpl->head_scripts();
38 
39 $metas = $tpl->get_metas();