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


PHP xoops_getcss函数代码示例

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


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

示例1: callbackSetupUser

 /**
  * Checks whether the site is closed now, and whether all of must modules
  * have been installed. This function is called through delegates.
  * @var XoopsUser &$xoopsUser
  * @see preBlockFilter()
  */
 function callbackSetupUser(&$principal, &$controller, &$context)
 {
     $accessAllowFlag = false;
     $xoopsConfig = $controller->mRoot->mContext->getXoopsConfig();
     if (!empty($_POST['xoops_login'])) {
         $controller->checkLogin();
         return;
     } else {
         if (@$_GET['op'] == 'logout') {
             // GIJ
             $controller->logout();
             return;
         } elseif (is_object($context->mXoopsUser)) {
             foreach ($context->mXoopsUser->getGroups() as $group) {
                 if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
                     $accessAllowFlag = true;
                     break;
                 }
             }
         }
     }
     if (!$accessAllowFlag) {
         require_once XOOPS_ROOT_PATH . '/class/template.php';
         $xoopsTpl = new XoopsTpl();
         $xoopsTpl->assign(array('xoops_sitename' => htmlspecialchars($xoopsConfig['sitename']), 'xoops_isuser' => is_object($context->mXoopsUser), 'xoops_themecss' => xoops_getcss(), 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/', 'lang_login' => _LOGIN, 'lang_username' => _USERNAME, 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $xoopsConfig['closesite_text']));
         $xoopsTpl->compile_check = true;
         // @todo filebase template with absolute file path
         $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/legacy/templates/legacy_site_closed.html');
         exit;
     }
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:37,代码来源:SiteClose.class.php

示例2: preBlockFilter

 function preBlockFilter()
 {
     if (LEGACY_INSTALLERCHECKER_ACTIVE == true && is_dir(XOOPS_ROOT_PATH . "/install")) {
         $root =& XCube_Root::getSingleton();
         $root->mLanguageManager->loadModuleMessageCatalog('legacy');
         $xoopsConfig = $root->mContext->mXoopsConfig;
         require_once XOOPS_ROOT_PATH . '/class/template.php';
         $xoopsTpl = new XoopsTpl();
         $xoopsTpl->assign(array('xoops_sitename' => htmlspecialchars($xoopsConfig['sitename']), 'xoops_themecss' => xoops_getcss(), 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/', 'lang_message_confirm' => XCube_Utils::formatMessage(_MD_LEGACY_MESSAGE_INSTALL_COMPLETE_CONFIRM, XOOPS_ROOT_PATH . "/install"), 'lang_message_warning' => XCube_Utils::formatMessage(_MD_LEGACY_MESSAGE_INSTALL_COMPLETE_WARNING, XOOPS_ROOT_PATH . "/install")));
         $xoopsTpl->compile_check = true;
         // @todo filebase template with absolute file path
         $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/legacy/templates/legacy_install_completed.html');
         exit;
     }
 }
开发者ID:nunoluciano,项目名称:uxcl,代码行数:15,代码来源:InstallerChecker.class.php

示例3: pico_xoopstpl

function pico_xoopstpl($mydirname, $text, $content4assign)
{
    global $xoopsTpl;
    $tpl =& new XoopsTpl();
    //$tpl->plugins_dir[] = dirname(dirname(__FILE__)).'/smarty_plugins' ;
    array_unshift($tpl->plugins_dir, dirname(dirname(__FILE__)) . '/smarty_plugins');
    // pico plugin has the first priority
    if (is_object(@$xoopsTpl)) {
        $tpl->assign($xoopsTpl->get_template_vars());
        if (defined('XOOPS_CUBE_LEGACY')) {
            $root =& XCube_Root::getSingleton();
            $context =& $root->getContext();
            $themeName = $context->getThemeName();
            $tpl->assign('xoops_theme', $themeName);
            $tpl->assign('xoops_imageurl', XOOPS_THEME_URL . "/{$themeName}/");
            $tpl->assign('xoops_themecss', xoops_getcss($themeName));
        }
    }
    $tpl->assign('mydirname', $mydirname);
    $tpl->assign('mod_url', XOOPS_URL . '/modules/' . $mydirname);
    $tpl->assign('content', $content4assign);
    // assign special session
    $session_prefix = $mydirname . '_' . @$content4assign['id'] . '_';
    $session4assign = array();
    foreach (array_keys(@$_SESSION) as $index) {
        if (strncmp($index, $session_prefix, strlen($session_prefix)) === 0) {
            $session4assign[substr($index, strlen($session_prefix))] = $_SESSION[$index];
        }
    }
    $tpl->assign('session', $session4assign);
    $temp_file = XOOPS_COMPILE_PATH . '/' . substr(md5(XOOPS_DB_PREFIX . @$content4assign['id']), 16) . $mydirname . '_temp_resource';
    if (!$text || $text != @file_get_contents($temp_file)) {
        $fw = fopen($temp_file, 'wb');
        fwrite($fw, $text);
        fclose($fw);
        $tpl->clear_compiled_tpl('file:' . $temp_file);
    }
    $text = $tpl->fetch('file:' . $temp_file);
    //	unlink( $temp_file ) ;
    return $text;
}
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:41,代码来源:pico_xoopstpl.php

示例4: xoops_cp_footer

         echo $err;
     }
     echo '</code><br /><a href="admin.php?fct=tplsets">' . _MD_AM_BTOTADMIN . '</a>';
     xoops_cp_footer();
     break;
 case 'previewtpl':
     if (!$GLOBALS['xoopsSecurity']->check()) {
         redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
     }
     require_once XOOPS_ROOT_PATH . '/class/template.php';
     $myts =& MyTextsanitizer::getInstance();
     $html = $myts->stripSlashesGPC($html);
     $tpltpl_handler =& xoops_gethandler('tplfile');
     $tplfile =& $tpltpl_handler->get($id, true);
     if (is_object($tplfile)) {
         $dummylayout = '<html><head><meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" /><meta http-equiv="content-language" content="' . _LANGCODE . '" /><title>' . $xoopsConfig['sitename'] . '</title><style type="text/css" media="all" href="' . xoops_getcss() . '" />';
         $dummylayout .= '</head><body><{$content}></body></html>';
         if ($tplfile->getVar('tpl_type') == 'block') {
             $block_handler =& xoops_gethandler('block');
             $instance_handler =& xoops_gethandler('blockinstance');
             $instance =& $instance_handler->get($tplfile->getVar('tpl_refid'));
             $instance->setBlock($block_handler->get($instance->getVar('bid')));
             $xoopsTpl->assign('block', $instance->buildBlock());
         }
         $dummytpl = '_dummytpl_' . time() . '.html';
         $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummytpl, 'w');
         fwrite($fp, $html);
         fclose($fp);
         $xoopsTpl->assign('content', $xoopsTpl->fetch('file:' . XOOPS_CACHE_PATH . '/' . $dummytpl));
         $xoopsTpl->clear_compiled_tpl('file:' . XOOPS_CACHE_PATH . '/' . $dummytpl);
         unlink(XOOPS_CACHE_PATH . '/' . $dummytpl);
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:main.php

示例5: themeheader

    }
    themeheader($xoopsOption['show_rblock']);
    if ($xoopsOption['show_cblock']) {
        make_cblock();
    }
    //create center block
} else {
    $xoopsOption['theme_use_smarty'] = 1;
    // include Smarty template engine and initialize it
    require_once XOOPS_ROOT_PATH . '/class/template.php';
    $xoopsTpl = new XoopsTpl();
    $xoopsTpl->xoops_setCaching(2);
    if ($xoopsConfig['debug_mode'] == 3) {
        $xoopsTpl->xoops_setDebugging(true);
    }
    $xoopsTpl->assign(array('xoops_theme' => $xoopsConfig['theme_set'], 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/', 'xoops_themecss' => xoops_getcss($xoopsConfig['theme_set']), 'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES), 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
    // Meta tags
    $config_handler =& xoops_gethandler('config');
    $criteria = new CriteriaCompo(new Criteria('conf_modid', 0));
    $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER));
    $config =& $config_handler->getConfigs($criteria, true);
    foreach (array_keys($config) as $i) {
        // prefix each tag with 'xoops_'
        $xoopsTpl->assign('xoops_' . $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
    }
    //unset($config);
    // show banner?
    if ($xoopsConfig['banners'] == 1) {
        $xoopsTpl->assign('xoops_banner', xoops_getbanner());
    } else {
        $xoopsTpl->assign('xoops_banner', '&nbsp;');
开发者ID:BackupTheBerlios,项目名称:xoops4-svn,代码行数:31,代码来源:header.php

示例6: str_replace

        //$row = mysql_fetch_object($result);
        if ($autostart == 1) {
            $autostart = 'true';
        } else {
            $autostart = 'false';
        }
        /* generate output */
        $player1 = str_replace('<@height@>', $height, $player);
        $player2 = str_replace('<@width@>', $width, $player1);
        $player3 = str_replace('<@autostart@>', $autostart, $player2);
    } else {
        $player3 .= preselected_player($fileid);
    }
} else {
    $player3 .= preselected_player($fileid);
}
$player4 = str_replace('<@mp3file@>', $mp3file, $player3);
$xoopsTpl->assign("player", $player4);
$allowyes = 1;
/* determine if downloads are allowed or if download is a link */
if ($xoopsModuleConfig['debaserallowdown'] == 1) {
    $xoopsTpl->assign("allowyes", $allowyes);
    if ($link != '') {
        $xoopsTpl->assign('linkyes', true);
        $xoopsTpl->assign('downlink', $link);
    }
}
$xoopsDB->queryF("\r\n\tUPDATE " . $xoopsDB->prefix('debaser_files') . " \r\n\tSET views = views+1 \r\n\tWHERE xfid = " . $songid . "");
$xoopsTpl->assign("maintheme", xoops_getcss($xoopsConfig['theme_set']));
$xoopsTpl->assign("xoops_url", XOOPS_URL);
$xoopsTpl->display('db:debaser_player.html');
开发者ID:artistafrustrado,项目名称:debaser-diaadiaeducacao,代码行数:31,代码来源:player.php

示例7: draw_repost_form

 function draw_repost_form($area = '')
 {
     // Notify which file is broken
     if (headers_sent()) {
         restore_error_handler();
         set_error_handler('_XoopsNTicket_ErrorHandler4FindOutput');
         header('Dummy: for warning');
         restore_error_handler();
         exit;
     }
     error_reporting(0);
     while (ob_get_level()) {
         ob_end_clean();
     }
     global $xoopsTpl, $xoopsConfig, $xoopsOption, $xoopsLogger;
     if (file_exists(XOOPS_ROOT_PATH . '/themes/default/theme.html')) {
         $xoopsConfig['theme_set'] = 'default';
     }
     unset($xoopsOption['template_main']);
     $xoopsTpl =& new XoopsTpl();
     $xoopsOption['theme_use_smarty'] = 1;
     $xoopsConfig['debug_mode'] = 0;
     ob_start();
     $xoopsTpl->assign(array('xoops_theme' => $xoopsConfig['theme_set'], 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/', 'xoops_themecss' => xoops_getcss($xoopsConfig['theme_set']), 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
     $table = '<table class="outer">';
     $form = '<form action="?' . htmlspecialchars(@$_SERVER['QUERY_STRING'], ENT_QUOTES) . '" method="post" >';
     foreach ($_POST as $key => $val) {
         if ($key == $this->_post_param_name) {
             continue;
         }
         if (get_magic_quotes_gpc()) {
             $key = stripslashes($key);
         }
         if (is_array($val)) {
             list($tmp_table, $tmp_form) = $this->extract_post_recursive(htmlspecialchars($key, ENT_QUOTES), $val);
             $table .= $tmp_table;
             $form .= $tmp_form;
         } else {
             if (get_magic_quotes_gpc()) {
                 $val = stripslashes($val);
             }
             $table .= '<tr><th><code>' . htmlspecialchars($key, ENT_QUOTES) . '</code></th><td class="odd"><pre style="margin:0;padding:0;overflow:auto;"><code>' . htmlspecialchars($val, ENT_QUOTES) . '</code></pre></td></tr>' . "\n";
             $form .= '<input type="hidden" name="' . htmlspecialchars($key, ENT_QUOTES) . '" value="' . htmlspecialchars($val, ENT_QUOTES) . '" />' . "\n";
         }
     }
     $table .= '</table>';
     $form .= $this->getTicketHtml(__LINE__, 300, $area) . '<input type="submit" value="' . $this->messages['btn_repost'] . '" /></form>';
     //		echo '<html><head><title>'.$this->messages['err_general'].'</title><style>table,td,th {border:solid black 1px; border-collapse:collapse;}</style></head><body>' . sprintf( $this->messages['fmt_prompt4repost'] , $this->getErrors() ) . $table . $form . '</body></html>' ;
     echo sprintf($this->messages['fmt_prompt4repost'], $this->getErrors()) . $table . $form;
     include XOOPS_ROOT_PATH . '/footer.php';
 }
开发者ID:nobunobuta,项目名称:xoops_mod_WordPress,代码行数:51,代码来源:wp-tickets.php

示例8: callbackSetupUser

 /**
  * Checks whether the site is closed now, and whether all of must modules
  * have been installed. This function is called through delegates.
  * @var XoopsUser &$xoopsUser
  * @see preBlockFilter()
  */
 function callbackSetupUser(&$principal, &$controller, &$context)
 {
     $retArray = Legacy_Utils::checkSystemModules();
     $accessAllowFlag = false;
     $xoopsConfig = $controller->mRoot->mContext->getXoopsConfig();
     if (!empty($_POST['xoops_login'])) {
         define('XOOPS_CPFUNC_LOADED', 1);
         $controller->checkLogin();
         return;
     } elseif (is_object($context->mXoopsUser)) {
         if (in_array(XOOPS_GROUP_ADMIN, $context->mXoopsUser->getGroups())) {
             $accessAllowFlag = true;
         }
     }
     // @todo Devide following lines to another preload file
     if ($accessAllowFlag) {
         $GLOBALS['xoopsUser'] = $context->mXoopsUser;
         if (!empty($_POST['cube_module_install'])) {
             //@todo use Ticket
             require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleInstaller.class.php";
             require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleInstallUtils.class.php";
             if (isset($_POST['uninstalled_modules']) && is_array($_POST['uninstalled_modules'])) {
                 foreach ($_POST['uninstalled_modules'] as $module) {
                     $module = basename($module);
                     if (in_array($module, $retArray['uninstalled'])) {
                         $controller->mRoot->mLanguageManager->loadModuleAdminMessageCatalog('legacy');
                         $handler =& xoops_gethandler('module');
                         $xoopsModule =& $handler->create();
                         $xoopsModule->set('weight', 1);
                         $xoopsModule->loadInfoAsVar($module);
                         $installer =& Legacy_ModuleInstallUtils::createInstaller($xoopsModule->get('dirname'));
                         $installer->setForceMode(true);
                         $installer->setCurrentXoopsModule($xoopsModule);
                         $installer->executeInstall();
                     }
                 }
             }
             if (isset($_POST['disabled_modules']) && is_array($_POST['disabled_modules'])) {
                 $moduleHandler =& xoops_gethandler('module');
                 foreach ($_POST['disabled_modules'] as $module) {
                     $module = basename($module);
                     if (in_array($module, $retArray['disabled'])) {
                         if ($moduleObject =& $moduleHandler->getByDirname($module)) {
                             $moduleObject->setVar('isactive', 1);
                             $moduleHandler->insert($moduleObject);
                             $blockHandler =& xoops_gethandler('block');
                             $blockHandler->syncIsActive($moduleObject->get('mid'), $moduleObject->get('isactive'));
                         }
                     }
                 }
             }
             if (isset($_POST['option_modules']) && is_array($_POST['option_modules'])) {
                 $handler =& xoops_getmodulehandler('non_installation_module', 'legacy');
                 $objects = $handler->getObjects();
                 $optionModules = array();
                 foreach ($objects as $module) {
                     if (!in_array($module->get('dirname'), $retArray['uninstalled'])) {
                         $optionModules[] = $module->get('dirname');
                     }
                 }
                 foreach ($_POST['option_modules'] as $module) {
                     $module = basename($module);
                     if (in_array($module, $optionModules)) {
                         $controller->mRoot->mLanguageManager->loadModuleAdminMessageCatalog('legacy');
                         $handler =& xoops_gethandler('module');
                         $xoopsModule =& $handler->create();
                         $xoopsModule->set('weight', 1);
                         $xoopsModule->loadInfoAsVar($module);
                         $installer =& Legacy_ModuleInstallUtils::createInstaller($xoopsModule->get('dirname'));
                         $installer->setForceMode(true);
                         $installer->setCurrentXoopsModule($xoopsModule);
                         $installer->executeInstall();
                     }
                 }
             }
             $controller->executeRedirect(XOOPS_URL . '/', 1);
         } elseif (!empty($_GET['cube_module_uninstall'])) {
             require_once XOOPS_ROOT_PATH . '/class/template.php';
             $xoopsTpl = new XoopsTpl();
             $xoopsTpl->assign('cube_module_uninstall', htmlspecialchars($_GET['cube_module_uninstall'], ENT_QUOTES));
             $xoopsTpl->assign(array('xoops_sitename' => htmlspecialchars($xoopsConfig['sitename']), 'xoops_themecss' => xoops_getcss(), 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/'));
             ///< @todo filebase template with absolute file path
             $xoopsTpl->compile_check = true;
             $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/legacy/templates/legacy_uninstall_modules.html');
             exit;
         } elseif (!empty($_POST['cube_module_uninstallok'])) {
             //@todo use Ticket
             require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleUninstaller.class.php";
             require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleInstallUtils.class.php";
             $module = basename($_POST['cube_module_uninstallok']);
             if (in_array($module, $retArray['disabled'])) {
                 $controller->mRoot->mLanguageManager->loadModuleAdminMessageCatalog('legacy');
                 $handler =& xoops_gethandler('module');
                 $xoopsModule =& $handler->getByDirname($module);
//.........这里部分代码省略.........
开发者ID:nouphet,项目名称:rata,代码行数:101,代码来源:SystemModuleInstall.class.php

示例9: isset

$username = isset($_POST['username']) ? trim($_POST['username']) : '';
$password = isset($_POST['userpass']) ? trim($_POST['userpass']) : '';
if ($username == '' || $password == '') {
    $op = 'login';
}
echo '
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />
    <meta http-equiv="content-language" content="' . _LANGCODE . '" />
    <title>' . $xoopsConfig['sitename'] . '</title>
    <link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/xoops.css" />
';
$style = getcss($xoopsConfig['theme_set']);
if ($style == '') {
    $style = xoops_getcss($xoopsConfig['theme_set']);
}
if ($style != '') {
    echo '<link rel="stylesheet" type="text/css" media="all" href="' . $style . '" />';
}
echo '
  </head>
  <body>
';
if ($op == 'dologin') {
    $member_handler =& xoops_gethandler('member');
    $myts =& MyTextsanitizer::getInstance();
    $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password)));
    if (is_object($user)) {
        if (0 == $user->getVar('level')) {
            redirect_header(XOOPS_URL . '/index.php', 5, _US_NOACTTPADM);
开发者ID:BackupTheBerlios,项目名称:xoops4-svn,代码行数:31,代码来源:login.php

示例10: getSQLDebug

 /**
  * Returns javascript for the SQL debug window
  *
  * @return string
  **/
 function getSQLDebug()
 {
     global $xoopsConfig;
     $ret = '<script type="text/javascript">
     		<!--//
     		debug_window = openWithSelfMain("", "popup", 680, 450, true);
     		debug_window.document.clear();
     		';
     $content = '<html><head>
                 <meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />
                 <meta http-equiv="content-language" content="' . _LANGCODE . '" />
                 <title>' . $xoopsConfig['sitename'] . '</title>
                 <link rel="stylesheet" type="text/css" media="all" href="' . xoops_getcss($xoopsConfig['theme_set']) . '" />
                 </head>
                 <body>' . $this->dumpAll() . '
                 <div style="text-align:center;">
                 <input class="formButton" value="' . _CLOSE . '" type="button" onclick="javascript:window.close();" />
                 </div>
                 </body>
                 </html>';
     $lines = preg_split("/(\r\n|\r|\n)( *)/", $content);
     foreach ($lines as $line) {
         $ret .= 'debug_window.document.writeln("' . str_replace('"', '\\"', $line) . '");';
     }
     //$ret .= 'debug_window.focus();';
     $ret .= 'debug_window.document.close();
             window.focus();
     		//-->
     		</script>';
     return $ret;
 }
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:36,代码来源:logger.php

示例11: XoopsTpl

//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>                             //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  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.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
include '../../mainfile.php';
require_once XOOPS_ROOT_PATH . '/class/template.php';
$xoopsTpl = new XoopsTpl();
$xfid = $xoopsDB->getInsertId();
$sql = "\r\n\tSELECT title, artist, album, year, addinfo, track, genre, length, bitrate, frequence, approved\r\n\tFROM " . $xoopsDB->prefix('debaser_files') . "\r\n\tORDER BY xfid DESC";
$result = $xoopsDB->query($sql);
list($title, $artist, $album, $year, $addinfo, $track, $genre, $length, $bitrate, $frequence, $approved) = $xoopsDB->fetchRow($result);
$xoopsTpl->assign(array('title' => $title, 'artist' => $artist, 'album' => $album, 'year' => $year, 'addinfo' => $addinfo, 'track' => $track, 'genre' => $genre, 'length' => $length, 'bitrate' => $bitrate, 'frequence' => $frequence, 'approved' => $approved, 'maintheme' => xoops_getcss($xoopsConfig['theme_set'])));
$xoopsTpl->display('db:debaser_uploadresult.html');
开发者ID:artistafrustrado,项目名称:debaser-diaadiaeducacao,代码行数:31,代码来源:uploadresult.php

示例12: redirect_header

/**
 * Function to redirect a user to certain pages
 */
function redirect_header($url, $time = 3, $message = '', $addredirect = true, $allowExternalLink = false)
{
    global $xoopsConfig, $xoopsLogger, $xoopsUserIsAdmin;
    $xoopsPreload =& XoopsPreload::getInstance();
    $xoopsPreload->triggerEvent('core.include.functions.redirectheader', array($url, $time, $message, $addredirect, $allowExternalLink));
    if (preg_match("/[\\0-\\31]|about:|script:/i", $url)) {
        if (!preg_match('/^\\b(java)?script:([\\s]*)history\\.go\\(-[0-9]*\\)([\\s]*[;]*[\\s]*)$/si', $url)) {
            $url = XOOPS_URL;
        }
    }
    if (!$allowExternalLink && ($pos = strpos($url, '://'))) {
        $xoopsLocation = substr(XOOPS_URL, strpos(XOOPS_URL, '://') + 3);
        if (strcasecmp(substr($url, $pos + 3, strlen($xoopsLocation)), $xoopsLocation)) {
            $url = XOOPS_URL;
        }
    }
    if (defined('XOOPS_CPFUNC_LOADED')) {
        $theme = 'default';
    } else {
        $theme = $xoopsConfig['theme_set'];
    }
    require_once XOOPS_ROOT_PATH . '/class/template.php';
    require_once XOOPS_ROOT_PATH . '/class/theme.php';
    $xoopsThemeFactory = null;
    $xoopsThemeFactory = new xos_opal_ThemeFactory();
    $xoopsThemeFactory->allowedThemes = $xoopsConfig['theme_set_allowed'];
    $xoopsThemeFactory->defaultTheme = $theme;
    $xoTheme =& $xoopsThemeFactory->createInstance(array("plugins" => array(), "renderBanner" => false));
    $xoopsTpl =& $xoTheme->template;
    $xoopsTpl->assign(array('xoops_theme' => $theme, 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $theme . '/', 'xoops_themecss' => xoops_getcss($theme), 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES), 'xoops_dirname' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('dirname') : 'system', 'xoops_pagetitle' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('name') : htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
    if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) {
        $xoopsTpl->assign('time', 300);
        $xoopsTpl->assign('xoops_logdump', $xoopsLogger->dump());
    } else {
        $xoopsTpl->assign('time', intval($time));
    }
    if (!empty($_SERVER['REQUEST_URI']) && $addredirect && strstr($url, 'user.php')) {
        if (!strstr($url, '?')) {
            $url .= '?xoops_redirect=' . urlencode($_SERVER['REQUEST_URI']);
        } else {
            $url .= '&amp;xoops_redirect=' . urlencode($_SERVER['REQUEST_URI']);
        }
    }
    if (defined('SID') && SID && (!isset($_COOKIE[session_name()]) || $xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']]))) {
        if (!strstr($url, '?')) {
            $url .= '?' . SID;
        } else {
            $url .= '&amp;' . SID;
        }
    }
    $url = preg_replace("/&amp;/i", '&', htmlspecialchars($url, ENT_QUOTES));
    $xoopsTpl->assign('url', $url);
    $message = trim($message) != '' ? $message : _TAKINGBACK;
    $xoopsTpl->assign('message', $message);
    $xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
    $xoopsTpl->display('db:system_redirect.html');
    exit;
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:61,代码来源:functions.php

示例13: _commonPrepareRender

 /**
  * @protected
  * Assign common variables for the compatibility with X2.
  */
 function _commonPrepareRender()
 {
     $root =& $this->mController->mRoot;
     $context =& $root->getContext();
     $textFilter =& $root->getTextFilter();
     $themeName = $context->getThemeName();
     $vars = array('xoops_theme' => $themeName, 'xoops_imageurl' => XOOPS_THEME_URL . "/{$themeName}/", 'xoops_themecss' => xoops_getcss($themeName), 'xoops_sitename' => $textFilter->toShow($context->getAttribute('legacy_sitename')), 'xoops_pagetitle' => $textFilter->toShow($context->getAttribute('legacy_pagetitle')), 'xoops_slogan' => $textFilter->toShow($context->getAttribute('legacy_slogan')));
     //
     // Assign module informations.
     //
     if ($context->mModule != null) {
         // The process of module
         $xoopsModule =& $context->mXoopsModule;
         $vars['xoops_modulename'] = $xoopsModule->getVar('name');
         $vars['xoops_dirname'] = $xoopsModule->getVar('dirname');
     }
     if (isset($GLOBALS['xoopsUserIsAdmin'])) {
         $vars['xoops_isadmin'] = $GLOBALS['xoopsUserIsAdmin'];
     }
     $this->mXoopsTpl->assign($vars);
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:25,代码来源:Legacy_RenderSystem.class.php

示例14: xoInit

 /**
  * Initializes this theme
  *
  * Upon initialization, the theme creates its template engine and instantiates the
  * plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not
  * display redirection messages, the HTTP redirections system is disabled to ensure users will
  * see the redirection screen.
  *
  * @param  array $options
  * @return bool
  */
 public function xoInit($options = array())
 {
     /** @var XoopsConfigHandler $configHandler */
     $configHandler = xoops_getHandler('config');
     $this->path = XOOPS_THEME_PATH . '/' . $this->folderName;
     $this->url = XOOPS_THEME_URL . '/' . $this->folderName;
     $this->template = null;
     $this->template = new XoopsTpl();
     $this->template->currentTheme = $this;
     $this->template->assign_by_ref('xoTheme', $this);
     $xoops_page = str_replace(realpath(XOOPS_ROOT_PATH) . '/', '', realpath($_SERVER['SCRIPT_FILENAME']));
     if (strpos($xoops_page, 'modules') !== false) {
         $xoops_page = str_replace('modules/', '', $xoops_page);
     }
     $xoops_page = str_replace('.php', '', $xoops_page);
     if (isset($GLOBALS['xoopsConfig']['startpage'])) {
         $xoops_startpage = $GLOBALS['xoopsConfig']['startpage'];
         if ($xoops_startpage == '--') {
             $xoops_startpage = 'system';
         }
     } else {
         $xoops_startpage = 'system';
     }
     $searchConfig = $configHandler->getConfigsByCat(XOOPS_CONF_SEARCH);
     $xoops_search = (bool) (isset($searchConfig['enable_search']) && $searchConfig['enable_search'] === 1);
     $this->template->assign(array('xoops_theme' => $GLOBALS['xoopsConfig']['theme_set'], 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $GLOBALS['xoopsConfig']['theme_set'] . '/', 'xoops_themecss' => xoops_getcss($GLOBALS['xoopsConfig']['theme_set']), 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), 'xoops_sitename' => htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($GLOBALS['xoopsConfig']['slogan'], ENT_QUOTES), 'xoops_dirname' => isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('dirname') : 'system', 'xoops_page' => $xoops_page, 'xoops_startpage' => $xoops_startpage, 'xoops_banner' => $GLOBALS['xoopsConfig']['banners'] && $this->renderBanner ? xoops_getbanner() : '&nbsp;', 'xoops_pagetitle' => isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('name') : htmlspecialchars($GLOBALS['xoopsConfig']['slogan'], ENT_QUOTES), 'xoops_search' => $xoops_search));
     if (isset($GLOBALS['xoopsUser']) && is_object($GLOBALS['xoopsUser'])) {
         $this->template->assign(array('xoops_isuser' => true, 'xoops_avatar' => XOOPS_UPLOAD_URL . '/' . $GLOBALS['xoopsUser']->getVar('user_avatar'), 'xoops_userid' => $GLOBALS['xoopsUser']->getVar('uid'), 'xoops_uname' => $GLOBALS['xoopsUser']->getVar('uname'), 'xoops_name' => $GLOBALS['xoopsUser']->getVar('name'), 'xoops_isadmin' => $GLOBALS['xoopsUserIsAdmin'], 'xoops_usergroups' => $GLOBALS['xoopsUser']->getGroups()));
     } else {
         $this->template->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false, 'xoops_usergroups' => array(XOOPS_GROUP_ANONYMOUS)));
     }
     // Meta tags
     $criteria = new CriteriaCompo(new Criteria('conf_modid', 0));
     $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER));
     $config = $configHandler->getConfigs($criteria, true);
     foreach (array_keys($config) as $i) {
         $name = $config[$i]->getVar('conf_name', 'n');
         $value = $config[$i]->getVar('conf_value', 'n');
         if (substr($name, 0, 5) === 'meta_') {
             $this->addMeta('meta', substr($name, 5), $value);
         } else {
             // prefix each tag with 'xoops_'
             $this->template->assign("xoops_{$name}", $value);
         }
     }
     // Load global javascript
     $this->addScript('include/xoops.js');
     $this->loadLocalization();
     if ($this->bufferOutput) {
         ob_start();
     }
     $GLOBALS['xoTheme'] =& $this;
     $GLOBALS['xoopsTpl'] =& $this->template;
     // Instanciate and initialize all the theme plugins
     foreach ($this->plugins as $k => $bundleId) {
         if (!is_object($bundleId)) {
             $this->plugins[$bundleId] = null;
             $this->plugins[$bundleId] = new $bundleId();
             $this->plugins[$bundleId]->theme =& $this;
             $this->plugins[$bundleId]->xoInit();
             unset($this->plugins[$k]);
         }
     }
     return true;
 }
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:76,代码来源:theme.php

示例15: if

if ( empty( $template ) ) {
	readfile( $file_path ) ;
	exit ;
}

$theme = $xoopsConfig['theme_set'] ;

// UA
if( stristr( $_SERVER['HTTP_USER_AGENT'] , 'Opera' ) ) {
	$ua_type = 'Opera' ;
} else if( stristr( $_SERVER['HTTP_USER_AGENT'] , 'MSIE' ) ) {
	$ua_type = 'IE' ;
} else {
	$ua_type = 'NN' ;
}

require_once XOOPS_ROOT_PATH.'/class/template.php' ;
$tpl = new XoopsTpl() ;
$tpl->assign( array(
	'mydirname'      => $mydirname ,
	'mod_url'        => XOOPS_URL.'/modules/'.$mydirname ,
	'xoops_config'   => $xoopsConfig ,
	'xoops_theme'    => $theme ,
	'xoops_imageurl' => XOOPS_THEME_URL.'/'.$theme.'/' ,
	'xoops_themecss' => xoops_getcss($theme) ,
	'ua_type'        => $ua_type ,
) ) ;
if ( ! empty( $template ) ) $tpl->display( 'db:'.$template ) ;
exit ;

?>
开发者ID:nunoluciano,项目名称:uxcl,代码行数:31,代码来源:module_header.php


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