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


PHP XoopsLoad::load方法代码示例

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


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

示例1: execute

 /**
  * execute the command
  *
  * @param InputInterface  $input  input handler
  * @param OutputInterface $output output handler
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $xoops = \Xoops::getInstance();
     $module = $input->getArgument('module');
     if (false === \XoopsLoad::fileExists($xoops->path("modules/{$module}/xoops_version.php"))) {
         $output->writeln(sprintf('<error>No module named %s found!</error>', $module));
         return;
     }
     $output->writeln(sprintf('Installing %s', $module));
     if (false !== $xoops->getModuleByDirname($module)) {
         $output->writeln(sprintf('<error>%s module is already installed!</error>', $module));
         return;
     }
     $xoops->setTpl(new XoopsTpl());
     \XoopsLoad::load('module', 'system');
     $sysmod = new \SystemModule();
     $result = $sysmod->install($module);
     foreach ($sysmod->trace as $message) {
         if (is_array($message)) {
             foreach ($message as $subMessage) {
                 if (!is_array($subMessage)) {
                     $output->writeln(strip_tags($subMessage));
                 }
             }
         } else {
             $output->writeln(strip_tags($message));
         }
     }
     if ($result === false) {
         $output->writeln(sprintf('<error>Install of %s failed!</error>', $module));
     } else {
         $output->writeln(sprintf('<info>Install of %s completed.</info>', $module));
     }
     $xoops->cache()->delete('system');
 }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:42,代码来源:InstallModuleCommand.php

示例2: xoops_load

/**
 * XOOPS class loader wrapper
 *
 * Temporay solution for XOOPS 2.3
 *
 * @param   string  $name   Name of class to be loaded
 * @param   string  $type   domain of the class, potential values: core - locaded in /class/; framework - located in /Frameworks/; other - module class, located in /modules/[$type]/class/
 * @return  boolean
 */
function xoops_load($name, $type = "core")
{
    if (!class_exists('XoopsLoad')) {
        require_once XOOPS_ROOT_PATH . "/class/xoopsload.php";
    }
    return XoopsLoad::load($name, $type);
}
开发者ID:yunsite,项目名称:xoopsdc,代码行数:16,代码来源:functions.php

示例3: execute

 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $module = $input->getArgument('module');
     $output->writeln(sprintf('Uninstalling %s', $module));
     $xoops = \Xoops::getInstance();
     if (false === $xoops->getModuleByDirname($module)) {
         $output->writeln(sprintf('<error>%s is not an installed module!</error>', $module));
         return;
     }
     $xoops->setTpl(new \XoopsTpl());
     \XoopsLoad::load('module', 'system');
     $sysmod = new \SystemModule();
     $result = $sysmod->uninstall($module);
     foreach ($sysmod->trace as $message) {
         if (is_array($message)) {
             foreach ($message as $subMessage) {
                 if (!is_array($subMessage)) {
                     $output->writeln(strip_tags($subMessage));
                 }
             }
         } else {
             $output->writeln(strip_tags($message));
         }
     }
     if ($result === false) {
         $output->writeln(sprintf('<error>Uninstall of %s failed!</error>', $module));
     } else {
         $output->writeln(sprintf('<info>Uninstall of %s completed.</info>', $module));
     }
     $xoops->cache()->delete('system');
 }
开发者ID:redmexico,项目名称:XoopsCore,代码行数:31,代码来源:UninstallModuleCommand.php

示例4: load

 /**
  * @param MyTextSanitizer $ts
  * @param string $text
  * @param bool $force
  * @return mixed
  */
 public function load(MyTextSanitizer &$ts, $text, $force = false)
 {
     $xoops = Xoops::getInstance();
     if (empty($force) && $xoops->userIsAdmin) {
         return $text;
     }
     // Built-in fitlers for XSS scripts
     // To be improved
     $text = $ts->filterXss($text);
     if (XoopsLoad::load("purifier", "framework")) {
         $text = XoopsPurifier::purify($text);
         return $text;
     }
     $tags = array();
     $search = array();
     $replace = array();
     $config = parent::loadConfig(__DIR__);
     if (!empty($config["patterns"])) {
         foreach ($config["patterns"] as $pattern) {
             if (empty($pattern['search'])) {
                 continue;
             }
             $search[] = $pattern['search'];
             $replace[] = $pattern['replace'];
         }
     }
     if (!empty($config["tags"])) {
         $tags = array_map("trim", $config["tags"]);
     }
     // Set embedded tags
     $tags[] = "SCRIPT";
     $tags[] = "VBSCRIPT";
     $tags[] = "JAVASCRIPT";
     foreach ($tags as $tag) {
         $search[] = "/<" . $tag . "[^>]*?>.*?<\\/" . $tag . ">/si";
         $replace[] = " [!" . strtoupper($tag) . " FILTERED!] ";
     }
     // Set meta refresh tag
     $search[] = "/<META[^>\\/]*HTTP-EQUIV=(['\"])?REFRESH(\\1)[^>\\/]*?\\/>/si";
     $replace[] = "";
     // Sanitizing scripts in IMG tag
     //$search[]= "/(<IMG[\s]+[^>\/]*SOURCE=)(['\"])?(.*)(\\2)([^>\/]*?\/>)/si";
     //$replace[]="";
     // Set iframe tag
     $search[] = "/<IFRAME[^>\\/]*SRC=(['\"])?([^>\\/]*)(\\1)[^>\\/]*?\\/>/si";
     $replace[] = " [!IFRAME FILTERED! \\2] ";
     $search[] = "/<IFRAME[^>]*?>([^<]*)<\\/IFRAME>/si";
     $replace[] = " [!IFRAME FILTERED! \\1] ";
     // action
     $text = preg_replace($search, $replace, $text);
     return $text;
 }
开发者ID:redmexico,项目名称:XoopsCore,代码行数:58,代码来源:textfilter.php

示例5: execute

 /**
  * execute the command
  *
  * @param InputInterface  $input  input handler
  * @param OutputInterface $output output handler
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // install the 'system' module
     $xoops = \Xoops::getInstance();
     $module = 'system';
     $output->writeln(sprintf('Installing %s', $module));
     if (false !== $xoops->getModuleByDirname($module)) {
         $output->writeln(sprintf('<error>%s module is alreay installed!</error>', $module));
         return;
     }
     $xoops->setTpl(new \XoopsTpl());
     \XoopsLoad::load('module', 'system');
     $sysmod = new \SystemModule();
     $result = $sysmod->install($module);
     foreach ($sysmod->trace as $message) {
         if (is_array($message)) {
             foreach ($message as $subMessage) {
                 if (!is_array($subMessage)) {
                     $output->writeln(strip_tags($subMessage));
                 }
             }
         } else {
             $output->writeln(strip_tags($message));
         }
     }
     if ($result === false) {
         $output->writeln(sprintf('<error>Install of %s module failed!</error>', $module));
     } else {
         $output->writeln(sprintf('<info>Install of %s module completed.</info>', $module));
     }
     $xoops->cache()->delete('system');
     // add an admin user
     $adminname = 'admin';
     $adminpass = password_hash($adminname, PASSWORD_DEFAULT);
     // user: admin pass: admin
     $regdate = time();
     $result = $xoops->db()->insertPrefix('system_user', array('uname' => $adminname, 'email' => 'nobody@localhost', 'user_regdate' => $regdate, 'user_viewemail' => 1, 'pass' => $adminpass, 'rank' => 7, 'level' => 5, 'last_login' => $regdate));
     $output->writeln(sprintf('<info>Inserted %d user.</info>', $result));
 }
开发者ID:redmexico,项目名称:XoopsCore,代码行数:46,代码来源:CiInstallCommand.php

示例6: defined

 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @subpackage      class
 * @since           2.4.0
 * @author          trabis <lusopoemas@gmail.com>
 * @version         $Id: preload.php 3437 2009-08-27 13:52:28Z trabis $
 * @deprecated      To be deprecated in XOOPS 3
 */
/**
 * XOOPS preload implemented in XOOPS is different from methods defined in this class, thus module developers are advised to be careful if you use current preload methods
 */
defined('XOOPS_ROOT_PATH') or die('Restricted access');
XoopsLoad::load('XoopsLists');
XoopsLoad::load('XoopsCache');
/**
 * Class for handling events
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @subpackage      class
 * @author          trabis <lusopoemas@gmail.com>
 */
class XoopsPreload
{
    /**
     * @var array $_preloads array containing information about the event observers
     */
    var $_preloads = array();
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:preload.php

示例7: trim

             <tr><td>
             <textarea id="code_mirror" name="filemanager" rows=24 cols=110>' . $content . '</textarea>
             </td></tr>
           </table>';
     echo '<input type="hidden" name="path_file" value="' . $path_file . '"><input type="hidden" name="path" value="' . $path . '"><input type="hidden" name="file" value="' . trim($_REQUEST['file']) . '"><input type="hidden" name="ext" value="' . $ext . '"></form>';
     break;
 case 'filemanager_unzip_file':
     $path_file = trim($_REQUEST['path_file']);
     if ($_REQUEST['path'] != '') {
         $path = trim($_REQUEST['path']);
     } else {
         $path = XOOPS_ROOT_PATH . '/';
     }
     $file = $_REQUEST['file'];
     XoopsLoad::load('pclzip', 'system');
     XoopsLoad::load('pcltar', 'system');
     $file1 = XoopsFile::getHandler('file', $path_file);
     $extension = $file1->ext();
     switch ($extension) {
         case 'zip':
             $archive = new PclZip($path_file);
             if ($archive->extract(PCLZIP_OPT_PATH, $path) == 0) {
                 echo $xoops->alert('error', _AM_SYSTEM_FILEMANAGER_EXTRACT_ERROR);
             } else {
                 echo $xoops->alert('info', _AM_SYSTEM_FILEMANAGER_EXTRACT_FILE);
             }
             break;
         case 'tar':
         case 'gz':
             PclTarExtract($path_file, $path);
             break;
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:jquery.php

示例8: defined

 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       (c) 2000-2016 XOOPS Project (www.xoops.org)
 * @license             GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package             core
 * @since               2.0.0
 */
defined('XOOPS_ROOT_PATH') || exit('Restricted access');
xoops_loadLanguage('user');
// from $_POST we use keys: uname, pass, rememberme, xoops_redirect
XoopsLoad::load('XoopsRequest');
$uname = XoopsRequest::getString('uname', '', 'POST');
$pass = XoopsRequest::getString('pass', '', 'POST');
$rememberme = XoopsRequest::getString('rememberme', '', 'POST');
$redirect = XoopsRequest::getUrl('xoops_redirect', '', 'POST');
if ($uname == '' || $pass == '') {
    redirect_header(XOOPS_URL . '/user.php', 1, _US_INCORRECTLOGIN);
}
$member_handler = xoops_getHandler('member');
$myts = MyTextSanitizer::getInstance();
include_once $GLOBALS['xoops']->path('class/auth/authfactory.php');
xoops_loadLanguage('auth');
$xoopsAuth = XoopsAuthFactory::getAuthConnection($myts->addSlashes($uname));
$user = $xoopsAuth->authenticate($uname, $pass);
if (false !== $user) {
    if (0 == $user->getVar('level')) {
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:31,代码来源:checklogin.php

示例9: __construct

 /**
  * Constructor
  *
  * @param string $path Path to file
  * @param boolean $create Create file if it does not exist (if true)
  * @param integer $mode Mode to apply to the folder holding the file
  * @access private
  */
 function __construct($path, $create = false, $mode = 0755)
 {
     XoopsLoad::load('XoopsFile');
     $this->folder = XoopsFile::getHandler('folder', dirname($path), $create, $mode);
     if (!is_dir($path)) {
         $this->name = basename($path);
     }
     if (!$this->exists()) {
         if ($create === true) {
             if ($this->safe($path) && $this->create() === false) {
                 return false;
             }
         } else {
             return false;
         }
     }
 }
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:25,代码来源:file.php

示例10: cleanVar

 /**
  * Clean up an input variable.
  *
  * @param mixed  $var  The input variable.
  * @param int    $mask Filter bit mask.
  *  - 1=no trim: If this flag is cleared and the input is a string,
  *    the string will have leading and trailing whitespace trimmed.
  *  - 2=allow_raw: If set, no more filtering is performed, higher bits are ignored.
  *  - 4=allow_html: HTML is allowed, but passed through a safe HTML filter first.
  *    If set, no more filtering is performed.
  *  - If no bits other than the 1 bit is set, a strict filter is applied.
  * @param string $type The variable type. See {@link XoopsFilterInput::clean()}.
  *
  * @return string
  */
 private static function cleanVar($var, $mask = 0, $type = null)
 {
     // Static input filters for specific settings
     static $noHtmlFilter = null;
     static $safeHtmlFilter = null;
     // If the no trim flag is not set, trim the variable
     if (!($mask & 1) && is_string($var)) {
         $var = trim($var);
     }
     // Now we handle input filtering
     if ($mask & 2) {
         // If the allow raw flag is set, do not modify the variable
     } else {
         XoopsLoad::load('xoopsfilterinput');
         if ($mask & 4) {
             // If the allow html flag is set, apply a safe html filter to the variable
             if (is_null($safeHtmlFilter)) {
                 $safeHtmlFilter = XoopsFilterInput::getInstance(null, null, 1, 1);
             }
             $var = $safeHtmlFilter->clean($var, $type);
         } else {
             // Since no allow flags were set, we will apply the most strict filter to the variable
             if (is_null($noHtmlFilter)) {
                 $noHtmlFilter = XoopsFilterInput::getInstance();
             }
             $var = $noHtmlFilter->clean($var, $type);
         }
     }
     return $var;
 }
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:45,代码来源:xoopsrequest.php

示例11: dirname

 * System Header
 *
 * @copyright   XOOPS Project (http://xoops.org)
 * @license     GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package     system
 * @version     $Id$
 */
// Include XOOPS control panel header
include_once dirname(dirname(__DIR__)) . '/include/cp_header.php';
$xoops = Xoops::getInstance();
XoopsLoad::load('system', 'system');
XoopsLoad::load('module', 'system');
XoopsLoad::load('extension', 'system');
$system = System::getInstance();
// Check user rights
if (!$system->checkRight()) {
    $xoops->redirect(\XoopsBaseConfig::get('url'), 3, XoopsLocale::E_NO_ACCESS_PERMISSION);
}
// System Class
//include_once $xoops->path('/modules/system/class/cookie.php');
// Load Language
$xoops->loadLocale('system');
// Include System files
include_once $xoops->path('/modules/system/include/functions.php');
// include system category definitions
include_once $xoops->path('/modules/system/constants.php');
// Get request variable
$fct = $system->cleanVars($_REQUEST, 'fct', '', 'string');
XoopsLoad::load('systembreadcrumb', 'system');
$system_breadcrumb = SystemBreadcrumb::getInstance($fct);
$system_breadcrumb->addLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:header.php

示例12: list

        list($clickurl) = $xoopsDB->fetchRow($bresult);
        if ($clickurl) {
            if ($GLOBALS['xoopsSecurity']->checkReferer()) {
                $xoopsDB->queryF("UPDATE " . $xoopsDB->prefix("banner") . " SET clicks=clicks+1 WHERE bid={$bid}");
                header('Location: ' . $clickurl);
            } else {
                //No valid referer found so some javascript error or direct access found
                echo _BANNERS_NO_REFERER;
            }
            exit;
        }
    }
    redirect_header(XOOPS_URL, 3, _BANNERS_NO_ID);
    exit;
}
XoopsLoad::load('XoopsFilterInput');
$myts =& MyTextSanitizer::getInstance();
$op = '';
if (!empty($_POST['op'])) {
    // from $_POST we use keys: op, login, pass, url, pass, bid, cid
    $op = trim(XoopsFilterInput::clean($_POST['op'], 'STRING'));
    $clean_login = '';
    if (isset($_POST['login'])) {
        $clean_login = trim(XoopsFilterInput::clean($myts->stripSlashesGPC($_POST['login']), 'STRING'));
    }
    $clean_pass = '';
    if (isset($_POST['pass'])) {
        $clean_pass = trim(XoopsFilterInput::clean($myts->stripSlashesGPC($_POST['pass']), 'STRING'));
    }
    $clean_url = '';
    if (isset($_POST['url'])) {
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:banners.php

示例13: array

$modversion['dirname'] = 'xlanguage';
//about
$modversion['release_date'] = '2012/10/01';
$modversion['module_website_url'] = 'dugris.xoofoo.org';
$modversion['module_website_name'] = 'XooFoo.org - Laurent JEN';
$modversion['module_status'] = 'alpha';
$modversion['min_php'] = '5.3.7';
$modversion['min_xoops'] = '2.6.0';
// paypal
$modversion['paypal'] = array('business' => 'xoopsfoundation@gmail.com', 'item_name' => _MI_XLANGUAGE_DESC, 'amount' => 0, 'currency_code' => 'USD');
// Admin menu
$modversion['system_menu'] = 1;
// Manage extension
$modversion['extension'] = 1;
$modversion['extension_module'][] = 'system';
// Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = 'admin/index.php';
$modversion['adminmenu'] = 'admin/menu.php';
// Scripts to run upon installation or update
$modversion['onInstall'] = 'include/install.php';
$modversion['onUpdate'] = 'include/install.php';
// SQL informations
$modversion['schema'] = 'sql/schema.yml';
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
$modversion['tables'] = array('xlanguage');
//language selection block
$modversion['blocks'][] = array('file' => 'xlanguage_blocks.php', 'name' => _MI_XLANGUAGE_BNAME, 'description' => '', 'show_func' => 'b_xlanguage_select_show', 'edit_func' => 'b_xlanguage_select_edit', 'options' => 'images| |5', 'template' => 'xlanguage_block.tpl');
// Config
XoopsLoad::load('xoopslists');
$modversion['config'][] = array('name' => 'theme', 'title' => '_MI_XLANGUAGE_THEME', 'description' => '_MI_XLANGUAGE_THEME_DESC', 'formtype' => 'select', 'valuetype' => 'text', 'default' => '64', 'options' => XoopsLists::getDirListAsArray(Xoops::getInstance()->path('media/xoops/images/flags')));
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:xoops_version.php

示例14: header

 function header()
 {
     $xoops = Xoops::getInstance();
     $xoops->loadLocale('system');
     $xoops->theme()->addBaseStylesheetAssets('@jqueryuicss');
     $xoops->theme()->addStylesheet('media/xoops/css/moduladmin.css');
     $xoops->theme()->addStylesheet(\XoopsBaseConfig::get('adminthemes-url') . '/default/css/style.css');
     $xoops->theme()->addBaseScriptAssets('@jquery');
     // bootstrap has to come before jquery.ui or dialog close buttons are blank
     $xoops->theme()->addBaseScriptAssets('@bootstrap');
     $xoops->theme()->addBaseScriptAssets('@jqueryui');
     $xoops->theme()->addBaseScriptAssets('@jgrowl');
     // ddsmoothmenu
     $xoops->theme()->addScript(\XoopsBaseConfig::get('adminthemes-url') . '/default/js/ddsmoothmenu.js');
     $xoops->theme()->addScript(\XoopsBaseConfig::get('adminthemes-url') . '/default/js/tooltip.js');
     $quick = array();
     $quick[] = array('title' => SystemLocale::CONTROL_PANEL, 'link' => \XoopsBaseConfig::get('url') . '/admin.php');
     $quick[] = array('title' => XoopsLocale::HOME_PAGE, 'link' => \XoopsBaseConfig::get('url'));
     $quick[] = array('title' => DefaultThemeLocale::XOOPS_NEWS, 'link' => \XoopsBaseConfig::get('url') . '/admin.php?xoopsorgnews=1');
     $quick[] = array('title' => 'separator');
     $quick[] = array('title' => XoopsLocale::A_LOGOUT, 'link' => \XoopsBaseConfig::get('url') . '/user.php?op=logout');
     $xoops->tpl()->assign('quick_menu', $quick);
     XoopsLoad::load('module', 'system');
     XoopsLoad::load('extension', 'system');
     $system_module = new SystemModule();
     $system_extension = new SystemExtension();
     $adminmenu = null;
     include __DIR__ . '/menu.php';
     if (!$xoops->isModule() || 'system' == $xoops->module->getVar('dirname', 'n')) {
         $modpath = \XoopsBaseConfig::get('url') . '/admin.php';
         $modname = DefaultThemeLocale::SYSTEM_OPTIONS;
         $modid = 1;
         $moddir = 'system';
         $mod_options = $adminmenu;
         foreach (array_keys($mod_options) as $item) {
             $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? \XoopsBaseConfig::get('url') . '/modules/' . $moddir . '/' . $mod_options[$item]['link'] : $mod_options[$item]['link'];
             $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : \XoopsBaseConfig::get('adminthemes-url') . '/default/' . $mod_options[$item]['icon'];
             unset($mod_options[$item]['icon_small']);
         }
     } else {
         $moddir = $xoops->module->getVar('dirname', 'n');
         $modpath = \XoopsBaseConfig::get('url') . '/modules/' . $moddir;
         $modname = $xoops->module->getVar('name');
         $modid = $xoops->module->getVar('mid');
         $mod_options = $xoops->module->getAdminMenu();
         foreach (array_keys($mod_options) as $item) {
             $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? \XoopsBaseConfig::get('url') . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link'];
             if (XoopsLoad::fileExists($xoops->path("/media/xoops/images/icons/32/" . $mod_options[$item]['icon']))) {
                 $mod_options[$item]['icon'] = $xoops->url("/media/xoops/images/icons/32/" . $mod_options[$item]['icon']);
             } else {
                 $mod_options[$item]['icon'] = $xoops->url("/modules/" . $xoops->module->dirname() . "/icons/32/" . $mod_options[$item]['icon']);
             }
         }
     }
     $xoops->tpl()->assign('mod_options', $mod_options);
     $xoops->tpl()->assign('modpath', $modpath);
     $xoops->tpl()->assign('modname', $modname);
     $xoops->tpl()->assign('modid', $modid);
     $xoops->tpl()->assign('moddir', $moddir);
     // Modules list
     $module_list = $system_module->getModuleList();
     $xoops->tpl()->assign('module_menu', $module_list);
     unset($module_list);
     // Extensions list
     $extension_list = $system_extension->getExtensionList();
     $xoops->tpl()->assign('extension_menu', $extension_list);
     unset($extension_list);
     $extension_mod = $system_extension->getExtension($moddir);
     $xoops->tpl()->assign('extension_mod', $extension_mod);
     // add preferences menu
     $menu = array();
     $OPT = array();
     $menu[] = array('link' => \XoopsBaseConfig::get('url') . '/modules/system/admin.php?fct=preferences', 'title' => XoopsLocale::PREFERENCES, 'absolute' => 1, 'url' => \XoopsBaseConfig::get('url') . '/modules/system/', 'options' => $OPT);
     $menu[] = array('title' => 'separator');
     // Module adminmenu
     if ($xoops->isModule() && $xoops->module->getVar('dirname') != 'system') {
         if ($xoops->module->getInfo('system_menu')) {
             //$xoops->theme()->addStylesheet('modules/system/css/menu.css');
             $xoops->module->loadAdminMenu();
             // Get menu tab handler
             /* @var $menu_handler SystemMenuHandler */
             $menu_handler = $xoops->getModuleHandler('menu', 'system');
             // Define top navigation
             $menu_handler->addMenuTop(\XoopsBaseConfig::get('url') . "/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod=" . $xoops->module->getVar('mid', 'e'), XoopsLocale::PREFERENCES);
             if ($xoops->module->getInfo('extension')) {
                 $menu_handler->addMenuTop(\XoopsBaseConfig::get('url') . "/modules/system/admin.php?fct=extensions&amp;op=update&amp;module=" . $xoops->module->getVar('dirname', 'e'), XoopsLocale::A_UPDATE);
             } else {
                 $menu_handler->addMenuTop(\XoopsBaseConfig::get('url') . "/modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module=" . $xoops->module->getVar('dirname', 'e'), XoopsLocale::A_UPDATE);
             }
             if ($xoops->module->getInfo('blocks')) {
                 $menu_handler->addMenuTop(\XoopsBaseConfig::get('url') . "/modules/system/admin.php?fct=blocksadmin&amp;op=list&amp;filter=1&amp;selgen=" . $xoops->module->getVar('mid', 'e') . "&amp;selmod=-2&amp;selgrp=-1&amp;selvis=-1", XoopsLocale::BLOCKS);
             }
             if ($xoops->module->getInfo('hasMain')) {
                 $menu_handler->addMenuTop(\XoopsBaseConfig::get('url') . "/modules/" . $xoops->module->getVar('dirname', 'e') . "/", SystemLocale::GO_TO_MODULE);
             }
             // Define main tab navigation
             $i = 0;
             $current = $i;
             foreach ($xoops->module->adminmenu as $menu) {
                 if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) {
//.........这里部分代码省略.........
开发者ID:RanLee,项目名称:XoopsCore,代码行数:101,代码来源:default.php

示例15: defined

 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         core
 * @since           2.4.0
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id$
 */
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
defined('NWLINE') or define('NWLINE', "\n");
$xoopsOption['nocommon'] = true;
require_once dirname(__FILE__) . DS . 'mainfile.php';
error_reporting(0);
include_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'defines.php';
include_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'version.php';
require_once XOOPS_ROOT_PATH . DS . 'class' . DS . 'xoopsload.php';
XoopsLoad::load('xoopskernel');
$xoops = new xos_kernel_Xoops2();
$xoops->pathTranslation();
// Fetch path from query string if path is not set, i.e. through a direct request
if (!isset($path) && !empty($_SERVER['QUERY_STRING'])) {
    $path = $_SERVER['QUERY_STRING'];
    $path = substr($path, 0, 1) == '/' ? substr($path, 1) : $path;
    $path_type = substr($path, 0, strpos($path, '/'));
    if (!isset($xoops->paths[$path_type])) {
        $path = "XOOPS/" . $path;
        $path_type = "XOOPS";
    }
}
//We are not allowing output of xoops_data
if ($path_type == 'var') {
    header("HTTP/1.0 404 Not Found");
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:browse.php


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