コード例 #1
0
/**
 * Global array of current user permissions [read,edit]
 *
 * @global $_RIGHTS array
 */
$_RIGHTS = explode(',', SEC_getUserPermissions());
// Include scripts on behalf of the theme
$func = 'theme_css_' . $_CONF['theme'];
if (function_exists($func)) {
    foreach ($func() as $info) {
        $file = !empty($info['file']) ? $info['file'] : '';
        $name = !empty($info['name']) ? $info['name'] : md5(!empty($file) ? $file : strval(time()));
        $constant = !empty($info['constant']) ? $info['constant'] : true;
        $attributes = !empty($info['attributes']) ? $info['attributes'] : array();
        $priority = !empty($info['priority']) ? $info['priority'] : 100;
        $_SCRIPTS->setCSSFile($name, $file, $constant, $attributes, $priority, 'theme');
    }
}
$func = 'theme_js_libs_' . $_CONF['theme'];
if (function_exists($func)) {
    foreach ($func() as $info) {
        $footer = true;
        if (isset($info['footer']) && !$info['footer']) {
            $footer = false;
        }
        $_SCRIPTS->setJavaScriptLibrary($info['library'], $footer);
    }
}
$func = 'theme_js_files_' . $_CONF['theme'];
if (function_exists($func)) {
    foreach ($func() as $info) {