1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
<?php defined('BASEPATH') or exit('No direct script access allowed');
if (! function_exists('style_tag')) {
function style_tag($styles)
{
$CI =& get_instance();
$base_css_path = base_url() . $CI->config->item('css_path');
$output = '';
foreach ($styles as $style) {
$output .= "<link rel=\"stylesheet\" href=\"".$base_css_path;
$output .= "$style.css\">\n";
}
return $output;
}
}
if (! function_exists('jscript_tag')) {
function jscript_tag($jscripts)
{
$CI =& get_instance();
$base_jscript_path = base_url() . $CI->config->item('jscript_path');
$output = '';
foreach ($jscripts as $jscript) {
$output .= "<script src=\"$base_jscript_path";
$output .= "$jscript.js\" charset=\"utf-8\"></script>\n";
}
return $output;
}
}