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


PHP require_css函数代码示例

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


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

示例1: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     require_lang('chat');
     require_css('side_blocks');
     $room_id = array_key_exists('param', $map) ? intval($map['param']) : NULL;
     $num_messages = array_key_exists('max', $map) ? intval($map['max']) : 5;
     if (is_null($room_id)) {
         $room_id = $GLOBALS['SITE_DB']->query_value_null_ok('chat_rooms', 'MIN(id)', array('is_im' => 0));
         if (is_null($room_id)) {
             return new ocp_tempcode();
         }
     }
     $room_check = $GLOBALS['SITE_DB']->query_select('chat_rooms', array('*'), array('id' => $room_id), '', 1);
     if (!array_key_exists(0, $room_check)) {
         return new ocp_tempcode();
     }
     require_code('chat');
     if (!check_chatroom_access($room_check[0], true)) {
         global $DO_NOT_CACHE_THIS;
         // We don't cache against access, so we have a problem and can't cache
         $DO_NOT_CACHE_THIS = true;
         return new ocp_tempcode();
     }
     $content = NULL;
     if (get_value('no_frames') === '1') {
         $content = shoutbox_script(true, $room_id, $num_messages);
     }
     return do_template('BLOCK_SIDE_SHOUTBOX_IFRAME', array('CONTENT' => $content, 'ROOM_ID' => strval($room_id), 'NUM_MESSAGES' => strval($num_messages)));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:35,代码来源:side_shoutbox.php

示例2: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     if (get_forum_type() != 'ocf') {
         warn_exit(do_lang_tempcode('NO_OCF'));
     } else {
         ocf_require_all_forum_stuff();
     }
     require_code('ocf_forumview');
     if (is_guest()) {
         access_denied('NOT_AS_GUEST');
     }
     require_css('ocf');
     $type = get_param('type', 'misc');
     if ($type == 'misc') {
         list($title, $content) = $this->new_posts();
     } elseif ($type == 'unread') {
         list($title, $content) = $this->unread_topics();
     } elseif ($type == 'recently_read') {
         list($title, $content) = $this->recently_read();
     } else {
         $title = new ocp_tempcode();
         $content = new ocp_tempcode();
     }
     $ret = ocf_wrapper($title, do_template('OCF_VFORUM', array('_GUID' => '8dca548982d65500ab1800ceec2ddc61', 'CONTENT' => $content)));
     return $ret;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:31,代码来源:vforums.php

示例3: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_javascript('javascript_realtime_rain');
     require_javascript('javascript_ajax');
     require_javascript('javascript_more');
     require_lang('realtime_rain');
     require_css('realtime_rain');
     $title = get_page_title('REALTIME_RAIN');
     if (!has_js()) {
         // Send them to the page permissions screen
         $url = build_url(array('page' => 'admin_stats', 'type' => 'misc'), '_SELF');
         require_code('site2');
         assign_refresh($url, 5.0);
         return do_template('REDIRECT_SCREEN', array('URL' => $url, 'TITLE' => $title, 'TEXT' => do_lang_tempcode('NO_JS_REALTIME')));
     }
     $GLOBALS['TEMPCODE_SETGET']['chrome_frame'] = make_string_tempcode('1');
     if (browser_matches('ie6')) {
         attach_message(do_lang_tempcode('IE_OLD_PLEASE_UPGRADE'), 'warn');
     }
     if (!has_js()) {
         // Send them to the stats screen
         $url = build_url(array('page' => 'admin_stats', 'type' => 'misc'), '_SELF');
         require_code('site2');
         assign_refresh($url, 5.0);
         return do_template('REDIRECT_SCREEN', array('URL' => $url, 'TITLE' => $title, 'TEXT' => do_lang_tempcode('NO_JS_ADVANCED_SCREEN_REALTIME_RAIN')));
     }
     $min_time = $GLOBALS['SITE_DB']->query_value('stats', 'MIN(date_and_time)');
     if (is_null($min_time)) {
         $min_time = time();
     }
     return do_template('REALTIME_RAIN_OVERLAY', array('MIN_TIME' => strval($min_time)));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:37,代码来源:admin_realtime_rain.php

示例4: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     require_code('downloads');
     require_css('downloads');
     require_lang('downloads');
     $zone = array_key_exists('zone', $map) ? $map['zone'] : get_module_zone('downloads');
     global $NON_CANONICAL_PARAMS;
     $NON_CANONICAL_PARAMS[] = 'max';
     $max = get_param_integer('max', 10);
     if ($max < 1) {
         $max = 1;
     }
     $start = get_param_integer('start', 0);
     $rows = $GLOBALS['SITE_DB']->query_select('download_downloads', array('*'), array('validated' => 1), 'ORDER BY num_downloads DESC', $max, $start);
     $content = new ocp_tempcode();
     foreach ($rows as $i => $row) {
         if ($i != 0) {
             $content->attach(do_template('BLOCK_SEPARATOR'));
         }
         $content->attach(get_download_html($row, true, true, $zone));
     }
     $page_num = intval(floor(floatval($start) / floatval($max))) + 1;
     $count = $GLOBALS['SITE_DB']->query_value('download_downloads', 'COUNT(*)', array('validated' => 1));
     $num_pages = intval(ceil(floatval($count) / floatval($max)));
     if ($num_pages == 0) {
         $page_num = 0;
     }
     $previous_url = $start == 0 ? new ocp_tempcode() : build_url(array('page' => '_SELF', 'start' => $start - $max), '_SELF');
     $next_url = $page_num == $num_pages ? new ocp_tempcode() : build_url(array('page' => '_SELF', 'start' => $start + $max), '_SELF');
     $browse = do_template('NEXT_BROWSER_BROWSE_NEXT', array('_GUID' => '15ca70ec400629f67edefa869fb1f1a8', 'NEXT_LINK' => $next_url, 'PREVIOUS_LINK' => $previous_url, 'PAGE_NUM' => integer_format($page_num), 'NUM_PAGES' => integer_format($num_pages)));
     return do_template('BLOCK_MAIN_DOWNLOAD_TEASE', array('_GUID' => 'a164e33c0b4ace4bae945c39f2f00ca9', 'CONTENT' => $content, 'BROWSE' => $browse));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:main_download_tease.php

示例5: display_init

 /**
  * Get ready for displaying the skin.
  *
  * This may register some CSS or JS...
  */
 function display_init()
 {
     // call parent:
     parent::display_init();
     // Add CSS:
     require_css('basic_styles.css', 'blog');
     // the REAL basic styles
     require_css('basic.css', 'blog');
     // Basic styles
     require_css('blog_base.css', 'blog');
     // Default styles for the blog navigation
     require_css('item_base.css', 'blog');
     // Default styles for the post CONTENT
     require_js('ajax.js', 'blog');
     require_js('functions.js');
     require_js('rollovers.js');
     // Make sure standard CSS is called ahead of custom CSS generated below:
     require_css('style.css', 'relative');
     // Width switch styles
     add_headline('<link rel="stylesheet" href="style.css" type="text/css" title="fixed"/>');
     add_headline('<link rel="alternate stylesheet" href="fluid.css" type="text/css" title="fluid"/>');
     add_headline('<script type="text/javascript" src="rsc/js/styleswitcher.js"></script>');
     // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images:
     if ($this->get_setting("colorbox")) {
         require_js_helper('colorbox', 'blog');
     }
 }
开发者ID:b2evolution,项目名称:grey_skale_skin,代码行数:32,代码来源:_skin.class.php

示例6: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     unset($map);
     require_css('side_blocks');
     $langs = nice_get_langs(user_lang());
     return do_template('BLOCK_SIDE_LANGUAGE', array('_GUID' => '5dd7dd434722d7fd958773bd08e838c7', 'LANGS' => $langs));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:13,代码来源:side_language.php

示例7: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     global $NON_CANONICAL_PARAMS;
     $NON_CANONICAL_PARAMS[] = 'max';
     $category_id = array_key_exists('param', $map) ? intval($map['param']) : db_get_first_id();
     $max = get_param_integer('max', array_key_exists('max', $map) ? intval($map['max']) : 30);
     $start = get_param_integer('start', 0);
     $root = array_key_exists('root', $map) && $map['root'] != '' ? intval($map['root']) : get_param_integer('root', NULL);
     $sort = array_key_exists('sort', $map) ? $map['sort'] : '';
     $search = array_key_exists('search', $map) ? $map['search'] : '';
     require_lang('catalogues');
     require_code('catalogues');
     require_code('feedback');
     require_css('catalogues');
     $select = NULL;
     if (!is_null($map) && array_key_exists('select', $map)) {
         require_code('ocfiltering');
         $select = ocfilter_to_sqlfragment($map['select'], 'e.id', 'catalogue_categories', 'cc_parent_id', 'cc_id', 'id');
     }
     $categories = $GLOBALS['SITE_DB']->query_select('catalogue_categories', array('*'), array('id' => $category_id), '', 1);
     if (!array_key_exists(0, $categories)) {
         return do_lang_tempcode('MISSING_RESOURCE');
     }
     $category = $categories[0];
     $catalogue_name = $category['c_name'];
     $catalogues = $GLOBALS['SITE_DB']->query_select('catalogues', array('*'), array('c_name' => $catalogue_name), '', 1);
     $catalogue = $catalogues[0];
     $tpl_set = array_key_exists('template_set', $map) ? $map['template_set'] : $catalogue_name;
     $display_type = array_key_exists('display_type', $map) ? intval($map['display_type']) : NULL;
     list($entry_buildup, , , ) = get_catalogue_category_entry_buildup(is_null($select) ? $category_id : NULL, $catalogue_name, $catalogue, 'CATEGORY', $tpl_set, $max, $start, $select, $root, $display_type, true, NULL, $search, $sort);
     return do_template('CATALOGUE_' . $tpl_set . '_CATEGORY_EMBED', array('ROOT' => strval($root), 'CATALOGUE' => $catalogue_name, 'ENTRIES' => $entry_buildup), NULL, false, 'CATALOGUE_DEFAULT_CATEGORY_EMBED');
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:main_cc_embed.php

示例8: display_init

 /**
  * Get ready for displaying the skin.
  *
  * This may register some CSS or JS...
  */
 function display_init()
 {
     // call parent:
     parent::display_init();
     // We pass NO params. This gives up the default Skins API v5 behavior.
     require_css('item.css', 'relative');
 }
开发者ID:b2evolution,项目名称:evocamp_skin,代码行数:12,代码来源:_skin.class.php

示例9: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     require_code('type_validation');
     require_lang('phpdoc');
     require_code('php');
     require_css('adminzone');
     disable_php_memory_limit();
     $filename = (array_key_exists('param', $map) ? $map['param'] : 'sources/global2') . '.php';
     if (substr($filename, -8) == '.php.php') {
         $filename = substr($filename, 0, strlen($filename) - 4);
     }
     $full_path = (get_file_base() != '' ? get_file_base() . '/' : '') . filter_naughty($filename);
     if (!file_exists($full_path)) {
         return paragraph(do_lang_tempcode('MISSING_RESOURCE'));
     }
     $_classes = get_php_file_api($filename);
     $classes = new ocp_tempcode();
     foreach ($_classes as $class) {
         if ($class['name'] == '__global') {
             $class['name'] = do_lang('GLOBAL_FUNCTIONS') . '_' . basename($filename);
         }
         $function_summaries = new ocp_tempcode();
         $functions = new ocp_tempcode();
         foreach ($class['functions'] as $function) {
             $ret = render_php_function($function, $class);
             $functions->attach($ret[0]);
             $function_summaries->attach($ret[1]);
         }
         $classes->attach(do_template('PHP_CLASS', array('_GUID' => '5d58fc42c5fd3a5dd190f3f3699610c2', 'CLASS_NAME' => $class['name'], 'FUNCTION_SUMMARIES' => $function_summaries, 'FUNCTIONS' => $functions)));
     }
     return do_template('PHP_FILE', array('_GUID' => '6f422e6a6e846d49864d7325b212109f', 'FILENAME' => $filename, 'CLASSES' => $classes));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:main_code_documentor.php

示例10: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     $type = get_param('type', 'misc');
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/cedi';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_cedi';
     require_code('cedi');
     require_lang('cedi');
     require_css('cedi');
     // Decide what to do
     if ($type == 'misc') {
         return $this->misc();
     }
     if ($type == 'choose_page_to_edit') {
         return $this->choose_page_to_edit();
     }
     if ($type == 'add_page') {
         return $this->add_page();
     }
     if ($type == '_add_page') {
         return $this->_add_page();
     }
     if ($type == 'edit_page') {
         return $this->edit_page();
     }
     if ($type == '_edit_page') {
         return $this->_edit_page();
     }
     if ($type == 'edit_tree') {
         return $this->edit_tree();
     }
     if ($type == '_edit_tree') {
         return $this->_edit_tree();
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:40,代码来源:cms_cedi.php

示例11: run_start

 /**
  * Standard aed_module run_start.
  *
  * @param  ID_TEXT		The type of module execution
  * @return tempcode		The output of the run
  */
 function run_start($type)
 {
     $this->cat_aed_module = new Module_cms_calendar_cat();
     $this->javascript = "\n\t\t\tvar form=document.getElementById('recurrence_pattern').form;\n\t\t\tvar crf=function() {\n\t\t\t\tvar s=(form.elements['recurrence'][0].checked);\n\t\t\t\tif (form.elements['recurrence_pattern']) form.elements['recurrence_pattern'].disabled=s;\n\t\t\t\tif (form.elements['recurrences']) form.elements['recurrences'].disabled=s;\n\t\t\t\tif (form.elements['seg_recurrences']) form.elements['seg_recurrences'].disabled=s;\n\t\t\t};\n\t\t\tcrf();\n\t\t\tfor (var i=0;i<form.elements['recurrence'].length;i++) form.elements['recurrence'][i].onclick=crf;\n\n\t\t\tvar crf2=function() {\n\t\t\t\tvar s=document.getElementById('all_day_event').checked;\n\t\t\t\tdocument.getElementById('start_hour').disabled=s;\n\t\t\t\tdocument.getElementById('start_minute').disabled=s;\n\t\t\t\tdocument.getElementById('end_hour').disabled=s;\n\t\t\t\tdocument.getElementById('end_minute').disabled=s;\n\t\t\t}\n\t\t\tcrf2();\n\t\t\tdocument.getElementById('all_day_event').onclick=crf2;\n\n\t\t\tform.old_submit=form.onsubmit;\n\t\t\tform.onsubmit=function()\n\t\t\t\t{\n\t\t\t\t\tif (form.elements['end_day'].selectedIndex!=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar start=new Date(window.parseInt(form.elements['start_year'].value),window.parseInt(form.elements['start_month'].value)-1,window.parseInt(form.elements['start_day'].value),window.parseInt(form.elements['start_hour'].value),window.parseInt(form.elements['start_minute'].value));\n\t\t\t\t\t\tvar end=new Date(window.parseInt(form.elements['end_year'].value),window.parseInt(form.elements['end_month'].value)-1,window.parseInt(form.elements['end_day'].value),window.parseInt(form.elements['end_hour'].value),window.parseInt(form.elements['end_minute'].value));\n\n\t\t\t\t\t\tif (start>end)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twindow.fauxmodal_alert('" . php_addslashes(do_lang('EVENT_CANNOT_AROUND')) . "');\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof form.old_submit!='undefined' && form.old_submit) return form.old_submit();\n\t\t\t\t\treturn true;\n\t\t\t\t};\n\t\t";
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/calendar';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_calendar';
     $this->posting_form_title = do_lang_tempcode('EVENT_TEXT');
     require_lang('calendar');
     require_lang('dates');
     require_css('calendar');
     require_code('calendar2');
     // Decide what to do
     if ($type == 'misc') {
         return $this->misc();
     }
     // Decide what to do
     if ($type == 'import') {
         return $this->import_ical();
     }
     if ($type == '_import_ical') {
         return $this->_import_ical();
     }
     if ($type == 'export') {
         return $this->export_ical();
     }
     if ($type == '_export') {
         return $this->_export_ical();
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:36,代码来源:cms_calendar.php

示例12: tpl_preview__ocf_edit_avatar_tab

 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__ocf_edit_avatar_tab()
 {
     require_lang('ocf');
     require_css('ocf');
     $avatar = do_lorem_template('OCF_TOPIC_POST_AVATAR', array('AVATAR' => placeholder_image_url()));
     return array(lorem_globalise(do_lorem_template('OCF_EDIT_AVATAR_TAB', array('USERNAME' => lorem_word(), 'AVATAR' => $avatar, 'WIDTH' => placeholder_number(), 'HEIGHT' => placeholder_number())), NULL, '', true));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:14,代码来源:ocf_member_avatars.php

示例13: init__svg

/**
 * Standard code module initialisation function.
 */
function init__svg()
{
    require_css('svg');
    // Some default values
    define('VIEWPORT_WIDTH', 1024.0);
    define('VIEWPORT_HEIGHT', 400.0);
    define('SVG_WIDTH', 1024.0);
    define('SVG_HEIGHT', 400.0);
    define('Y_LABEL_WIDTH', 50.0);
    define('Y_AXIS_WIDTH', 50.0);
    define('PLOT_WIDTH_BIAS', 10.0);
    define('PLOT_WIDTH', SVG_WIDTH - Y_LABEL_WIDTH - Y_AXIS_WIDTH - PLOT_WIDTH_BIAS);
    define('X_LABEL_HEIGHT', 13.0);
    define('X_AXIS_HEIGHT', 13.0);
    define('PLOT_HEIGHT_BIAS', 10.0);
    define('PLOT_HEIGHT', SVG_HEIGHT - X_LABEL_HEIGHT - X_AXIS_HEIGHT - PLOT_HEIGHT_BIAS);
    define('X_PADDING', 2.0);
    define('Y_PADDING', 2.0);
    define('MIN_Y_MARKER_DISTANCE', 14.0);
    define('MIN_X_MARKER_DISTANCE', 14.0);
    define('TEXT_HEIGHT', 14.0);
    define('BAR_WIDTH', 15.0);
    global $CSS_FILE_CONTENTS;
    $CSS_FILE_CONTENTS = '';
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:28,代码来源:svg.php

示例14: run_start

 /**
  * Standard aed_module run_start.
  *
  * @param  ID_TEXT		The type of module execution
  * @return tempcode		The output of the run
  */
 function run_start($type)
 {
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/forums';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_forums';
     $this->add_one_label = do_lang_tempcode('ADD_FORUM');
     $this->edit_this_label = do_lang_tempcode('EDIT_THIS_FORUM');
     $this->edit_one_label = do_lang_tempcode('EDIT_FORUM');
     global $C_TITLE;
     $C_TITLE = NULL;
     if (get_forum_type() != 'ocf') {
         warn_exit(do_lang_tempcode('NO_OCF'));
     } else {
         ocf_require_all_forum_stuff();
     }
     require_code('ocf_forums_action');
     require_code('ocf_forums_action2');
     require_code('ocf_forums2');
     require_css('ocf');
     load_up_all_module_category_permissions($GLOBALS['FORUM_DRIVER']->get_guest_id(), 'forums');
     if ($type == 'misc') {
         return $this->misc();
     }
     if ($type == 'reorder') {
         return $this->reorder();
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:33,代码来源:admin_ocf_forums.php

示例15: display_init

 /**
  * Get ready for displaying the skin.
  *
  * This may register some CSS or JS...
  */
 function display_init()
 {
     // call parent:
     parent::display_init();
     // Add CSS:
     // fp> Note: having those here should allow
     // 1) Requesting them earlier as if they are @import'ed
     // 2) Allow bundling
     // fp> I am not 100% sure though. Comments welcome :)
     /*require_css( 'basic_styles.css', 'blog' ); // the REAL basic styles
     		require_css( 'basic.css', 'blog' ); // Basic styles
     		require_css( 'blog_base.css', 'blog' ); // Default styles for the blog navigation
     		require_css( 'item_base.css', 'blog' ); // Default styles for the post CONTENT
     		require_css( 'item.css', 'relative' );
     		require_css( 'style.css', 'relative' );*/
     // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images:
     if ($this->get_setting('colorbox')) {
         require_js_helper('colorbox', 'blog');
     }
     require_css('basic_styles.css', 'blog');
     // the REAL basic styles
     require_css('basic.css', 'blog');
     // Basic styles
     require_css('style.css', 'relative');
     require_js('js/core.js', 'relative');
     require_js('navigation.js', 'blog');
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:32,代码来源:_skin.class.php


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