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


PHP Horde::addScriptFile方法代码示例

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


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

示例1: getServiceLink

 /**
  * Checks if link should be shown and return the nescessary code.
  *
  * @param string  $type      Type of link to display
  * @param string  $app       The name of the current Horde application.
  * @param boolean $override  Override Horde settings?
  * @param boolean $referrer  Include the current page as the referrer (url=)?
  *
  * @return string  The HTML to create the link.
  */
 function getServiceLink($type, $app, $override = false, $referrer = true)
 {
     if (!Horde::showService($type, $override)) {
         return false;
     }
     switch ($type) {
         case 'help':
             if ($GLOBALS['browser']->hasFeature('javascript')) {
                 Horde::addScriptFile('popup.js', 'horde', true);
             }
             $url = Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/help/', true);
             return Util::addParameter($url, 'module', $app);
         case 'problem':
             return Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/problem.php?return_url=' . urlencode(Horde::selfUrl(true, true, true)));
         case 'logout':
             return Horde::url(Auth::addLogoutParameters($GLOBALS['registry']->get('webroot', 'horde') . '/login.php', AUTH_REASON_LOGOUT));
         case 'login':
             return Auth::getLoginScreen('', $referrer ? Horde::selfUrl(true) : null);
         case 'options':
             global $conf;
             if ($conf['prefs']['driver'] != '' && $conf['prefs']['driver'] != 'none') {
                 return Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php?app=' . $app);
             }
             break;
     }
     return false;
 }
开发者ID:justinlyon,项目名称:scc,代码行数:37,代码来源:Horde.php

示例2: header

    $login_screen = Util::addParameter($login_screen, 'frameset', Util::getFormData('frameset'));
    header('Location: ' . $login_screen);
    exit;
}
if ($browser->isMobile()) {
    require_once HORDE_LIBS . 'Horde/Mobile.php';
    require HORDE_TEMPLATES . '/login/mobile.inc';
    exit;
}
/* Build the <select> widget containing the available languages. */
if (!$prefs->isLocked('language')) {
    $_SESSION['horde_language'] = NLS::select();
    $langs = '<select name="new_lang" onchange="selectLang()">';
    foreach ($nls['languages'] as $key => $val) {
        $sel = $key == $_SESSION['horde_language'] ? ' selected="selected"' : '';
        $langs .= "<option value=\"{$key}\"{$sel}>{$val}</option>";
    }
    $langs .= '</select>';
}
$title = _("Log in");
$notification->push('setFocus()', 'javascript');
if ($logout_reason && $conf['menu']['always']) {
    $notification->push('if (window.parent.frames.horde_menu) window.parent.frames.horde_menu.location.reload();', 'javascript');
}
$reason = $auth->getLogoutReasonString();
/* Add some javascript. */
Horde::addScriptFile('enter_key_trap.js', 'horde');
require HORDE_TEMPLATES . '/common-header.inc';
$notification->notify(array('listeners' => 'status'));
require HORDE_TEMPLATES . '/login/login.inc';
require HORDE_TEMPLATES . '/common-footer.inc';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:login.php

示例3: dirname

            }
        } else {
            $tmp[$app] = $params;
        }
    }
    $registry->applications = $tmp;
}
@define('AUTH_HANDLER', true);
@define('HORDE_BASE', dirname(__FILE__) . '/../..');
require_once HORDE_BASE . '/lib/base.php';
require_once HORDE_LIBS . 'Horde/Menu.php';
require_once HORDE_LIBS . 'Horde/Help.php';
if (!Auth::getAuth() && !$conf['menu']['always']) {
    Horde::authenticationFailureRedirect();
}
Horde::addScriptFile('menu.js');
Menu::useAccessKeys(false);
if ($browser->hasQuirk('scrollbar_in_way')) {
    $notification->push('correctWidthForScrollbar()', 'javascript');
}
$bodyClass = 'sidebar';
if (Util::getFormData('mozbar')) {
    $target = '_content';
    $bodyClass .= ' nomargin';
} else {
    $target = 'horde_main';
}
require HORDE_TEMPLATES . '/common-header.inc';
// Build the array so we have parents and children all lined up.
buildMenu();
// Loop through the registry and create the <div>s.
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:menu.php


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