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


PHP jUrl::get方法代码示例

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


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

示例1: _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

示例2: 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

示例3: _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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: output

 public function output()
 {
     if ($this->hasErrors()) {
         return false;
     }
     $this->sendHttpHeaders();
     header('location: ' . jUrl::get($this->action, $this->params) . ($this->anchor != '' ? '#' . $this->anchor : ''));
     return true;
 }
开发者ID:alienpham,项目名称:helenekling,代码行数:9,代码来源:jResponseRedirect.class.php

示例15: onmasteradminGetMenuContent

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


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