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


PHP common::LoadComponents方法代码示例

本文整理汇总了PHP中common::LoadComponents方法的典型用法代码示例。如果您正苦于以下问题:PHP common::LoadComponents方法的具体用法?PHP common::LoadComponents怎么用?PHP common::LoadComponents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common的用法示例。


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

示例1: Finder

 function Finder()
 {
     global $page, $config, $dataDir;
     $page->head .= "\n" . '<link rel="stylesheet" type="text/css" media="screen" href="' . common::GetDir('/include/thirdparty/finder/css/finder.css') . '">';
     $page->head .= "\n" . '<link rel="stylesheet" type="text/css" media="screen" href="' . common::GetDir('/include/thirdparty/finder/style.css') . '">';
     $page->head .= "\n" . '<script type="text/javascript" src="' . common::GetDir('/include/thirdparty/finder/js/finder.js') . '"></script>';
     $page->head .= "\n" . '<script type="text/javascript" src="' . common::GetDir('/include/thirdparty/finder/config.js') . '"></script>';
     echo '<div id="finder"></div>';
     common::LoadComponents('selectable,draggable,droppable,resizable,dialog,slider,button');
     //get the finder language
     $language = $config['langeditor'];
     if ($language == 'inherit') {
         $language = $config['language'];
     }
     $lang_file = '/include/thirdparty/finder/js/i18n/' . $language . '.js';
     $lang_full = $dataDir . $lang_file;
     if (file_exists($lang_full)) {
         $page->head .= "\n" . '<script type="text/javascript" src="' . common::GetDir($lang_file) . '"></script>';
     } else {
         $language = 'en';
     }
     $this->finder_opts['lang'] = $language;
     $this->finder_opts['customData']['verified'] = common::new_nonce('post', true);
     $this->finder_opts['uiOptions'] = array('toolbar' => array(array('back', 'forward', 'up', 'reload'), array('home', 'netmount'), array('mkdir', 'upload'), array('open', 'download', 'getfile'), array('info'), array('quicklook'), array('copy', 'cut', 'paste'), array('rm'), array('duplicate', 'rename', 'edit', 'resize'), array('extract', 'archive'), array('search'), array('view', 'sort'), array('help')), 'tree' => array('openRootOnLoad' => true, 'syncTree' => true), 'navbar' => array('minWidth' => 150, 'maxWidth' => 500), 'cwd' => array('oldSchool' => false));
     $this->FinderPrep();
     $this->finder_opts = gpPlugin::Filter('FinderOptionsClient', array($this->finder_opts));
     gpSettingsOverride('finder_options_client', $this->finder_opts);
     $page->head_script .= "\n" . 'var finder_opts = ' . json_encode($this->finder_opts) . ';';
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:29,代码来源:admin_uploaded.php

示例2: __construct

 function __construct($title)
 {
     common::LoadComponents('gp-admin-css');
     $this->requested = str_replace(' ', '_', $title);
     $this->title = $title;
     $this->get_theme_css = false;
     $_REQUEST['gpreq'] = 'admin';
     $this->head .= "\n" . '<meta name="robots" content="noindex,nofollow" />';
     @header('X-Frame-Options: SAMEORIGIN');
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:10,代码来源:admin_login.php

示例3: __construct

 function __construct()
 {
     global $page, $config, $gpLayouts, $langmessage;
     $page->head_js[] = '/include/js/theme_content.js';
     $page->head_js[] = '/include/js/dragdrop.js';
     $page->css_admin[] = '/include/css/theme_content.less';
     common::LoadComponents('resizable');
     parent::__construct();
     $this->GetPossible();
     $cmd = common::GetCommand();
     //layout requests
     if (strpos($page->requested, '/')) {
         $parts = explode('/', $page->requested);
         $layout_part = $parts[1];
         if (gp_remote_themes && strtolower($layout_part) == 'remote') {
             $this->RemoteBrowse();
             return;
         }
         if (strtolower($layout_part) == 'available') {
             $this->ShowAvailable();
             return;
         }
         if (isset($gpLayouts[$layout_part])) {
             $this->layout_request = true;
             $this->EditLayout($layout_part, $cmd);
             return;
         }
     }
     //set current layout
     $this->curr_layout = $config['gpLayout'];
     if (isset($_REQUEST['layout'])) {
         $this->curr_layout = $_REQUEST['layout'];
     }
     if (!array_key_exists($this->curr_layout, $gpLayouts)) {
         message($langmessage['OOPS'] . ' (Invalid Layout)');
         $cmd = '';
     }
     $this->SetLayoutArray();
     switch ($cmd) {
         //remote themes
         case 'remote_install':
             $this->RemoteInstall();
             return;
         case 'remote_install_confirmed':
             $installer = $this->RemoteInstallConfirmed('theme');
             $this->GetPossible();
             $this->UpdateLayouts($installer);
             break;
         case 'deletetheme':
             $this->DeleteTheme();
             $this->GetPossible();
             break;
             //adminlayout
         //adminlayout
         case 'adminlayout':
             $this->AdminLayout();
             return;
             //theme ratings
         //theme ratings
         case 'Update Review':
         case 'Send Review':
         case 'rate':
             $this->admin_addon_rating('theme', 'Admin_Theme_Content');
             if ($this->ShowRatingText) {
                 return;
             }
             break;
             //new layouts
         //new layouts
         case 'preview':
         case 'preview_iframe':
         case 'newlayout':
         case 'addlayout':
             if ($this->NewLayout($cmd)) {
                 return;
             }
             break;
         case 'updatetheme':
             $this->UpdateTheme($_REQUEST['source']);
             break;
             //copy
         //copy
         case 'copy':
             $this->CopyLayoutPrompt();
             return;
         case 'copylayout':
             $this->CopyLayout();
             break;
             //editing layouts without a layout id as part of slug
         //editing layouts without a layout id as part of slug
         case 'editlayout':
             //linked from install page without a layout id
         //linked from install page without a layout id
         case 'details':
             $this->EditLayout($this->curr_layout, $cmd);
             return;
             //layout options
         //layout options
         case 'deletelayout':
             $this->DeleteLayoutConfirmed();
//.........这里部分代码省略.........
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:101,代码来源:admin_theme_content.php

示例4: HeadContent

 static function HeadContent()
 {
     global $config, $page, $gp_head_content, $wbMessageBuffer;
     //before ob_start() so plugins can get buffer content
     gpPlugin::Action('HeadContent');
     ob_start();
     if (common::LoggedIn()) {
         common::AddColorBox();
     }
     //always include javascript when there are messages
     if ($page->admin_js || !empty($page->jQueryCode) || !empty($wbMessageBuffer) || isset($_COOKIE['cookie_cmd'])) {
         common::LoadComponents('gp-main');
     }
     //defaults
     common::LoadComponents('jquery,gp-additional');
     //get css and js info
     includeFile('combine.php');
     $scripts = gp_combine::ScriptInfo(gpOutput::$components);
     //check for bootstrap theme
     if (strpos(gpOutput::$components, 'bootstrap')) {
         //this would only find bootstrap themes that include css
     }
     gpOutput::GetHead_TKD();
     gpOutput::GetHead_CSS($scripts['css']);
     //css before js so it's available to scripts
     gpOutput::GetHead_Lang();
     gpOutput::GetHead_JS($scripts['js']);
     gpOutput::GetHead_InlineJS();
     //gadget info
     if (!empty($config['addons'])) {
         foreach ($config['addons'] as $addon_info) {
             if (!empty($addon_info['html_head'])) {
                 echo "\n";
                 echo $addon_info['html_head'];
             }
         }
     }
     if (!empty($page->head)) {
         echo $page->head;
     }
     $gp_head_content .= ob_get_clean();
 }
开发者ID:Bomberus,项目名称:gpEasy-CMS,代码行数:42,代码来源:gpOutput.php

示例5:

<?php

global $page;
$path = $page->theme_dir . '/drop_down_menu.php';
include_once $path;
?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<?php 
common::LoadComponents('bootstrap3-js');
gpOutput::GetHead();
?>

		<!--[if lt IE 9]><?php 
// HTML5 shim, for IE6-8 support of HTML5 elements
gpOutput::GetComponents('html5shiv');
gpOutput::GetComponents('respondjs');
?>
<![endif]-->
	</head>


	<body>
		<div class="navbar navbar-default navbar-fixed-top">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:31,代码来源:template.php

示例6: defined

defined('is_running') or die('Not an entry point...');
/*
 * Page/Menu Manager
 *
 * Uses the following other files
 * 		admin_menu_tools.php
 * 		admin_trash.php
 *
 *
 *
 *
 */
defined('gp_max_menu_level') or define('gp_max_menu_level', 6);
includeFile('admin/admin_menu_tools.php');
common::LoadComponents('sortable');
class admin_menu_new extends admin_menu_tools
{
    var $cookie_settings = array();
    var $hidden_levels = array();
    var $search_page = 0;
    var $search_max_per_page = 20;
    var $query_string;
    var $avail_menus = array();
    var $curr_menu_id;
    var $curr_menu_array = false;
    var $is_alt_menu = false;
    var $max_level_index = 3;
    var $main_menu_count;
    var $list_displays = array('search' => true, 'all' => true, 'hidden' => true, 'nomenus' => true);
    function __construct()
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:30,代码来源:admin_menu_new.php

示例7: AddColorBox

 /**
  * Add js and css elements to the <head> section of a page
  *
  */
 static function AddColorBox()
 {
     global $page, $config, $langmessage;
     static $init = false;
     if ($init) {
         return;
     }
     $init = true;
     $list = array('previous' => $langmessage['Previous'], 'next' => $langmessage['Next'], 'close' => $langmessage['Close'], 'caption' => $langmessage['caption'], 'current' => sprintf($langmessage['Image_of'], '{current}', '{total}'));
     //'Start Slideshow'=>'slideshowStart','Stop Slideshow'=>'slideshowStop'
     $page->head_script .= "\nvar colorbox_lang = " . common::JsonEncode($list) . ';';
     common::LoadComponents('colorbox');
 }
开发者ID:Knuzen,项目名称:gpEasy-CMS,代码行数:17,代码来源:common.php

示例8: array

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<?php 
common::LoadComponents('bootstrap-all');
gpOutput::GetHead();
?>

		<!--[if lt IE 9]><?php 
// HTML5 shim, for IE6-8 support of HTML5 elements
gpOutput::GetComponents('html5shiv');
?>
<![endif]-->

	</head>

	<body>

		<div class="container-narrow">

			<div class="masthead">
				<?php 
$GP_ARRANGE = false;
$GP_MENU_CLASSES = array('menu_top' => 'nav nav-pills pull-right', 'selected' => '', 'selected_li' => 'active', 'childselected' => '', 'childselected_li' => '', 'li_' => '', 'li_title' => '');
gpOutput::Get('Menu');
//top level links
?>
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:30,代码来源:template.php

示例9: AddComponents

 static function AddComponents()
 {
     global $addonFolderName, $page, $addonRelativeCode;
     static $done = false;
     if ($done) {
         return;
     }
     if (version_compare(gpversion, '4.3b2', '>=')) {
         common::LoadComponents('bootstrap3-carousel');
     } else {
         common::LoadComponents('bootstrap-carousel');
     }
     //$page->admin_js = true; //loads main.js
     $page->head_js[] = '/data/_addoncode/' . $addonFolderName . '/jquery.mobile.custom.js';
     $page->head_js[] = '/data/_addoncode/' . $addonFolderName . '/carousel.js';
     $page->css_user[] = '/data/_addoncode/' . $addonFolderName . '/carousel.css';
     $done = true;
 }
开发者ID:jozefkrz,项目名称:gpEasy-CMS,代码行数:18,代码来源:TwitterCarousel.php

示例10: start

 /**
  * Determine if $session_id represents a valid session and if so start the session
  *
  */
 static function start($session_id, $sessions = false)
 {
     global $langmessage, $dataDir, $wbMessageBuffer;
     static $locked_message = false;
     //get the session file
     if (!$sessions) {
         $sessions = self::GetSessionIds();
         if (!isset($sessions[$session_id])) {
             msg('hmm: ' . gp_session_cookie);
             self::cookie(gp_session_cookie);
             //make sure the cookie is deleted
             msg($langmessage['Session Expired'] . ' (timeout)');
             return false;
         }
     }
     $sess_info = $sessions[$session_id];
     //check ~ip, ~user agent ...
     if (gp_browser_auth && !empty($sess_info['uid'])) {
         $auth_uid = self::auth_browseruid();
         $auth_uid_legacy = self::auth_browseruid(true);
         //legacy option added to prevent logging users out, added 2.0b2
         if ($sess_info['uid'] != $auth_uid && $sess_info['uid'] != $auth_uid_legacy) {
             self::cookie(gp_session_cookie);
             //make sure the cookie is deleted
             msg($langmessage['Session Expired'] . ' (browser auth)');
             return false;
         }
     }
     $session_file = $dataDir . '/data/_sessions/' . $sess_info['file_name'];
     if ($session_file === false || !gpFiles::Exists($session_file)) {
         self::cookie(gp_session_cookie);
         //make sure the cookie is deleted
         msg($langmessage['Session Expired'] . ' (invalid)');
         return false;
     }
     //prevent browser caching when editing
     Header('Last-Modified: ' . gmdate('D, j M Y H:i:s') . ' GMT');
     Header('Expires: ' . gmdate('D, j M Y H:i:s', time()) . ' GMT');
     Header('Cache-Control: no-store, no-cache, must-revalidate');
     // HTTP/1.1
     Header('Cache-Control: post-check=0, pre-check=0', false);
     Header('Pragma: no-cache');
     // HTTP/1.0
     $GLOBALS['gpAdmin'] = self::SessionData($session_file, $checksum);
     //lock to prevent conflicting edits
     if (gp_lock_time > 0 && (!empty($GLOBALS['gpAdmin']['editing']) || !empty($GLOBALS['gpAdmin']['granted']))) {
         $expires = gp_lock_time;
         if (!gpFiles::Lock('admin', sha1(sha1($session_id)), $expires)) {
             msg($langmessage['site_locked'] . ' ' . sprintf($langmessage['lock_expires_in'], ceil($expires / 60)));
             $locked_message = true;
         } else {
             unset($GLOBALS['gpAdmin']['locked']);
         }
     }
     //extend cookie?
     if (isset($GLOBALS['gpAdmin']['remember'])) {
         $elapsed = time() - $GLOBALS['gpAdmin']['remember'];
         if ($elapsed > 604800) {
             //7 days
             $GLOBALS['gpAdmin']['remember'] = time();
             self::cookie(gp_session_cookie, $session_id);
         }
     }
     register_shutdown_function(array('gpsession', 'close'), $session_file, $checksum);
     self::SaveSetting();
     //make sure forms have admin nonce
     ob_start(array('gpsession', 'AdminBuffer'));
     gpOutput::$lang_values += array('cancel' => 'ca', 'update' => 'up', 'caption' => 'cp', 'Width' => 'Width', 'Height' => 'Height');
     common::LoadComponents('sortable,autocomplete,gp-admin,gp-admin-css');
     admin_tools::VersionsAndCheckTime();
     gpOutput::$inline_vars += array('gpRem' => admin_tools::CanRemoteInstall());
     //prepend messages from message buffer
     if (isset($GLOBALS['gpAdmin']['message_buffer']) && count($GLOBALS['gpAdmin']['message_buffer'])) {
         $wbMessageBuffer = array_merge($GLOBALS['gpAdmin']['message_buffer'], $wbMessageBuffer);
         unset($GLOBALS['gpAdmin']['message_buffer']);
     }
     //alias
     if (isset($_COOKIE['gp_alias'])) {
         $GLOBALS['gpAdmin']['useralias'] = $_COOKIE['gp_alias'];
     } else {
         $GLOBALS['gpAdmin']['useralias'] = $GLOBALS['gpAdmin']['username'];
     }
     return true;
 }
开发者ID:barbrick,项目名称:gpEasy-CMS,代码行数:88,代码来源:sessions.php

示例11: UseCK

 /**
  * Use ckeditor for to edit content
  *
  *	configuration options
  * 	- http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
  */
 static function UseCK($contents, $name = 'gpcontent', $options = array())
 {
     global $page, $dataDir;
     $options += array('rows' => '20', 'cols' => '50');
     echo "\n\n";
     echo '<textarea name="' . $name . '" style="width:90%" rows="' . $options['rows'] . '" cols="' . $options['cols'] . '" class="CKEDITAREA">';
     echo htmlspecialchars($contents);
     echo '</textarea><br/>';
     $page->head .= "\n" . '<script type="text/javascript" src="' . common::GetDir('/include/thirdparty/ckeditor_34/ckeditor.js') . '?' . rawurlencode(gpversion) . '"></script>';
     $page->head .= "\n" . '<script type="text/javascript" src="' . common::GetDir('/include/js/ckeditor_config.js') . '?' . rawurlencode(gpversion) . '"></script>';
     common::LoadComponents('autocomplete');
     $page->head_script .= gp_edit::AutoCompleteValues(true);
     ob_start();
     echo "\n\n";
     // extra plugins
     $config = gp_edit::CKConfig($options, 'json', $plugins);
     foreach ($plugins as $plugin => $plugin_path) {
         echo 'CKEDITOR.plugins.addExternal(' . json_encode($plugin) . ',' . json_encode($plugin_path) . ');';
         echo "\n";
     }
     echo '$(".CKEDITAREA").each(function(){';
     echo 'CKEDITOR.replace( this, ' . $config . ' );';
     echo '});';
     echo "\n\n";
     $page->jQueryCode .= ob_get_clean();
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:32,代码来源:editing.php

示例12: count

            $menus .= '"' . $key . '":"' . $value . '"' . ($i == count($GLOBALS['config']['menus']) ? '' : ', ');
        }
        $menus .= '};';
        $page->head_script .= "\n" . $menus . "\n";
    } else {
        $menus = 'var gpE_menus = {';
        $menus .= '};';
        $page->head_script .= "\n" . $menus . "\n";
    }
    if (array_key_exists("datafilter", $config) and $config['datafilter'] != "") {
        $datafilterJS = 'var gpE_datafilter = [';
        $i = 0;
        $pieces = explode(",", $config['datafilter']);
        foreach ($pieces as $value) {
            $i++;
            $datafilterJS .= '"' . $value . '"' . ($i == count($pieces) ? '' : ', ');
        }
        $datafilterJS .= '];';
        $page->head_script .= "\n" . $datafilterJS . "\n";
    } else {
        $datafilterJS = 'var gpE_datafilter = {';
        $datafilterJS .= '};';
        $page->head_script .= "\n" . $datafilterJS . "\n";
    }
    $layoutsJS = 'var gpE_added_layouts = {';
    $layoutsJS .= '};';
    $page->head_script .= "\n" . $layoutsJS . "\n";
    $page->head_script .= 'gpE_add_opts = "";';
}
common::LoadComponents('colorbox');
开发者ID:a2exfr,项目名称:Catalog-Easy,代码行数:30,代码来源:HookHead.php


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