• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP jUrl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: create

 public function create($urlact)
 {
     $m = $urlact->getParam('module');
     $a = $urlact->getParam('action');
     $scriptName = $this->getBasePath($urlact->requestType, $m, $a);
     $script = $this->getScript($urlact->requestType, $m, $a);
     if (isset(jApp::config()->basic_significant_urlengine_entrypoints[$script]) && jApp::config()->basic_significant_urlengine_entrypoints[$script]) {
         if (!jApp::config()->urlengine['multiview']) {
             $script .= jApp::config()->urlengine['entrypointExtension'];
         }
         $scriptName .= $script;
     }
     $url = new jUrl($scriptName, $urlact->params, '');
     if (in_array($urlact->requestType, array('xmlrpc', 'jsonrpc', 'soap'))) {
         $url->clearParam();
     } else {
         $pi = '/' . $m . '/';
         if ($a != 'default:index') {
             list($c, $a) = explode(':', $a);
             $pi .= $c . '/';
             if ($a != 'index') {
                 $pi .= $a;
             }
         }
         $url->pathInfo = $pi;
         $url->delParam('module');
         $url->delParam('action');
     }
     return $url;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:30,代码来源:basic_significant.urls.php


示例2: create

 public function create($urlact)
 {
     $m = $urlact->getParam('module');
     $a = $urlact->getParam('action');
     $scriptName = $this->getBasePath($urlact->requestType, $m, $a);
     $scriptName .= $this->getScript($urlact->requestType, $m, $a);
     if (!jApp::config()->urlengine['multiview']) {
         $scriptName .= jApp::config()->urlengine['entrypointExtension'];
     }
     $url = new jUrl($scriptName, $urlact->params, '');
     if (in_array($urlact->requestType, array('xmlrpc', 'jsonrpc', 'soap'))) {
         $url->clearParam();
     }
     return $url;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:15,代码来源:simple.urls.php


示例3: onmasteradminGetMenuContent

 /**
  *
  */
 function onmasteradminGetMenuContent($event)
 {
     $plugin = $GLOBALS['gJCoord']->getPlugin('auth', false);
     if ($plugin && $plugin->config['driver'] == 'Db' && jAcl2::check('auth.users.list')) {
         $event->add(new masterAdminMenuItem('users', jLocale::get('jauthdb_admin~auth.adminmenu.item.list'), jUrl::get('jauthdb_admin~default:index'), 10, 'system'));
     }
 }
开发者ID:alienpham,项目名称:helenekling,代码行数:10,代码来源:jauthdb_admin.listener.php


示例4: read_rss

 /**
  * display the RSS of the forum
  */
 public function read_rss()
 {
     $ftitle = jUrl::escape($this->param('ftitle'), true);
     $id_forum = (int) $this->param('id_forum');
     if (!jAcl2::check('hfnu.posts.list', 'forum' . $id_forum)) {
         $rep = $this->getResponse('redirect');
         $rep->action = 'default:index';
         return $rep;
     }
     if ($id_forum == 0) {
         $rep = $this->getResponse('redirect');
         $rep->action = 'default:index';
         return $rep;
     }
     $forum = jClasses::getService('havefnubb~hfnuforum')->getForum($id_forum);
     if (jUrl::escape($forum->forum_name, true) != $ftitle) {
         $rep = $this->getResponse('redirect');
         $rep->action = jApp::config()->urlengine['notfoundAct'];
         return $rep;
     }
     jApp::coord()->getPlugin('history')->change('label', htmlentities($forum->forum_name, ENT_COMPAT, 'UTF-8'));
     $feed_reader = new jFeedReader();
     $feed_reader->setCacheDir(jApp::varPath('feeds'));
     $feed_reader->setTimeout(2);
     $feed_reader->setUserAgent('HaveFnuBB - http://www.havefnubb.org/');
     $feed = $feed_reader->parse($forum->forum_url);
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $tpl->assign('feed', $feed);
     $tpl->assign('forum', $forum);
     $rep->title = $forum->forum_name;
     $rep->body->assign('MAIN', $tpl->fetch('havefnubb~forum_rss.view'));
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:37,代码来源:forum.classic.php


示例5: _prepareTpl

 protected function _prepareTpl()
 {
     // Get the project and repository params
     $project = $this->param('project');
     $repository = $this->param('repository');
     $auth_url_return = $this->param('auth_url_return');
     if (!$auth_url_return) {
         $auth_url_return = jUrl::get('view~map:index', array("repository" => $repository, "project" => $project));
     }
     // Get lizmapProject class
     $assign = array('isConnected' => jAuth::isConnected(), 'user' => jAuth::getUserSession(), 'auth_url_return' => $auth_url_return, "externalSearch" => "", "edition" => false, "measure" => false, "locate" => false, "geolocation" => false, "timemanager" => false, "print" => false, "attributeLayers" => false);
     try {
         $lproj = lizmap::getProject($repository . '~' . $project);
         $configOptions = $lproj->getOptions();
         if (property_exists($configOptions, 'externalSearch')) {
             $assign['externalSearch'] = $configOptions->externalSearch;
         }
     } catch (UnknownLizmapProjectException $e) {
         jLog::logEx($e, 'error');
     }
     $this->_tpl->assign($assign);
     // Get lizmap services
     $services = lizmap::getServices();
     if ($services->allowUserAccountRequests) {
         $this->_tpl->assign('allowUserAccountRequests', True);
     }
 }
开发者ID:laurentj,项目名称:lizmap-web-client,代码行数:27,代码来源:map_headermenu.zone.php


示例6: jtpl_function_html_formurl

/**
 * function plugin :  write the url corresponding to the given jelix action
 *
 * @param jTpl $tpl template engine
 * @param string $selector selector action
 * @param array $params parameters for the url
 */
function jtpl_function_html_formurl($tpl, $selector, $params = array())
{
    $url = jUrl::get($selector, $params, 2);
    // retourne le jurl correspondant
    echo $url->getPath();
    $tpl->_privateVars['_formurl'] = $url;
}
开发者ID:hadrienl,项目名称:jelix,代码行数:14,代码来源:function.formurl.php


示例7: jtpl_function_html_link_to_remote

/**
 * function plugin :  Ajax request
 *
 * it creates a javascript ajax function
 * example :
 * <pre>
 * {link_to_remote
 *  'Link',    <!-- link label -->
 *  'result',    <!-- id dom for ajax result -->
 *  'test~default:ajax', array('id'=>'34'),    <!-- jurl request -->
 *  array(
 *    'position'=>'html',    <!-- html or append or prepend (default html) -->
 *    'method'=>'GET',    <!-- GET or POST (default POST) -->
 *    'beforeSend'=>'alert("beforeSend")',    <!-- JS script before send (default null) -->
 *    'complete'=>'alert("complete")',    <!-- JS script after send  (default null)-->
 *    'error'=>'alert("error")',    <!-- JS if error  (default null) -->
 * )}
 * <div id="result"></div>
 * </pre>
 */
function jtpl_function_html_link_to_remote($tpl, $label, $element_id, $action_selector, $action_parameters, $option)
{
    global $gJCoord, $gJConfig;
    static $id_link_to_remote = 0;
    if ($gJCoord->response->getFormatType() == 'html') {
        // Add js link
        $gJCoord->response->addJSLink($gJConfig->urlengine['basePath'] . 'jelix/jquery/jquery.js');
    }
    $id_link_to_remote++;
    $url = jUrl::get($action_selector, $action_parameters);
    $position = array_key_exists("position", $option) ? $option['position'] : 'html';
    $method = array_key_exists("method", $option) ? $option['method'] : 'GET';
    $beforeSend = array_key_exists("beforeSend", $option) ? $option['beforeSend'] : '';
    $complete = array_key_exists("complete", $option) ? $option['complete'] : '';
    $error = array_key_exists("error", $option) ? $option['error'] : '';
    // Link
    echo '<a href="#" onclick="link_to_remote_' . $id_link_to_remote . '();">' . $label . "</a>\n";
    // Script
    echo '
    <script>
      function link_to_remote_' . $id_link_to_remote . '() {
        $.ajax({
          type: \'' . $method . "',\n          url: '" . $url . "',\n          beforeSend: function(){" . $beforeSend . ";},\n          complete: function(){" . $complete . ";},\n          error: function(){" . $error . ';},
          success: function(msg){
            $(\'#' . $element_id . "')." . $position . "(msg);\n          }\n        });\n      };\n    </script>";
}
开发者ID:alienpham,项目名称:helenekling,代码行数:46,代码来源:function.link_to_remote.php


示例8: onhfnuGetMenuContent

 /**
  * Main Menu of the navbar
  * @pararm event $event Object of a listener
  */
 function onhfnuGetMenuContent($event)
 {
     $gJConfig = jApp::config();
     $event->add(new hfnuMenuItem('home', jLocale::get('havefnubb~main.home'), jUrl::get('havefnubb~default:index'), 1, 'main'));
     $event->add(new hfnuMenuItem('members', jLocale::get('havefnubb~main.member.list'), jUrl::get('havefnubb~members:index'), 2, 'main'));
     $event->add(new hfnuMenuItem('search', jLocale::get('havefnubb~main.search'), jUrl::get('hfnusearch~default:index'), 3, 'main'));
     if ($gJConfig->havefnubb['rules'] != '') {
         $event->add(new hfnuMenuItem('rules', jLocale::get('havefnubb~main.rules'), jUrl::get('havefnubb~default:rules'), 4, 'main'));
     }
     // dynamic menu
     $menus = jClasses::getService('havefnubb~hfnumenusbar')->getMenus();
     if (!empty($menus)) {
         foreach ($menus as $indx => $menu) {
             $event->add(new hfnuMenuItem($menu['itemName'], $menu['name'], $menu['url'], 50 + $menu['order'], 'main'));
         }
     }
     if ($event->getParam('admin') === true) {
         $url = '';
         try {
             // let's try to retrieve the url of the admin, if the admin is in
             // the same app
             $url = jUrl::get('hfnuadmin~default:index');
         } catch (Exception $e) {
             if (isset($gJConfig->havefnubb["admin_url"])) {
                 $url = $gJConfig->havefnubb["admin_url"];
             }
         }
         if ($url) {
             $event->add(new hfnuMenuItem('admin', jLocale::get('havefnubb~main.admin.panel'), $url, 100, 'main'));
         }
     }
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:36,代码来源:hfnumenu.listener.php


示例9: _prepareTpl

 protected function _prepareTpl()
 {
     jClasses::inc('masterAdminMenuItem');
     $menu = array();
     $menu['toplinks'] = new masterAdminMenuItem('toplinks', '', '');
     $dashboard = new masterAdminMenuItem('dashboard', jLocale::get('gui.menu.item.dashboard'), jUrl::get('default:index'));
     $dashboard->icon = $GLOBALS['gJConfig']->urlengine['jelixWWWPath'] . 'design/images/dashboard.png';
     $menu['toplinks']->childItems[] = $dashboard;
     $menu['system'] = new masterAdminMenuItem('system', jLocale::get('gui.menu.item.system'), '', 100);
     $items = jEvent::notify('masteradminGetMenuContent')->getResponse();
     foreach ($items as $item) {
         if ($item->parentId) {
             if (!isset($menu[$item->parentId])) {
                 $menu[$item->parentId] = new masterAdminMenuItem($item->parentId, '', '');
             }
             $menu[$item->parentId]->childItems[] = $item;
         } else {
             if (isset($menu[$item->id])) {
                 $menu[$item->id]->copyFrom($item);
             } else {
                 $menu[$item->id] = $item;
             }
         }
     }
     usort($menu, "masterAdminItemSort");
     foreach ($menu as $topitem) {
         usort($topitem->childItems, "masterAdminItemSort");
     }
     $this->_tpl->assign('menuitems', $menu);
     $this->_tpl->assign('selectedMenuItem', $this->param('selectedMenuItem', ''));
 }
开发者ID:Calmacil,项目名称:ffdvh,代码行数:31,代码来源:admin_menu.zone.php


示例10: jtpl_function_html_resurl

/**
* @package    jelix
* @subpackage jtpl_plugin
* @author     Laurent Jouanneau
* @copyright  2011-2012 Laurent Jouanneau
* @link        http://www.jelix.org
* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
*/
function jtpl_function_html_resurl($tpl, $module, $file, $intheme = false, $escape = true)
{
    if ($intheme) {
        $file = 'themes/' . jApp::config()->theme . '/' . $file;
    }
    echo jUrl::get("jelix~www:getfile", array('targetmodule' => $module, 'file' => $file), $escape ? 1 : 0);
}
开发者ID:havefnubb,项目名称:havefnubb,代码行数:15,代码来源:function.resurl.php


示例11: index

 /**
  * Main page
  */
 function index()
 {
     $title = stripslashes(jApp::config()->havefnubb['title']);
     $rep = $this->getResponse('html');
     $historyPlugin = jApp::coord()->getPlugin('history');
     $historyPlugin->change('label', ucfirst(htmlentities($title, ENT_COMPAT, 'UTF-8')));
     $historyPlugin->change('title', jLocale::get('havefnubb~main.goto_homepage'));
     $forums = jClasses::getService('hfnuforum');
     $forumsList = $forums->getFullList();
     // generate rss links list
     foreach ($forumsList->getLinearIterator() as $f) {
         // get the list of forum to build the RSS link
         $url = jUrl::get('havefnubb~posts:rss', array('ftitle' => $f->record->forum_name, 'id_forum' => $f->record->id_forum));
         $rep->addHeadContent('<link rel="alternate" type="application/rss+xml" title="' . $f->record->forum_name . ' - RSS" href="' . htmlentities($url) . '" />');
         $url = jUrl::get('havefnubb~posts:atom', array('ftitle' => $f->record->forum_name, 'id_forum' => $f->record->id_forum));
         $rep->addHeadContent('<link rel="alternate" type="application/atom+xml" title="' . $f->record->forum_name . ' - ATOM " href="' . htmlentities($url) . '" />');
     }
     $tpl = new jTpl();
     $tpl->assign('selectedMenuItem', 'community');
     $tpl->assign('currentIdForum', 0);
     $tpl->assign('action', 'index');
     $tpl->assign('forumsList', $forumsList);
     $rep->body->assign('MAIN', $tpl->fetch('havefnubb~index'));
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:28,代码来源:default.classic.php


示例12: jtpl_function_html_breadcrumb

/**
 * @package     jelix
 * @subpackage  jtpl_plugin
 * @author      Lepeltier kévin
 * @contributor Dominique Papin
 * @copyright   2008 Lepeltier kévin, 2008 Dominique Papin
 * @link        http://www.jelix.org
 * @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
 */
function jtpl_function_html_breadcrumb($tpl, $nb = null, $separator = '')
{
    $plugin = jApp::coord()->getPlugin('history', true);
    if ($plugin === null) {
        return;
    }
    $config =& $plugin->config;
    if (!isset($config['session_name']) || $config['session_name'] == '') {
        $config['session_name'] = 'HISTORY';
    }
    if (!isset($_SESSION[$config['session_name']])) {
        return;
    }
    echo '<ol class="history">';
    $leng = count($_SESSION[$config['session_name']]);
    $nb = $nb !== null ? count($_SESSION[$config['session_name']]) - $nb : 0;
    $nb = $nb < 0 ? 0 : $nb;
    for ($i = $nb; $i < $leng; $i++) {
        $page = $_SESSION[$config['session_name']][$i];
        echo '<li' . ($i == $nb ? ' class="first"' : ($i == $leng - 1 ? ' class="end"' : '')) . '>';
        if ($i != $leng - 1) {
            echo '<a href="' . jUrl::get($page['action'], $page['params'], jUrl::XMLSTRING) . '" ' . ($page['title'] != '' ? 'title="' . $page['title'] . '"' : '') . '>';
        }
        echo $_SESSION[$config['session_name']][$i]['label'];
        if ($i != $leng - 1) {
            echo '</a>';
        }
        echo ($i == $leng - 1 ? '' : $separator) . '</li>';
    }
    echo '</ol>';
}
开发者ID:havefnubb,项目名称:havefnubb,代码行数:40,代码来源:function.breadcrumb.php


示例13: create

 /**
  * Create a jurl object with the given action data
  * @param jUrlAction $url  information about the action
  * @return jUrl the url correspondant to the action
  */
 public function create($urlact)
 {
     global $gJConfig;
     $m = $urlact->getParam('module');
     $a = $urlact->getParam('action');
     $scriptName = $this->getBasePath($urlact->requestType, $m, $a);
     $script = $this->getScript($urlact->requestType, $m, $a);
     if (isset($gJConfig->basic_significant_urlengine_entrypoints[$script]) && $gJConfig->basic_significant_urlengine_entrypoints[$script]) {
         if (!$gJConfig->urlengine['multiview']) {
             $script .= $gJConfig->urlengine['entrypointExtension'];
         }
         $scriptName .= $script;
     }
     $url = new jUrl($scriptName, $urlact->params, '');
     // pour certains types de requete, les paramètres ne sont pas dans l'url
     // donc on les supprime
     // c'est un peu crade de faire ça en dur ici, mais ce serait lourdingue
     // de charger la classe request pour savoir si on peut supprimer ou pas
     if (in_array($urlact->requestType, array('xmlrpc', 'jsonrpc', 'soap'))) {
         $url->clearParam();
     } else {
         $pi = '/' . $m . '/';
         if ($a != 'default:index') {
             list($c, $a) = explode(':', $a);
             $pi .= $c . '/';
             if ($a != 'index') {
                 $pi .= $a;
             }
         }
         $url->pathInfo = $pi;
         $url->delParam('module');
         $url->delParam('action');
     }
     return $url;
 }
开发者ID:alienpham,项目名称:helenekling,代码行数:40,代码来源:basic_significant.urls.php


示例14: onmasteradminGetMenuContent

 function onmasteradminGetMenuContent($event)
 {
     if (jAcl2::check('activeusers.configuration')) {
         $item = new masterAdminMenuItem('activeusers', jLocale::get('activeusers_admin~main.masteradmin.menu.item'), jUrl::get('activeusers_admin~default:index'), 120, 'system');
         $event->add($item);
     }
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:7,代码来源:activeusersadmin.listener.php


示例15: _prepareTpl

 protected function _prepareTpl()
 {
     $config = new \Jelix\JCommunity\Config();
     $this->_tpl->assign('canRegister', $config->isRegistrationEnabled());
     $this->_tpl->assign('canResetPassword', $config->isResetPasswordEnabled());
     if (jAuth::isConnected()) {
         $this->_tpl->assign('login', jAuth::getUserSession()->login);
     } else {
         $conf = jAuth::loadConfig();
         $this->_tpl->assign('persistance_ok', jAuth::isPersistant());
         $form = jForms::get("jcommunity~login");
         if (!$form) {
             $form = jForms::create("jcommunity~login");
         }
         $this->_tpl->assign('form', $form);
         $this->_tpl->assign('url_return', '');
         if ($conf['enable_after_login_override']) {
             $req = jApp::coord()->request;
             if ($req->getParam('auth_url_return')) {
                 $this->_tpl->assign('url_return', $req->getParam('auth_url_return'));
             } else {
                 if ($this->param('as_main_content')) {
                     if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] && $_SERVER['HTTP_REFERER'] != jUrl::getCurrentUrl(false, true)) {
                         $this->_tpl->assign('url_return', $_SERVER['HTTP_REFERER']);
                     }
                 } else {
                     if ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD') {
                         $this->_tpl->assign('url_return', jUrl::getCurrentUrl(false, true));
                     }
                 }
             }
         }
     }
 }
开发者ID:jelix,项目名称:jcommunity-module,代码行数:34,代码来源:login.zone.php


示例16: getcapabilities

 protected function getcapabilities()
 {
     $result = parent::getcapabilities();
     if ($result->cached) {
         return $result;
     }
     $data = $result->data;
     if (empty($data) or floor($result->code / 100) >= 4) {
         jMessage::add('Server Error !', 'Error');
         return $this->serviceException();
     }
     if (preg_match('#ServiceExceptionReport#i', $data)) {
         return $result;
     }
     // Replace qgis server url in the XML (hide real location)
     $sUrl = jUrl::getFull("lizmap~service:index", array("repository" => $this->repository->getKey(), "project" => $this->project->getKey()));
     $sUrl = str_replace('&', '&amp;', $sUrl);
     preg_match('/<get>.*\\n*.+xlink\\:href="(.+)"/i', $data, $matches);
     if (count($matches) < 2) {
         preg_match('/get onlineresource="(.+)"/i', $data, $matches);
     }
     if (count($matches) > 1) {
         $data = str_replace($matches[1], $sUrl, $data);
     }
     $data = str_replace('&amp;&amp;', '&amp;', $data);
     // Add response to cache
     $cacheId = $this->repository->getKey() . '_' . $this->project->getKey() . '_' . $this->param('service');
     $newhash = md5_file(realpath($this->repository->getPath()) . '/' . $this->project->getKey() . ".qgs");
     jCache::set($cacheId . '_hash', $newhash);
     jCache::set($cacheId . '_mime', $result->mime);
     jCache::set($cacheId . '_data', $data);
     return (object) array('code' => 200, 'mime' => $result->mime, 'data' => $data, 'cached' => False);
 }
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:33,代码来源:lizmapWFSRequest.class.php


示例17: jtpl_function_html_formurlparam

/**
 * function plugin :  write the url corresponding to the given jelix action
 *
 * @param jTpl $tpl template engine
 * @param string $selector selector action
 * @param array $params parameters for the url
 */
function jtpl_function_html_formurlparam($tpl, $selector, $params = array())
{
    $url = jUrl::get($selector, $params, 2);
    // retourne un jUrl
    foreach ($url->params as $p_name => $p_value) {
        echo '<input type="hidden" name="' . $p_name . '" value="' . htmlspecialchars($p_value) . '"/>', "\n";
    }
}
开发者ID:alienpham,项目名称:helenekling,代码行数:15,代码来源:function.formurlparam.php


示例18: onmasteradminGetMenuContent

 /**
  *
  */
 function onmasteradminGetMenuContent($event)
 {
     if (jAcl2::check('auth.users.list')) {
         $item = new masterAdminMenuItem('pref', jLocale::get('jpref_admin~admin.item.title'), jUrl::get('jpref_admin~prefs:index'), 50, 'system');
         $item->icon = jApp::config()->urlengine['jelixWWWPath'] . 'design/images/cog.png';
         $event->add($item);
     }
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:11,代码来源:jpref_admin.listener.php


示例19: jtpl_meta_html_htmlmodule

/**
* @package      jelix
* @subpackage   jtpl_plugin
* @author       Laurent Jouanneau
* @contributor  Yann (description and keywords), Dominique Papin (ie7 support), Mickaël Fradin (style), Loic Mathaud (title), Olivier Demah (auhor,generator), Julien Issler
* @copyright    2005-2012 Laurent Jouanneau, 2007 Dominique Papin, 2008 Mickaël Fradin, 2009 Loic Mathaud, 2010 Olivier Demah
* @copyright    2010 Julien Issler
* @link         http://www.jelix.org
* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
*/
function jtpl_meta_html_htmlmodule($tpl, $method, $module, $path, $params = array())
{
    $resp = jApp::coord()->response;
    if ($resp->getType() != 'html') {
        return;
    }
    if (strpos($method, 'csstheme') === 0) {
        $url = jUrl::get('jelix~www:getfile', array('targetmodule' => $module, 'file' => 'themes/' . jApp::config()->theme . '/' . $path));
        switch ($method) {
            case 'csstheme':
                $resp->addCSSLink($url, $params);
                break;
            case 'cssthemeie':
                $resp->addCSSLink($url, $params, true);
                break;
            case 'cssthemeie7':
            case 'cssthemeie8':
            case 'cssthemeie9':
                $resp->addCSSLink($url, $params, 'IE ' . substr($method, -1, 1));
                break;
            case 'cssthemeltie7':
            case 'cssthemeltie8':
            case 'cssthemeltie9':
                $resp->addCSSLink($url, $params, 'lt IE ' . substr($method, -1, 1));
                break;
            default:
                trigger_error("Unknown resource type in meta_htmlmodule", E_USER_WARNING);
        }
    } else {
        $url = jUrl::get('jelix~www:getfile', array('targetmodule' => $module, 'file' => $path));
        switch ($method) {
            case 'js':
                $resp->addJSLink($url, $params);
                break;
            case 'css':
                $resp->addCSSLink($url, $params);
                break;
            case 'jsie':
                $resp->addJSLink($url, $params, true);
                break;
            case 'cssie':
                $resp->addCSSLink($url, $params, true);
                break;
            case 'cssie7':
            case 'cssie8':
            case 'cssie9':
                $resp->addCSSLink($url, $params, 'IE ' . substr($method, -1, 1));
                break;
            case 'cssltie7':
            case 'cssltie8':
            case 'cssltie9':
                $resp->addCSSLink($url, $params, 'lt IE ' . substr($method, -1, 1));
                break;
            default:
                trigger_error("Unknown resource type in meta_htmlmodule", E_USER_WARNING);
        }
    }
}
开发者ID:havefnubb,项目名称:havefnubb,代码行数:68,代码来源:meta.htmlmodule.php


示例20: onmasteradminGetMenuContent

 function onmasteradminGetMenuContent($event)
 {
     $chemin = jApp::config()->urlengine['basePath'] . 'hfnu/admin/';
     if (jAcl2::check('jelixcache.access')) {
         $item = new masterAdminMenuItem('jelixcache', jLocale::get('jelixcache~jelixcache.masteradmin.menu.item'), jUrl::get('jelixcache~default:index'), 100, 'system');
         $item->icon = $chemin . 'images/clear_cache.png';
         $event->add($item);
     }
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:9,代码来源:jelixcache.listener.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP javascript类代码示例发布时间:2022-05-23
下一篇:
PHP jTpl类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap