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


PHP css函数代码示例

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


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

示例1: __construct

 /**
  * Constructor method
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // Load the required classes
     $this->load->library('form_validation');
     $this->load->model('navigation_m');
     $this->load->model('pages/page_m');
     $this->lang->load('navigation');
     $this->template->append_metadata(js('navigation.js', 'navigation'));
     $this->template->append_metadata(css('navigation.css', 'navigation'));
     // Get Navigation Groups
     $this->data->groups = $this->navigation_m->get_groups();
     $this->data->groups_select = array_for_select($this->data->groups, 'id', 'title');
     $all_modules = $this->module_m->get_all(array('is_frontend' => true));
     //only allow modules that user has permissions for
     foreach ($all_modules as $module) {
         if (in_array($module['slug'], $this->permissions) or $this->current_user->group == 'admin') {
             $modules[] = $module;
         }
     }
     $this->data->modules_select = array_for_select($modules, 'slug', 'name');
     // Get Pages and create pages tree
     $tree = array();
     if ($pages = $this->page_m->get_all()) {
         foreach ($pages as $page) {
             $tree[$page->parent_id][] = $page;
         }
     }
     unset($pages);
     $this->data->pages_select = $tree;
     // Set the validation rules for the navigation items
     $this->form_validation->set_rules($this->validation_rules);
 }
开发者ID:phonglanpls,项目名称:jz-proj-2012,代码行数:38,代码来源:admin.php

示例2: Public_Controller

 function Public_Controller()
 {
     parent::MY_Controller();
     $this->benchmark->mark('public_controller_start');
     // Check the frontend hasnt been disabled by an admin
     if (!$this->settings->item('frontend_enabled')) {
         $error = $this->settings->item('unavailable_message') ? $this->settings->item('unavailable_message') : lang('cms_fatal_error');
         show_error($error);
     }
     // -- Navigation menu -----------------------------------
     $this->load->model('pages/pages_m');
     // Set the theme view folder
     $this->template->set_theme($this->settings->item('default_theme'));
     $this->asset->set_theme($this->settings->item('default_theme'));
     $this->template->set_layout('layout');
     $this->template->append_metadata(js('jquery/jquery.js'))->append_metadata(js('jquery/jquery.fancybox.js'))->append_metadata(css('jquery/jquery.fancybox.css'))->append_metadata(js('front.js'));
     // Make sure whatever page the user loads it by, its telling search robots the correct formatted URL
     $this->template->set_metadata('canonical', site_url($this->uri->uri_string()), 'link');
     // If there is a news module, link to its RSS feed in the head
     if (module_exists('news')) {
         $this->template->append_metadata('<link rel="alternate" type="application/rss+xml" title="' . $this->settings->item('site_name') . '" href="' . site_url('news/rss/all|rss') . '" />');
     }
     // Enable profiler on local box
     if (ENV == 'local' && $this->input->get('_debug')) {
         $this->output->enable_profiler(TRUE);
     }
     // Frontend data
     $this->load->library('variables/variables');
     $this->load->vars('variable', $this->variables->get());
     $this->benchmark->mark('public_controller_end');
 }
开发者ID:netfreak,项目名称:pyrocms,代码行数:31,代码来源:Public_Controller.php

示例3: admin_theme_header

 public static function admin_theme_header()
 {
     echo js('jquery');
     echo "<script type='text/javascript'>jQuery.noConflict() ;</script>";
     echo js('controlledvocab', 'javascripts');
     echo "<link rel='stylesheet' href='" . css('controlledvocab') . "' />";
 }
开发者ID:kent-state-university-libraries,项目名称:ControlledVocab,代码行数:7,代码来源:plugin.php

示例4: _init

    /**
     */
    function _init()
    {
        asset('animate-css');
        jquery('
			$(\'.news_item_title\').hover(function(){
				$(this).parent().find(\'.news_btn\').addClass(\'active_news_btn\');
			},function(){
				$(this).parent().find(\'.news_btn\').removeClass(\'active_news_btn\');
			});
			$(\'.news_btn\').hover(function(){
				$(this).parent().parent().find(\'.news_item_title\').addClass(\'active_news\');
			},function(){
				$(this).parent().parent().find(\'.news_item_title\').removeClass(\'active_news\');
			});
		');
        css('
			.news .news_item { font-size: 13px; font-weight:normal; margin-bottom: 20px; margin-top: 20px; }
			.news h1 { font-size: 18px; margin-bottom: 20px; }
			.news h3 { font-size: 18px; margin-top: 5px; }
			.news .news_item_content { }
			.news .news_item_content h1, .news .news_item_content h2, .news .news_item_content h3,
			.news .news_item_content h4, .news .news_item_content h5, .news .news_item_content h6 { font-size: 13px; font-weight:normal; }
			.news .news_item_footer { color: #aaa; }
			.news .news_item_date { color: #777; }
			.news .news_item_social { margin-top: 20px; }
			.news .news_item_comments { margin-top: 20px; }
		');
    }
开发者ID:yfix,项目名称:yf,代码行数:30,代码来源:yf_news.class.php

示例5: layout

 public function layout($type, $data = array())
 {
     $version = panel()->version();
     $base = panel()->urls()->index();
     $cssbase = panel()->urls()->css();
     $jsbase = panel()->urls()->js();
     $defaults = array('title' => panel()->site()->title() . ' | Panel', 'direction' => panel()->direction(), 'meta' => $this->snippet('meta'), 'css' => css($cssbase . '/panel.css?v=' . $version), 'js' => js($jsbase . '/dist/panel.min.js?v=' . $version), 'content' => '', 'bodyclass' => '');
     switch ($type) {
         case 'app':
             $defaults['topbar'] = '';
             $defaults['csrf'] = panel()->csrf();
             $defaults['formcss'] = css($cssbase . '/form.min.css?v=' . $version);
             $defaults['formjs'] = js($jsbase . '/dist/form.min.js?v=' . $version);
             $defaults['appjs'] = js($jsbase . '/dist/app.min.js?v=' . $version);
             // plugin stuff
             $defaults['pluginscss'] = css($base . '/plugins/css?v=' . $version);
             $defaults['pluginsjs'] = js($base . '/plugins/js?v=' . $version);
             break;
         case 'base':
             break;
     }
     $data = array_merge($defaults, $data);
     if (r::ajax() and $type == 'app') {
         $panel = panel();
         $user = $panel->site()->user();
         $response = array('user' => $user ? $user->username() : false, 'direction' => $panel->direction(), 'title' => $data['title'], 'content' => $data['topbar'] . $data['content']);
         return response::json($response);
     } else {
         return new Layout($type, $data);
     }
 }
开发者ID:biggtfish,项目名称:Clean-Blog-Kirby-Theme,代码行数:31,代码来源:base.php

示例6: load

 /**
  *  Загрузка скриптов
  */
 public function load()
 {
     $this->toolbar = Core_ArrayObject::transform($this->toolbar);
     $folder = cogear()->redactor->folder . DS . 'redactor' . DS;
     $options = new Core_ArrayObject();
     event('redactor.options', $options);
     $options->lang = config('i18n.lang', 'ru');
     $options->shortcuts = TRUE;
     $options->minHeight = 300;
     $options->buttons = array('formatting', 'alignment', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'table', 'link', 'image', '|', 'fontcolor', 'backcolor', '|', 'horizontalrule', '|', 'html');
     //        $options->imageUpload = l('/redactor/upload/');
     $options->fixed = TRUE;
     $options->observeImages = TRUE;
     $options->convertLinks = TRUE;
     $options->cleanup = FALSE;
     $options->focus = TRUE;
     $options->convertDivs = FALSE;
     role() == 1 && ($options->fixedTop = 40);
     js($folder . $options->lang . '.js', 'after');
     //        $this->toolbar->markupSet->uasort('Core_ArrayObject::sortByOrder');
     //            $(document).ready(function(){
     css($folder . 'redactor.css');
     js($folder . 'redactor.min.js', 'after');
     inline_js("\$('[name={$this->name}]').redactor(" . $options->toJSON() . ")", 'after');
 }
开发者ID:brussens,项目名称:cogear2,代码行数:28,代码来源:Editor.php

示例7: index

 public function index()
 {
     //do they want to delete the template?
     if ($this->input->post()) {
         if ($_POST['btnAction'] == 'delete') {
             $delete = $this->input->post('template_list');
             if ($this->templates_m->delete_template($delete)) {
             }
             $this->session->set_flashdata(array('success' => lang('newsletters.template_delete_success')));
             redirect('admin/newsletters/templates');
         }
     }
     //else go on with normal business
     $this->form_validation->set_rules($this->template_rules);
     if ($this->form_validation->run()) {
         if ($this->templates_m->save_template($this->input->post())) {
             $this->session->set_flashdata(array('success' => sprintf(lang('newsletters.template_add_success'), $this->input->post('title'))));
             redirect('admin/newsletters/templates');
         }
     }
     //get all templates so we can populate the dropdown
     $template_list = $this->templates_m->get_templates();
     $this->data->template_list[0] = '';
     foreach ($template_list as $template) {
         $this->data->template_list[$template->id] = $template->title;
     }
     $this->template->title($this->module_details['name'], lang('newsletters.templates'))->set('active_section', 'templates')->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))->append_metadata(js('functions.js', 'newsletters'))->append_metadata(css('admin.css', 'newsletters'))->build('admin/templates', $this->data);
 }
开发者ID:phonglanpls,项目名称:jz-proj-2012,代码行数:28,代码来源:templates.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     // Not an admin and not allowed to see files
     if ($this->current_user->group !== 'admin' and !array_key_exists('files', $this->permissions)) {
         $this->load->language('files/files');
         show_error(lang('files.no_permissions'));
     }
     ci()->admin_theme = $this->theme_m->get_admin();
     // Using a bad slug? Weak
     if (empty($this->admin_theme->slug)) {
         show_error('This site has been set to use an admin theme that does not exist.');
     }
     // make a constant as this is used in a lot of places
     defined('ADMIN_THEME') or define('ADMIN_THEME', $this->admin_theme->slug);
     // Prepare Asset library
     $this->asset->set_theme(ADMIN_THEME);
     // Set the location of assets
     $this->config->set_item('asset_dir', dirname($this->admin_theme->web_path) . '/');
     $this->config->set_item('asset_url', BASE_URL . dirname($this->admin_theme->web_path) . '/');
     $this->config->set_item('theme_asset_dir', dirname($this->admin_theme->web_path) . '/');
     $this->config->set_item('theme_asset_url', BASE_URL . dirname($this->admin_theme->web_path) . '/');
     $this->load->model('files/file_folders_m');
     $this->load->model('files/file_m');
     $this->lang->load('files/files');
     $this->lang->load('wysiwyg');
     $this->lang->load('buttons');
     $this->template->set_theme(ADMIN_THEME)->set_layout('wysiwyg', 'admin')->enable_parser(FALSE)->set('editor_path', config_item('asset_dir') . 'js/ckeditor/')->append_metadata(css('wysiwyg.css', 'wysiwyg'))->append_metadata(css('jquery/ui-lightness/jquery-ui.css'))->append_metadata(js('jquery/jquery.min.js'))->append_metadata(js('plugins.js'))->append_metadata(js('jquery/jquery-ui.min.js'))->append_metadata(js('wysiwyg.js', 'wysiwyg'));
 }
开发者ID:phonglanpls,项目名称:jz-proj-2012,代码行数:29,代码来源:WYSIWYG_Controller.php

示例9: show

    /**
     */
    public function show()
    {
        css('
			#faq-search { padding-top: 20px; }
			#faq-items { padding-top: 20px; padding-bottom: 20px; }
			#faq-items li.li-header { list-style: none; display:none; }
			#faq-items li.li-level-0 { display: block; font-size: 15px; }
			#faq-items li.li-level-1 { padding-top: 10px; font-size: 13px; }
			span.highlight { background-color: #ff0; }
		');
        asset('jquery-highlight');
        jquery('
			var url_hash = window.location.hash.replace("/", "");
			if (url_hash) {
				$("li.li-level-0" + url_hash + " .li-level-1", "#faq-items").show();
			}
			$(".li-level-0", "#faq-items").click(function(){
				$(".li-level-1", this).toggle()
			})
			$("input#search", "#faq-search").on("change keyup", function(){
				var words = $(this).val();
				$("#faq-items").unhighlight();
				$("#faq-items").highlight(words);
				$(".li-level-1").hide().filter(":has(\'span.highlight\')").show();
			})
		');
        $items = [];
        foreach ((array) db()->from(self::table)->where('active', 1)->where('locale', conf('language'))->get_all() as $a) {
            $items[$a['id']] = ['parent_id' => $a['parent_id'], 'name' => _truncate(trim($a['title']), 60, true, '...'), 'link' => url('/@object/#/faq' . $a['id']), 'id' => 'faq' . $a['id']];
            if ($a['text']) {
                $items['1111' . $a['id']] = ['parent_id' => $a['id'], 'body' => trim($a['text'])];
            }
        }
        return tpl()->parse_string($this->_tpl, ['items' => html()->li_tree($items)]);
    }
开发者ID:yfix,项目名称:yf,代码行数:37,代码来源:yf_faq.class.php

示例10: __construct

 /**
  * The constructor
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::Admin_Controller();
     $this->load->model('portfolio_m');
     $this->load->model('portfolio_clients_m');
     $this->load->model('portfolio_categories_m');
     $this->load->model('portfolio_portfolio_categories_m');
     $this->load->model('portfolio_images_m');
     $this->lang->load('portfolio');
     $this->lang->load('clients');
     $this->lang->load('categories');
     // Date ranges for select boxes
     $this->data->hours = array_combine($hours = range(0, 23), $hours);
     $this->data->minutes = array_combine($minutes = range(0, 59), $minutes);
     $this->data->clients = array();
     if ($clients = $this->portfolio_clients_m->order_by('title')->get_all()) {
         foreach ($clients as $client) {
             $this->data->clients[$client->id] = $client->title;
         }
     }
     $this->data->portfolio_images = $this->portfolio_images_m->getImagesByFolderSlug(self::PORTFOLIO_IMAGE_FOLDER_SLUG);
     $this->data->categories = array();
     if ($categories = $this->portfolio_categories_m->order_by('title')->get_all()) {
         foreach ($categories as $category) {
             $this->data->categories[$category->id] = $category->title;
         }
     }
     $this->template->append_metadata(css('portfolio.css', 'portfolio'))->set_partial('shortcuts', 'admin/partials/shortcuts');
 }
开发者ID:rat4m3n,项目名称:pyrocms-portfolio,代码行数:34,代码来源:admin.php

示例11: Admin_Controller

 function Admin_Controller()
 {
     parent::__construct();
     // Load the Language files ready for output
     $this->lang->load('admin');
     $this->lang->load('buttons');
     // Show error and exit if the user does not have sufficient permissions
     if (!self::_check_access()) {
         show_error($this->lang->line('cp_access_denied'));
         exit;
     }
     // Get a list of all modules available to this user / group
     if ($this->user) {
         $this->template->core_modules = $this->cache->model('module_m', 'get_all', array(array('is_backend_menu' => TRUE, 'is_backend' => TRUE, 'group' => $this->user->group, 'lang' => CURRENT_LANGUAGE)), $this->config->item('navigation_cache'));
         $addon_modules = $this->cache->model('module_m', 'get_all', array(array('is_core' => FALSE, 'is_backend' => TRUE, 'group' => $this->user->group, 'lang' => CURRENT_LANGUAGE)), $this->config->item('navigation_cache'));
         // This takes the modules array and creates a keyed array with the slug as the key.
         $modules_keyed = array();
         foreach ($addon_modules as $mod) {
             $modules_keyed[$mod['slug']] = $mod;
         }
         $this->template->addon_modules = $modules_keyed;
     }
     // Template configuration
     $this->template->set_layout('admin/layout');
     $this->template->enable_parser(FALSE);
     $this->template->append_metadata(css('admin/style.css'))->append_metadata(css('jquery/jquery-ui.css'))->append_metadata(css('jquery/colorbox.css'))->append_metadata('<script type="text/javascript">jQuery.noConflict();</script>')->append_metadata(js('jquery/jquery-ui-1.8.4.min.js'))->append_metadata(js('jquery/jquery.colorbox.min.js'))->append_metadata(js('jquery/jquery.livequery.js'))->append_metadata(js('admin/jquery.uniform.min.js'))->append_metadata(js('admin/functions.js'))->append_metadata('<script type="text/javascript">pyro.apppath_uri="' . APPPATH_URI . '";pyro.base_uri="' . BASE_URI . '";</script>');
     $this->template->set_partial('header', 'admin/partials/header', FALSE);
     $this->template->set_partial('navigation', 'admin/partials/navigation', FALSE);
     $this->template->set_partial('metadata', 'admin/partials/metadata', FALSE);
     $this->template->set_partial('footer', 'admin/partials/footer', FALSE);
     //	    $this->output->enable_profiler(TRUE);
 }
开发者ID:8496tar,项目名称:pyrocms,代码行数:32,代码来源:Admin_Controller.php

示例12: form

 public function form()
 {
     $this->load->library('cart');
     $total_amount = $this->cart->format_number($this->cart->total());
     $this->paypallib->add_field('business', 'sandbox@email.com');
     $this->paypallib->add_field('return', site_url('pyrocart/paypal/success'));
     $this->paypallib->add_field('cancel_return', site_url('pyrocart/paypal/cancel'));
     $this->paypallib->add_field('notify_url', site_url('pyrocart/paypal/ipn'));
     // <-- IPN url
     $this->paypallib->add_field('custom', '1234567890');
     // <-- Verify return
     $this->paypallib->add_field('item_name', 'Paypal Test Transaction');
     $this->paypallib->add_field('item_number', '6941');
     $this->paypallib->add_field('amount', $total_amount);
     // if you want an image button use this:
     $this->paypallib->image('button_03.gif');
     // otherwise, don't write anything or (if you want to
     // change the default button text), write this:
     // $this->paypallib->button('Click to Pay!');
     $this->data->paypal_form = $this->paypallib->paypal_form();
     $this->data->countries = $this->checkout_m->retrieve_countries();
     $this->data->zones = $this->checkout_m->retrieve_zones();
     $this->data->cart_contents = $this->cart->contents();
     $this->template->append_metadata(css('smart_wizard.css', 'pyrocart'))->append_metadata(css('checkout.css', 'pyrocart'))->append_metadata(js('jquery.smartWizard-2.0.min.js', 'pyrocart'))->append_metadata(js('jquery.chained.mini.js', 'pyrocart'))->append_metadata(js('checkout.js', 'pyrocart'))->build('paypal/form', $this->data);
 }
开发者ID:rat4m3n,项目名称:PyroCart,代码行数:25,代码来源:paypal.php

示例13: indexAction

 /**
  * 管理中心。如果未登陆,跳转至登陆页
  *
  * @author          mrmsl
  * @date            2012-07-02 11:12:49
  * @lastmodify      2013-03-29 15:58:41 by mrmsl
  *
  * @return void 无返回值。如果未登陆跳转至登陆页
  */
 function indexAction()
 {
     if (!($admin_info = $this->_admin_info)) {
         $this->_redirect(WEB_ADMIN_ENTRY . '/login', false);
         return false;
     }
     $admin_priv = strtolower(json_encode(array_values($this->_role_info['priv'])));
     $role_info = $this->_getCache($admin_info['role_id'], 'Role');
     //css文件
     $css_file = $this->_loadTimeScript('START_TIME');
     //,extjs/v4.1.1/resources/css/ext-patch.css
     $css_file .= css('extjs/v4.1.1a//resources/css/ext-all-gray.css,extjs/v4.1.1a/resources/css/ext-patch.css', COMMON_IMGCACHE);
     $css_file .= css('app.css', ADMIN_IMGCACHE . 'css/');
     $js_file = $this->_loadTimeScript('LOAD_CSS_TIME');
     $js_file .= js('', true, COMMON_IMGCACHE . 'extjs/v4.1.1a/');
     $js_file .= $this->_loadTimeScript('LOAD_EXT_TIME');
     $js_file .= js('System.js', false, '/static/js/');
     $js_file .= js('System.sys_base_admin_entry = "' . WEB_ADMIN_ENTRY . '"', 'script');
     //后台入口
     $js_file .= js(MODULE_NAME . '.' . LANG . '.js', false, '/static/js/lang/') . ('en' != LANG ? js('ext-lang-' . LANG . '.js', false, '/static/js/lang/') : '');
     if (APP_DEBUG) {
         $js_arr = (include APP_PATH . 'include/required_js.php');
         $js_file .= js($js_arr, false, ADMIN_IMGCACHE . 'app/');
     } else {
         $js_file .= js('app/pack/app.js', false);
     }
     //$js_file  .= js('editor_config.js', false, COMMON_IMGCACHE . 'ueditor/v1.2.5/');
     $js_file .= $this->_loadTimeScript('LOAD_JS_TIME');
     include TEMPLATE_FILE;
 }
开发者ID:yunsite,项目名称:yablog,代码行数:39,代码来源:Index.class.php

示例14: Admin_Controller

 function Admin_Controller()
 {
     parent::__construct();
     // Load the Language files ready for output
     $this->lang->load('admin');
     $this->lang->load('buttons');
     // Show error and exit if the user does not have sufficient permissions
     if (!self::_check_access()) {
         show_error($this->lang->line('cp_access_denied'));
         exit;
     }
     // Get a list of all modules available to this user / group
     if ($this->user) {
         $modules = $this->module_m->get_all(array('is_backend' => TRUE, 'group' => $this->user->group, 'lang' => CURRENT_LANGUAGE));
         $grouped_modules = array();
         $grouped_menu[] = 'content';
         foreach ($modules as $module) {
             if ($module['menu'] != 'content' && $module['menu'] != 'design' && $module['menu'] != 'users' && $module['menu'] != 'utilities' && $module['menu'] != '0') {
                 $grouped_menu[] = $module['menu'];
             }
         }
         array_push($grouped_menu, 'design', 'users', 'utilities');
         $grouped_menu = array_unique($grouped_menu);
         foreach ($modules as $module) {
             $grouped_modules[$module['menu']][$module['name']] = $module;
         }
         $this->template->menu_items = $grouped_menu;
         $this->template->modules = $grouped_modules;
     }
     // Template configuration
     $this->template->set_layout('default', 'admin')->enable_parser(FALSE)->append_metadata(css('admin/style.css'))->append_metadata(css('jquery/jquery-ui.css'))->append_metadata(css('jquery/colorbox.css'))->append_metadata('<script type="text/javascript">jQuery.noConflict();</script>')->append_metadata(js('jquery/jquery-ui-1.8.4.min.js'))->append_metadata(js('jquery/jquery.colorbox.min.js'))->append_metadata(js('jquery/jquery.livequery.js'))->append_metadata(js('admin/jquery.uniform.min.js'))->append_metadata(js('admin/functions.js'))->append_metadata('<script type="text/javascript">pyro.apppath_uri="' . APPPATH_URI . '";pyro.base_uri="' . BASE_URI . '";</script>')->set('user', $this->user)->set_partial('header', 'admin/partials/header')->set_partial('navigation', 'admin/partials/navigation')->set_partial('metadata', 'admin/partials/metadata')->set_partial('footer', 'admin/partials/footer');
     //	    $this->output->enable_profiler(TRUE);
 }
开发者ID:vmichnowicz,项目名称:pyrocms,代码行数:33,代码来源:Admin_Controller.php

示例15: __construct

 function __construct()
 {
     parent::WYSIWYG_Controller();
     $this->load->model('files/file_folders_m');
     $this->load->model('files/file_m');
     $this->template->append_metadata(css('images.css', 'wysiwyg'))->title('Files');
 }
开发者ID:revolveweb,项目名称:pyrocms,代码行数:7,代码来源:files.php


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