当前位置: 首页>>代码示例>>PHP>>正文


PHP api_get_css函数代码示例

本文整理汇总了PHP中api_get_css函数的典型用法代码示例。如果您正苦于以下问题:PHP api_get_css函数的具体用法?PHP api_get_css怎么用?PHP api_get_css使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了api_get_css函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: api_get_jquery_libraries_js

/**
 * Returns the jquery library js and css headers
 *
 * @param   array   list of jquery libraries supported jquery-ui, jqgrid
 * @param   bool    add the jquery library
 * @return  string  html tags
 *
 */
function api_get_jquery_libraries_js($libraries)
{
    $js = '';
    $js_path = api_get_path(WEB_LIBRARY_PATH) . 'javascript/';
    //jquery-ui js and css
    if (in_array('jquery-ui', $libraries)) {
        //Jquery ui
        $theme = 'smoothness';
        // Current themes: cupertino, smoothness, ui-lightness. Find the themes folder in main/inc/lib/javascript/jquery-ui
        $jquery_ui_version = '1.8.21';
        //$js .= '<link rel="stylesheet" href="'.$js_path.'jquery-ui/'.$theme.'/jquery-ui-'.$jquery_ui_version.'.custom.css" type="text/css">';
        $js .= api_get_css($js_path . 'jquery-ui/' . $theme . '/jquery-ui-' . $jquery_ui_version . '.custom.css');
        $js .= api_get_js('jquery-ui/' . $theme . '/jquery-ui-' . $jquery_ui_version . '.custom.min.js');
    }
    if (in_array('jquery-ui-i18n', $libraries)) {
        $js .= api_get_js('jquery-ui/jquery-ui-i18n.min.js');
    }
    //jqgrid js and css
    if (in_array('jqgrid', $libraries)) {
        $languaje = 'en';
        $platform_isocode = strtolower(api_get_language_isocode());
        //languages supported by jqgrid see files in main/inc/lib/javascript/jqgrid/js/i18n
        $jqgrid_langs = array('bg', 'bg1251', 'cat', 'cn', 'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'gl', 'he', 'hu', 'is', 'it', 'ja', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru', 'sk', 'sr', 'sv', 'tr', 'ua');
        if (in_array($platform_isocode, $jqgrid_langs)) {
            $languaje = $platform_isocode;
        }
        //$js .= '<link rel="stylesheet" href="'.$js_path.'jqgrid/css/ui.jqgrid.css" type="text/css">';
        $js .= api_get_css($js_path . 'jqgrid/css/ui.jqgrid.css');
        $js .= api_get_js('jqgrid/js/i18n/grid.locale-' . $languaje . '.js');
        $js .= api_get_js('jqgrid/js/jquery.jqGrid.min.js');
    }
    //Document multiple upload funcionality
    if (in_array('jquery-upload', $libraries)) {
        $js .= api_get_js('jquery-upload/jquery.fileupload.js');
        $js .= api_get_js('jquery-upload/jquery.fileupload-ui.js');
        $js .= api_get_css($js_path . 'jquery-upload/jquery.fileupload-ui.css');
    }
    //jquery-ui css changes for Chamilo
    if (in_array('jquery-ui', $libraries)) {
        //Adding default CSS changes of the jquery-ui themes for Chamilo in order to preserve the original jquery-ui css
        $js .= api_get_css($js_path . 'jquery-ui/default.css');
    }
    if (in_array('bxslider', $libraries)) {
        $js .= api_get_js('bxslider/jquery.bxSlider.min.js');
        $js .= api_get_css($js_path . 'bxslider/bx_styles/bx_styles.css');
    }
    // jquery datepicker
    if (in_array('datepicker', $libraries)) {
        $languaje = 'en-GB';
        $platform_isocode = strtolower(api_get_language_isocode());
        // languages supported by jqgrid see files in main/inc/lib/javascript/jqgrid/js/i18n
        $datapicker_langs = array('af', 'ar', 'ar-DZ', 'az', 'bg', 'bs', 'ca', 'cs', 'cy-GB', 'da', 'de', 'el', 'en-AU', 'en-GB', 'en-NZ', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fo', 'fr', 'fr-CH', 'gl', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'is', 'it', 'ja', 'ka', 'kk', 'km', 'ko', 'lb', 'lt', 'lv', 'mk', 'ml', 'ms', 'nl', 'nl-BE', 'no', 'pl', 'pt', 'pt-BR', 'rm', 'ro', 'ru', 'sk', 'sl', 'sq', 'sr', 'sr-SR', 'sv', 'ta', 'th', 'tj', 'tr', 'uk', 'vi', 'zh-CN', 'zh-HK', 'zh-TW');
        if (in_array($platform_isocode, $datapicker_langs)) {
            $languaje = $platform_isocode;
        }
        $js .= api_get_js('jquery-ui/jquery-ui-i18n.min.js');
        $script = '<script>
        $(function(){
            $.datepicker.setDefaults($.datepicker.regional["' . $languaje . '"]);
            $.datepicker.regional["local"] = $.datepicker.regional["' . $languaje . '"];
        });
        </script>
        ';
        $js .= $script;
    }
    return $js;
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:75,代码来源:main_api.lib.php

示例2: setCssCustomFiles

 /**
  * Prepare custom CSS to be added at the very end of the <head> section
  * @return void
  * @see setCssFiles() for the mainstream CSS files
  */
 public function setCssCustomFiles()
 {
     global $disable_js_and_css_files;
     // Base CSS
     $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH) . 'base.css');
     if ($this->show_learnpath) {
         $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH) . 'scorm.css');
         if (is_file(api_get_path(SYS_CSS_PATH) . 'themes/' . $this->theme . '/learnpath.css')) {
             $css[] = api_get_path(WEB_CSS_PATH) . 'themes/' . $this->theme . '/learnpath.css';
         }
     }
     $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH) . 'themes/' . $this->theme . '/default.css');
     $css_file_to_string = null;
     foreach ($css as $file) {
         $css_file_to_string .= api_get_css($file);
     }
     // @todo move this somewhere else. Special fix when using tablets in order to see the text near icons
     if (SHOW_TEXT_NEAR_ICONS == true) {
         //hack in order to fix the actions buttons
         $css_file_to_string .= '<style>
             .td_actions a {
                 float:left;
                 width:100%;
             }
             .forum_message_left a {
                 float:left;
                 width:100%;
             }
             </style>';
     }
     $navigator_info = api_get_navigator();
     if ($navigator_info['name'] == 'Internet Explorer' && $navigator_info['version'] == '6') {
         $css_file_to_string .= 'img, div { behavior: url(' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/iepngfix/iepngfix.htc) } ' . "\n";
     }
     if (!$disable_js_and_css_files) {
         $this->assign('css_custom_file_to_string', $css_file_to_string);
         $style_print = '';
         if (is_readable(api_get_path(SYS_CSS_PATH) . $this->theme . '/print.css')) {
             $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH) . $this->theme . '/print.css'), 'print');
         }
         $this->assign('css_style_print', $style_print);
     }
     // Logo
     $logo = return_logo($this->theme);
     $this->assign('logo', $logo);
     $this->assign('show_media_element', 1);
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:52,代码来源:template.lib.php

示例3: api_get_item_visibility

}
//Checking visibility (eye icon)
$visibility = api_get_item_visibility(api_get_course_info(), TOOL_LEARNPATH, $lp_id, $action, api_get_user_id(), api_get_session_id());
if (!api_is_allowed_to_edit(null, true) && intval($visibility) == 0) {
    api_not_allowed();
}
if (empty($_SESSION['oLP'])) {
    api_not_allowed(true);
}
$debug = 0;
if ($debug) {
    error_log('------ Entering lp_impress.php -------');
}
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH) . 'javascript/impress/impress-demo.css');
$list = $_SESSION['oLP']->get_toc();
$is_allowed_to_edit = api_is_allowed_to_edit(null, true, false, false);
if ($is_allowed_to_edit) {
    echo '<div style="position: fixed; top: 0px; left: 0px; pointer-events: auto;width:100%">';
    global $interbreadcrumb;
    $interbreadcrumb[] = array('url' => 'lp_controller.php?action=list&isStudentView=false', 'name' => get_lang('LearningPaths'));
    $interbreadcrumb[] = array('url' => api_get_self() . "?action=add_item&type=step&lp_id=" . $_SESSION['oLP']->lp_id . "&isStudentView=false", 'name' => $_SESSION['oLP']->get_name());
    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Preview'));
    echo return_breadcrumb($interbreadcrumb, null, null);
    echo '</div>';
}
$html = '';
$step = 1;
foreach ($list as $toc) {
    $x = 1000 * $step;
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:lp_impress.php

示例4: api_get_js

            $(window).resize(resizeIframe());
        });
    </script>';
}
// Activate code highlight.
$isChatFolder = false;
if (isset($document_data['parents']) && isset($document_data['parents'][0])) {
    $chatFolder = $document_data['parents'][0];
    if (isset($chatFolder['path']) && $chatFolder['path'] == '/chat_files') {
        $isChatFolder = true;
    }
}
if ($isChatFolder) {
    $htmlHeadXtra[] = api_get_js('js/highlight/highlight.pack.js');
    $htmlHeadXtra[] = api_get_css('css/chat.css');
    $htmlHeadXtra[] = api_get_css('js/highlight/styles/github.css');
    $htmlHeadXtra[] = '
    <script>
        hljs.initHighlightingOnLoad();
    </script>';
}
$execute_iframe = true;
if ($jplayer_supported) {
    $extension = api_strtolower($pathinfo['extension']);
    $js_path = api_get_path(WEB_LIBRARY_PATH) . 'javascript/';
    $htmlHeadXtra[] = '<link rel="stylesheet" href="' . $js_path . 'jquery-jplayer/skins/blue/jplayer.blue.monday.css" type="text/css">';
    $htmlHeadXtra[] = '<script type="text/javascript" src="' . $js_path . 'jquery-jplayer/jquery.jplayer.min.js"></script>';
    $jquery = ' $("#jquery_jplayer_1").jPlayer({
                    ready: function() {
                        $(this).jPlayer("setMedia", {
                            ' . $extension . ' : "' . $document_data['direct_url'] . '"
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:showinframes.php

示例5: header

if (!$objExercise) {
    //Redirect to the exercise overview
    //Check if the exe_id exists
    header("Location: overview.php?exerciseId=" . $exerciseId);
    exit;
}
$time_control = false;
$clock_expired_time = ExerciseLib::get_session_time_control_key($objExercise->id, $learnpath_id, $learnpath_item_id);
if ($objExercise->expired_time != 0 && !empty($clock_expired_time)) {
    $time_control = true;
}
if ($time_control) {
    // Get time left for exipiring time
    $time_left = api_strtotime($clock_expired_time, 'UTC') - time();
    $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH) . 'javascript/epiclock/stylesheet/jquery.epiclock.css');
    $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH) . 'javascript/epiclock/renderers/minute/epiclock.minute.css');
    $htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js');
    $htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js');
    $htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js');
    $htmlHeadXtra[] = $objExercise->show_time_control_js($time_left);
}
$exe_id = intval(Session::read('exe_id'));
$exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exe_id);
if (!empty($exercise_stat_info['data_tracking'])) {
    $question_list = explode(',', $exercise_stat_info['data_tracking']);
}
if (empty($exercise_stat_info) || empty($question_list)) {
    api_not_allowed();
}
$nameTools = get_lang('Exercises');
$interbreadcrumb[] = array("url" => "exercise.php?" . api_get_cidreq(), "name" => get_lang('Exercises'));
开发者ID:secuencia24,项目名称:chamilo-lms,代码行数:31,代码来源:exercise_reminder.php

示例6: api_not_allowed

*/
use Chamilo\UserBundle\Entity\User;
use ChamiloSession as Session;
$cidReset = true;
if (api_get_setting('social.allow_social_tool') == 'true') {
    $this_section = SECTION_SOCIAL;
} else {
    $this_section = SECTION_MYPROFILE;
}
//$htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1');
$_SESSION['this_section'] = $this_section;
if (!(isset($_user['user_id']) && $_user['user_id']) || api_is_anonymous($_user['user_id'], true)) {
    api_not_allowed(true);
}
$htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1');
$htmlHeadXtra[] = api_get_css('components/cropper/dist/cropper.min.css');
$htmlHeadXtra[] = api_get_js('components/cropper/dist/cropper.min.js');
$htmlHeadXtra[] = '<script>
$(document).ready(function() {
    var $image = $("#previewImage");
    var $input = $("[name=\'cropResult\']");
    var $cropButton = $("#cropButton");
    var canvas = "";
    var imageWidth = "";
    var imageHeight = "";

    $("input:file").change(function() {
        var oFReader = new FileReader();
        oFReader.readAsDataURL(document.getElementById("picture_form").files[0]);

        oFReader.onload = function (oFREvent) {
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:profile.php

示例7: api_get_jquery_libraries_js

/**
 * Returns the jquery library js and css headers
 *
 * @param   array   list of jquery libraries supported jquery-ui, jqgrid
 * @param   bool    add the jquery library
 * @return  string  html tags
 *
 */
function api_get_jquery_libraries_js($libraries)
{
    $js = '';
    //jqgrid js and css
    if (in_array('jqgrid', $libraries)) {
        $languaje = 'en';
        $platform_isocode = strtolower(api_get_language_isocode());
        //languages supported by jqgrid see files in main/inc/lib/javascript/jqgrid/js/i18n
        $jqgrid_langs = array('bg', 'bg1251', 'cat', 'cn', 'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'gl', 'he', 'hu', 'is', 'it', 'ja', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru', 'sk', 'sr', 'sv', 'tr', 'ua');
        if (in_array($platform_isocode, $jqgrid_langs)) {
            $languaje = $platform_isocode;
        }
        //$js .= '<link rel="stylesheet" href="'.$js_path.'jqgrid/css/ui.jqgrid.css" type="text/css">';
        $js .= api_get_css('components/jqgrid/css/ui.jqgrid.css');
        $js .= api_get_css('components/jqgrid/js/i18n/grid.locale-' . $languaje . '.js');
        $js .= api_get_js('components/jqgrid/js/minified/jquery.jqGrid.min.js');
    }
    //Document multiple upload funcionality
    /*    if (in_array('jquery-upload', $libraries)) {
              $js .= api_get_js('jquery-upload/jquery.fileupload.js');
              $js .= api_get_js('jquery-upload/jquery.fileupload-ui.js');
              $js .= api_get_css($js_path.'jquery-upload/jquery.fileupload-ui.css');
          }*/
    // jquery datepicker
    if (in_array('datepicker', $libraries)) {
        $languaje = 'en-GB';
        $platform_isocode = strtolower(api_get_language_isocode());
        // languages supported by jqgrid see files in main/inc/lib/javascript/jqgrid/js/i18n
        $datapicker_langs = array('af', 'ar', 'ar-DZ', 'az', 'bg', 'bs', 'ca', 'cs', 'cy-GB', 'da', 'de', 'el', 'en-AU', 'en-GB', 'en-NZ', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fo', 'fr', 'fr-CH', 'gl', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'is', 'it', 'ja', 'ka', 'kk', 'km', 'ko', 'lb', 'lt', 'lv', 'mk', 'ml', 'ms', 'nl', 'nl-BE', 'no', 'pl', 'pt', 'pt-BR', 'rm', 'ro', 'ru', 'sk', 'sl', 'sq', 'sr', 'sr-SR', 'sv', 'ta', 'th', 'tj', 'tr', 'uk', 'vi', 'zh-CN', 'zh-HK', 'zh-TW');
        if (in_array($platform_isocode, $datapicker_langs)) {
            $languaje = $platform_isocode;
        }
        $js .= api_get_js('components/jquery-ui/jquery-ui-i18n.min.js');
        $script = '<script>
        $(function(){
            $.datepicker.setDefaults($.datepicker.regional["' . $languaje . '"]);
            $.datepicker.regional["local"] = $.datepicker.regional["' . $languaje . '"];
        });
        </script>
        ';
        $js .= $script;
    }
    return $js;
}
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:52,代码来源:api.lib.php

示例8: parseResources

 /**
  * @return string
  */
 public function parseResources()
 {
     $resourceToString = null;
     foreach ($this->resources as $type => $resources) {
         switch ($type) {
             case 'js':
                 if ($this->disableJsAndCss == false) {
                     foreach ($resources as $resource) {
                         //$resourceToString .= api_get_js_simple($resource);
                     }
                 }
                 break;
             case 'css':
                 if ($this->disableJsAndCss == false) {
                     foreach ($resources as $resource) {
                         $resourceToString .= api_get_css($resource);
                     }
                 }
                 break;
             case 'string':
                 if ($this->disableJsAndCss == false) {
                     foreach ($resources as $resource) {
                         $resourceToString .= $resource;
                     }
                 }
                 break;
             case 'no_js_css':
                 foreach ($resources as $resource) {
                     $resourceToString .= $resource;
                 }
                 break;
         }
     }
     $this->assign('resources', $resourceToString);
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:38,代码来源:Template.php

示例9: toHtml

    /**
     * The ajax call must contain an array of id and text
     * @return string
     */
    function toHtml()
    {
        $html = api_get_asset('select2/dist/js/select2.min.js');
        $iso = api_get_language_isocode(api_get_interface_language());
        $languageCondition = '';
        if (file_exists(api_get_path(SYS_PATH) . "web/assets/select2/dist/js/i18n/{$iso}.js")) {
            $html .= api_get_asset("select2/dist/js/i18n/{$iso}.js");
            $languageCondition = "language: '{$iso}',";
        }
        $html .= api_get_css(api_get_path(WEB_PATH) . 'web/assets/select2/dist/css/select2.min.css');
        $formatResult = $this->getAttribute('formatResult');
        $formatCondition = null;
        if (!empty($formatResult)) {
            $formatCondition = ',
                templateResult : ' . $formatResult . ',
                templateSelection : ' . $formatResult;
        }
        $width = 'element';
        $givenWidth = '100%';
        if (!empty($givenWidth)) {
            $width = $givenWidth;
        }
        //Get the minimumInputLength for select2
        $minimumInputLength = $this->getAttribute('minimumInputLength') > 3 ? $this->getAttribute('minimumInputLength') : 3;
        $plHolder = $this->getAttribute('placeholder');
        if (empty($plHolder)) {
            $plHolder = get_lang('SelectAnOption');
        }
        $id = $this->getAttribute('id');
        if (empty($id)) {
            $id = $this->getAttribute('name');
            $this->setAttribute('id', $id);
        }
        $html .= <<<JS
            <script>
                \$(function(){
                    \$('#{$this->getAttribute('id')}').select2({
                        {$languageCondition}
                        placeholder: '{$plHolder}',
                        allowClear: true,
                        width: '{$width}',
                        minimumInputLength: '{$minimumInputLength}',
                        ajax: {
                            url: '{$this->getAttribute('url')}',
                            dataType: 'json',
                            data: function(params) {
                                return {
                                    q: params.term, // search term
                                    page_limit: 10,
                                };
                            },
                            processResults: function (data, page) {
                                //parse the results into the format expected by Select2
                                return {
                                    results: data.items
                                };
                            }
                            {$formatCondition}
                        }
                    });
                });
            </script>
JS;
        $this->removeAttribute('formatResult');
        $this->removeAttribute('minimumInputLength');
        $this->removeAttribute('placeholder');
        $this->removeAttribute('class');
        $this->removeAttribute('url');
        $this->setAttribute('style', 'width: 100%;');
        return parent::toHtml() . $html;
    }
开发者ID:secuencia24,项目名称:chamilo-lms,代码行数:75,代码来源:SelectAjax.php

示例10: setCssFiles

 /**
  * Set theme, include CSS files
  */
 private function setCssFiles()
 {
     global $disable_js_and_css_files;
     $css = array();
     $this->theme = api_get_visual_theme();
     if (isset($_POST['style']) && api_is_platform_admin()) {
         $this->preview_theme = $_POST['style'];
     }
     if (!empty($this->preview_theme)) {
         $this->theme = $this->preview_theme;
     }
     $this->app['theme'] = $this->theme;
     $cssPath = api_get_path(WEB_CSS_PATH);
     // Loads only 1 css file
     if ($this->app['assetic.enabled']) {
         $css[] = api_get_path(WEB_PUBLIC_PATH) . 'css/' . $this->theme . '/style.css';
     } else {
         // Bootstrap
         $css[] = api_get_cdn_path(api_get_path(WEB_LIBRARY_PATH) . 'javascript/bootstrap/css/bootstrap.css');
         //$css[] = api_get_cdn_path(api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap/css/bootstrap-theme.css');
         // Base CSS.
         $css[] = api_get_cdn_path($cssPath . 'base.css');
         // Default theme CSS.
         $css[] = api_get_cdn_path($cssPath . $this->theme . '/default.css');
         // Extra CSS files.
         if ($this->show_learnpath) {
             //$css[] = $cssPath.$this->theme.'/learnpath.css';
             //$css[] = $cssPath.$this->theme.'/scorm.css';
         }
         if (api_is_global_chat_enabled()) {
             $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chat/css/chat.css';
         }
         $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/jquery-ui/css/' . $this->jquery_ui_theme . '/jquery-ui-custom.css';
         //$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/default.css';
     }
     $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/font-awesome/css/font-awesome.css';
     $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/thickbox.css';
     $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chosen/chosen.css';
     $css_file_to_string = null;
     foreach ($css as $file) {
         $css_file_to_string .= api_get_css($file);
     }
     // @todo move this somewhere else. Special fix when using tablets in order to see the text near icons
     if (SHOW_TEXT_NEAR_ICONS == true) {
         //hack in order to fix the actions buttons
         $css_file_to_string .= '<style>
             .td_actions a {
                 float:left;
                 width:100%;
             }
             .forum_message_left a {
                 float:left;
                 width:100%;
             }
             </style>';
     }
     $navigator_info = api_get_navigator();
     if ($navigator_info['name'] == 'Internet Explorer' && $navigator_info['version'] == '6') {
         $css_file_to_string .= 'img, div { behavior: url(' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/iepngfix/iepngfix.htc) } ' . "\n";
     }
     if (!$disable_js_and_css_files) {
         $this->assign('css_file_to_string', $css_file_to_string);
         $style_print = api_get_css(api_get_cdn_path($cssPath . $this->theme . '/print.css'), 'print');
         $this->assign('css_style_print', $style_print);
     }
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:69,代码来源:template.lib.php

示例11: array

/**
 * Init
 */
$language_file = array('document');
//require_once '../inc/global.inc.php';
if (!api_is_allowed_to_edit(null, true)) {
    api_not_allowed(true);
}
$current_course_tool = TOOL_DOCUMENT;
$this_section = SECTION_COURSES;
$tool_name = get_lang('DocumentQuota');
$interbreadcrumb[] = array('url' => 'document.php', 'name' => get_lang('Documents'));
$htmlHeadXtra[] = api_get_js('jqplot/jquery.jqplot.min.js');
$htmlHeadXtra[] = api_get_js('jqplot/plugins/jqplot.pieRenderer.min.js');
$htmlHeadXtra[] = api_get_js('jqplot/plugins/jqplot.donutRenderer.min.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH) . 'jqplot/jquery.jqplot.min.css');
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();
$session_id = api_get_session_id();
$group_id = api_get_group_id();
$user_id = api_get_user_id();
$user_info = api_get_user_info($user_id);
$session = array();
$user_name = $user_info['complete_name'];
$course_list = SessionManager::get_course_list_by_session_id($session_id);
$session_list = SessionManager::get_session_by_course($course_id);
$total_quota_bytes = DocumentManager::get_course_quota();
$quota_bytes = DocumentManager::documents_total_space($course_id, 0, 0);
$quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100;
$session[] = array(get_lang('Course') . ' (' . Text::format_file_size($quota_bytes) . ')', $quota_percentage);
$used_quota_bytes = $quota_bytes;
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:document_quota.php

示例12: api_get_item_visibility

//Checking visibility (eye icon)
$visibility = api_get_item_visibility(api_get_course_info(), TOOL_LEARNPATH, $lp_id, $action, api_get_user_id(), api_get_session_id());
if (!api_is_allowed_to_edit(null, true) && intval($visibility) == 0) {
    api_not_allowed();
}
$learnPath = learnpath::getCurrentLpFromSession();
if (empty($learnPath)) {
    api_not_allowed(true);
}
$debug = 0;
if ($debug) {
    error_log('------ Entering lp_impress.php -------');
}
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH) . 'impress/impress-demo.css');
$list = $learnPath->get_toc();
$is_allowed_to_edit = api_is_allowed_to_edit(null, true, false, false);
if ($is_allowed_to_edit) {
    echo '<div style="position: fixed; top: 0px; left: 0px; pointer-events: auto;width:100%">';
    global $interbreadcrumb;
    $interbreadcrumb[] = array('url' => 'lp_controller.php?action=list&isStudentView=false', 'name' => get_lang('LearningPaths'));
    $interbreadcrumb[] = array('url' => api_get_self() . "?action=add_item&type=step&lp_id=" . $learnPath->lp_id . "&isStudentView=false", 'name' => $learnPath->get_name());
    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Preview'));
    echo return_breadcrumb($interbreadcrumb, null, null);
    echo '</div>';
}
$html = '';
$step = 1;
foreach ($list as $toc) {
    $x = 1000 * $step;
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:lp_impress.php

示例13: loginAction

 /**
  * @param Application $app
  * @return Response
  */
 public function loginAction(Application $app)
 {
     $request = $this->getRequest();
     $app['template']->assign('error', $app['security.last_error']($request));
     $extra = array();
     if (api_get_setting('use_virtual_keyboard') == 'true') {
         $extra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH) . 'javascript/keyboard/keyboard.css');
         $extra[] = api_get_js('keyboard/jquery.keyboard.js');
     }
     $app['extraJS'] = $extra;
     $response = $app['template']->render_template('auth/login.tpl');
     return new Response($response, 200, array('Cache-Control' => 's-maxage=3600, public'));
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:17,代码来源:IndexController.php

示例14: api_not_allowed

/**
 * Document quota management script
 * @package chamilo.document
 */
//require_once '../inc/global.inc.php';
if (!api_is_allowed_to_edit(null, true)) {
    api_not_allowed(true);
}
$current_course_tool = TOOL_DOCUMENT;
$this_section = SECTION_COURSES;
$tool_name = get_lang('DocumentQuota');
$interbreadcrumb[] = array('url' => 'document.php', 'name' => get_lang('Documents'));
$htmlHeadXtra[] = api_get_js('js/jqplot/jquery.jqplot.js');
$htmlHeadXtra[] = api_get_js('js/jqplot/plugins/jqplot.pieRenderer.js');
$htmlHeadXtra[] = api_get_js('js/jqplot/plugins/jqplot.donutRenderer.js');
$htmlHeadXtra[] = api_get_css('js/jqplot/jquery.jqplot.css');
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();
$session_id = api_get_session_id();
$group_id = api_get_group_id();
$user_id = api_get_user_id();
$user_info = api_get_user_info($user_id);
$session = array();
$user_name = $user_info['complete_name'];
$course_list = SessionManager::get_course_list_by_session_id($session_id);
$session_list = SessionManager::get_session_by_course($course_id);
$total_quota_bytes = DocumentManager::get_course_quota();
$quota_bytes = DocumentManager::documents_total_space($course_id, 0, 0);
$quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100;
$session[] = array(get_lang('Course') . ' (' . format_file_size($quota_bytes) . ')', $quota_percentage);
$used_quota_bytes = $quota_bytes;
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:document_quota.php

示例15: array

/* For licensing terms, see /license.txt */
/**
	@author Julio Montoya <gugli100@gmail.com> BeezNest 2011
*	@package chamilo.timeline
*/
//require_once '../inc/global.inc.php';
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Timeline'));
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Listing'));
$timeline = new Timeline();
if (empty($_GET['id'])) {
    api_not_allowed();
}
$url = $timeline->get_url($_GET['id']);
$item = $timeline->get($_GET['id']);
$interbreadcrumb[] = array('url' => '#', 'name' => $item['headline']);
$htmlHeadXtra[] = api_get_css('js/timeline/timeline.css');
$htmlHeadXtra[] = api_get_js('js/timeline/timeline-min.js');
$htmlHeadXtra[] = '
<script>
	$(document).ready(function() {
		var timeline = new VMM.Timeline();
		timeline.init("' . $url . '");
	});
</script>';
$content = '<div class="timeline-example"><div id="timeline"></div></div>';
$tpl = new Template($tool_name);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:30,代码来源:view.php


注:本文中的api_get_css函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。