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


PHP rex_getUrl函数代码示例

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


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

示例1: getBreadcrumb

 function getBreadcrumb($startPageLabel, $includeCurrent = FALSE, $category_id = 0)
 {
     if (!$this->_setActivePath()) {
         return FALSE;
     }
     global $REX;
     $path = $this->path;
     $i = 1;
     $lis = '';
     if ($startPageLabel) {
         $lis .= '<li class="rex-lvl' . $i . '"><a href="' . rex_getUrl($REX['START_ARTICLE_ID']) . '">' . htmlspecialchars($startPageLabel) . '</a></li>';
         $i++;
         // StartArticle nicht doppelt anzeigen
         if (isset($path[0]) && $path[0] == $REX['START_ARTICLE_ID']) {
             unset($path[0]);
         }
     }
     foreach ($path as $pathItem) {
         if ($cat = OOCategory::getCategoryById($pathItem) && $this->_check($cat, $i)) {
             $lis .= '<li class="rex-lvl' . $i . '"><a href="' . $cat->getUrl() . '">' . htmlspecialchars($cat->getName()) . '</a></li>';
             $i++;
         }
     }
     if ($includeCurrent) {
         if ($art = OOArticle::getArticleById($this->current_article_id) && $this->_check($art, $i)) {
             if (!$art->isStartpage()) {
                 $lis .= '<li class="rex-lvl' . $i . '">' . htmlspecialchars($art->getName()) . '</li>';
             } else {
                 $cat = OOCategory::getCategoryById($this->current_article_id);
                 $lis .= '<li class="rex-lvl' . $i . '">' . htmlspecialchars($cat->getName()) . '</li>';
             }
         }
     }
     return '<ul class="rex-breadcrumb">' . $lis . '</ul>';
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:35,代码来源:class.rex_com_navigation.inc.php

示例2: rex_com_messages_add_buttons

 function rex_com_messages_add_buttons($params)
 {
     global $REX;
     if ($REX['COM_USER']->getValue("rex_com_user.id") != $params["user_id"]) {
         $params["buttons"][] = '<a href="' . rex_getUrl(REX_COM_PAGE_SENDMESSAGE_ID, 0, array("user_id" => $params["user_id"], "tab" => 2)) . '"><span>Private Nachricht senden</span></a>';
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:7,代码来源:config.inc.php

示例3: executeAction

 function executeAction()
 {
     // spezialfaelle - nur bei request oder label
     switch ($this->getElement(3)) {
         case 'request':
             if (!isset($_REQUEST[$this->getElement(4)])) {
                 return false;
             }
             break;
         case 'label':
             if (!isset($this->params['value_pool']['sql'][$this->getElement(4)])) {
                 return false;
             }
             break;
     }
     $u = $this->getElement(2);
     $u1 = (string) (int) $u;
     if ($u == $u1) {
         // id -> intern article
         $url = rex_getUrl($u, '', '', '&');
     } else {
         // extern link
         $url = $u;
     }
     // Emailkeys ersetzen. Somit auch Weiterleitungen mit neuer ID m�glich. "id=###ID###"
     foreach ($this->params['value_pool']['email'] as $search => $replace) {
         $url = str_replace('###' . $search . '###', $replace, $url);
     }
     if ($url != '') {
         ob_end_clean();
         header('Location: ' . $url);
     }
 }
开发者ID:alexbarnhill,项目名称:redaxo_xform,代码行数:33,代码来源:class.xform.action_redirect.inc.php

示例4: getForward

 public static function getForward($params)
 {
     // Url wurde von einer anderen Extension bereits gesetzt
     if (isset($params['subject']) && $params['subject'] != '') {
         return $params['subject'];
     }
     self::init();
     $domain = $params['domain'];
     if ($domain == 'undefined') {
         $domain = '';
     }
     $url = $params['url'];
     foreach (self::$paths as $p) {
         if ($p['domain'] == $domain && ($p['url'] == $url || $p['url'] . '/' == $url)) {
             $forward_url = '';
             if ($p['type'] == 'article' && ($art = rex_article::get($p['article_id'], $p['clang']))) {
                 $forward_url = rex_getUrl($p['article_id'], $p['clang']);
             } elseif ($p['type'] == 'media' && ($media = rex_media::get($p['media']))) {
                 $forward_url = '/files/' . $p['media'];
             } elseif ($p['type'] == 'extern' && $p['extern'] != '') {
                 $forward_url = $p['extern'];
             }
             if ($forward_url != '') {
                 header('HTTP/1.1 ' . self::$movetypes[$p['movetype']]);
                 header('Location: ' . $forward_url);
                 exit;
             }
         }
     }
     return false;
 }
开发者ID:tzfrs,项目名称:redaxo_yrewrite,代码行数:31,代码来源:forward.php

示例5: get_db_articles

 /**
  * GET SITEMAP ARTICLES FROM DB
  *
  * @return (array) sitemap articles
  */
 private function get_db_articles()
 {
     global $REX, $SEO42_URLS;
     if ($REX['ADDON']['seo42']['settings']['rewriter']) {
         // use seo42 pathlist
         array_multisort($SEO42_URLS);
         foreach ($SEO42_URLS as $url) {
             $article = OOArticle::getArticleById($url['id'], $url['clang']);
             if (OOArticle::isValid($article)) {
                 $hasPermission = true;
                 // community addon
                 if (class_exists('rex_com_auth') && !rex_com_auth::checkPerm($article)) {
                     $hasPermission = false;
                 }
                 // add sitemap block
                 if (($article->isOnline() || $article->getId() == $REX['START_ARTICLE_ID'] && $article->getClang() == $REX['START_CLANG_ID']) && !isset($url['status']) && $hasPermission) {
                     $db_articles[$url['id']][$url['clang']] = array('loc' => rex_getUrl($url['id'], $url['clang']), 'lastmod' => date('c', $article->getValue('updatedate')), 'changefreq' => self::calc_article_changefreq($article->getValue('updatedate'), ''), 'priority' => self::calc_article_priority($url['id'], $url['clang'], $article->getValue('path'), ''), 'noindex' => $article->getValue('seo_noindex'));
                 }
             }
         }
     } else {
         // at the moment: no sitemap urls if rewriter is turned off
     }
     // EXTENSIONPOINT SEO42_SITEMAP_ARRAY_CREATED
     $db_articles = rex_register_extension_point('SEO42_SITEMAP_ARRAY_CREATED', $db_articles);
     // EXTENSIONPOINT SEO42_SITEMAP_ARRAY_FINAL (READ ONLY)
     rex_register_extension_point('SEO42_SITEMAP_ARRAY_FINAL', $db_articles);
     $this->db_articles = $db_articles;
 }
开发者ID:omphteliba,项目名称:seo42,代码行数:34,代码来源:class.seo42_sitemap.inc.php

示例6: enterObject

    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        // var_dump($this->params);
        global $REX;
        require_once realpath(dirname(__FILE__) . '/../../ext/captcha/class.captcha_x.php');
        if (isset($_REQUEST["captcha"]) && $_REQUEST["captcha"] == "show") {
            ob_end_clean();
            ob_end_clean();
            $server =& new captcha_x();
            $server->handle_request();
            exit;
        }
        $captcha =& new captcha_x();
        $wc = "";
        if ($send == 1 & $captcha->validate($this->value)) {
            // Alles ist gut.
        } elseif ($send == 1) {
            // Error. Fehlermeldung ausgeben
            $this->params["warning"][] = $this->elements[2];
            $this->params["warning_messages"][] = $this->elements[2];
            $wc = $this->params["error_class"];
        }
        $link = rex_getUrl($this->params["article_id"], $this->params["clang"], array("captcha" => "show"), "&");
        $form_output[] = '
			<p class="formcaptcha">
				<span class="' . $wc . '">' . htmlspecialchars($this->elements[1]) . '</span>
				<label class="captcha ' . $wc . '"><img 
					src="' . $link . '" 
					onclick="javascript:this.src=\'' . $link . '&\'+Math.random();" 
					alt="CAPTCHA image" 
					/></label>
				<input class="' . $wc . '" maxlength="5" size="5" name="FORM[' . $this->params["form_name"] . '][el_' . $this->id . ']" type="text" />
			</p>';
    }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:34,代码来源:class.xform.captcha.inc.php

示例7: enterObject

 function enterObject()
 {
     global $REX;
     require_once realpath(dirname(__FILE__) . '/../../ext/captcha/class.captcha_x.php');
     $captcha = new captcha_x();
     $captchaRequest = rex_request('captcha', 'string');
     if ($captchaRequest == 'show') {
         while (@ob_end_clean()) {
         }
         $captcha->handle_request();
         exit;
     }
     if ($this->params['send'] == 1 & $captcha->validate($this->getValue())) {
         if (isset($_SESSION['captcha'])) {
             unset($_SESSION['captcha']);
         }
     } elseif ($this->params['send'] == 1) {
         // Error. Fehlermeldung ausgeben
         $this->params['warning'][$this->getId()] = $this->params['error_class'];
         $this->params['warning_messages'][$this->getId()] = $this->getElement(2);
     }
     if ($this->getElement(3) != '') {
         $link = $this->getElement(3) . '?captcha=show&' . time() . microtime();
     } else {
         $link = rex_getUrl($this->params['article_id'], $this->params['clang'], array('captcha' => 'show'), '&') . '&' . time() . microtime();
     }
     $this->params['form_output'][$this->getId()] = $this->parse('value.captcha.tpl.php', array('link' => $link));
 }
开发者ID:Barnhiac,项目名称:MTW_REDAXO,代码行数:28,代码来源:class.xform.captcha.inc.php

示例8: getOutput

 protected function getOutput()
 {
     $id = $this->getArg('id', 0, true);
     if (!in_array($this->getContext(), ['module', 'action']) || !is_numeric($id) || $id < 1 || $id > 10) {
         return false;
     }
     $value = $this->getContextData()->getValue('link' . $id);
     if ($this->hasArg('isset') && $this->getArg('isset')) {
         return $value ? 'true' : 'false';
     }
     if ($this->hasArg('widget') && $this->getArg('widget')) {
         if (!$this->environmentIs(self::ENV_INPUT)) {
             return false;
         }
         $args = [];
         foreach (['category'] as $key) {
             if ($this->hasArg($key)) {
                 $args[$key] = $this->getArg($key);
             }
         }
         $value = self::getWidget($id, 'REX_INPUT_LINK[' . $id . ']', $value, $args);
     } else {
         if ($value && $this->hasArg('output') && $this->getArg('output') != 'id') {
             $value = rex_getUrl($value);
         }
     }
     return self::quote($value);
 }
开发者ID:DECAF,项目名称:redaxo,代码行数:28,代码来源:var_link.php

示例9: execute

 function execute()
 {
     // spezialfaelle - nur bei request oder label
     switch ($this->getElement(3)) {
         case "request":
             if (!isset($_REQUEST[$this->getElement(4)])) {
                 return FALSE;
             }
             break;
         case "label":
             if (!isset($this->elements_sql[$this->getElement(4)])) {
                 return FALSE;
             }
             break;
     }
     $u = $this->getElement(2);
     $u1 = (int) $u;
     if ($u == $u1) {
         // id -> intern article
         $url = rex_getUrl($u, '', '', "&");
     } else {
         // extern link
         $url = $u;
     }
     // Emailkeys ersetzen. Somit auch Weiterleitungen mit neuer ID mšglich. "id=###ID###"
     foreach ($this->elements_email as $search => $replace) {
         $url = str_replace('###' . $search . '###', $replace, $url);
     }
     if ($url != '') {
         ob_end_clean();
         header("Location: " . $url);
         exit;
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:34,代码来源:class.xform.action_redirect.inc.php

示例10: rex_redirect

/**
 * Leitet auf einen anderen Artikel weiter.
 *
 * @package redaxo\structure
 */
function rex_redirect($article_id, $clang = null, array $params = [])
{
    // Alle OBs schließen
    while (@ob_end_clean()) {
    }
    header('Location: ' . rex_getUrl($article_id, $clang, $params, '&'));
    exit;
}
开发者ID:alsahh,项目名称:redaxo,代码行数:13,代码来源:function_rex_url.php

示例11: getRSS

 public function getRSS()
 {
     $anzahl = $this->anzahl;
     $queryurl = rex_getUrl('', $REX['CUR_CLANG'], array('page' => ''), "&");
     // URL fuers Blaettern
     $string = file_get_contents($this->url);
     if (empty($string)) {
         $string = self::file_get_contents_curl($this->url);
     }
     $xml = new SimpleXMLElement($string);
     // define the namespaces that we are interested in
     $ns = array('content' => 'http://purl.org/rss/1.0/modules/content/', 'wfw' => 'http://wellformedweb.org/CommentAPI/', 'dc' => 'http://purl.org/dc/elements/1.1/');
     isset($_GET['page']) ? $page = (int) $_GET['page'] : ($page = 1);
     $startwert_seite = $anzahl * ($page - 1) + 1;
     $endwert_seite = $page * $anzahl;
     if ($endwert_seite > sizeof($xml->channel->item)) {
         $endwert_seite = sizeof($xml->channel->item);
     }
     $anzahl_seiten = ceil(sizeof($xml->channel->item) / $anzahl);
     $itemh1 = $xml->channel->title;
     $itemDesc = $xml->channel->description;
     if (sizeof($xml->channel->item) / $anzahl > 1 and $this->blaettern == 1) {
         $pager['start'] = $startwert_seite;
         $pager['end'] = $endwert_seite;
         $pager['gesamt'] = sizeof($xml->channel->item);
         $pager['jumplist'] = self::drawJumplist($queryurl . "[PAGE]", "&laquo;", "", "&raquo;", $page, $anzahl_seiten);
     }
     if (!class_exists('Smarty')) {
         include 'redaxo/include/addons/news/libs/Smarty.class.php';
     }
     $t = new Smarty();
     //$t->force_compile = true;
     $t->debugging = false;
     $t->caching = false;
     $t->cache_lifetime = 120;
     $t->config_dir = 'redaxo/include/addons/news/view/configs/';
     $t->compile_dir = 'redaxo/include/addons/news/view/templates_c/';
     $t->cache_dir = 'redaxo/include/addons/news/view/cache/';
     $t->template_dir = 'redaxo/include/addons/news/view/templates/';
     $k = 0;
     foreach ($xml->channel->item as $article) {
         if ($k + 1 >= $startwert_seite and $k + 1 <= $endwert_seite) {
             $item[$k]['url'] = $article->link;
             $item[$k]['enclosure'] = $article->enclosure['url'];
             $item[$k]['title'] = $article->title;
             $item[$k]['pubDate'] = date("d.m.Y", self::rsstotime($article->pubDate));
             $item[$k]['description'] = $article->description;
         }
         $k++;
     }
     $t->assign("data", $item);
     $t->assign("pager", $pager);
     $t->assign("itemDesc", $itemDesc);
     $t->assign("itemh1", $itemh1);
     $t->display('rss.tpl');
     return;
 }
开发者ID:brt-tito,项目名称:rex-news,代码行数:57,代码来源:class.rssGetter.inc.php

示例12: setRedaxoVars

 function setRedaxoVars($aid, $clang = "", $params = array())
 {
     global $REX;
     if ($clang == "") {
         $clang = $REX["CUR_CLANG"];
     }
     $this->setObjectparams("article_id", $aid);
     $this->setObjectparams("clang", $clang);
     $this->setObjectparams("form_action", rex_getUrl($aid, $clang, $params));
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:10,代码来源:class.rex_xform.inc.php

示例13: execute

 function execute()
 {
     $element_2 = $this->action["elements"][2];
     $url = '';
     if (preg_match('/^[0-9]+$/i', $element_2)) {
         $url = rex_getUrl($element_2, '', '', "&");
     } elseif ($element_2 != '') {
         $url = $element_2;
     }
     // Emailkeys ersetzen. Somit auch Weiterleitungen mit neuer ID mšglich. "id=###ID###"
     foreach ($this->elements_email as $search => $replace) {
         $url = str_replace('###' . $search . '###', $replace, $url);
     }
     if ($url != '') {
         ob_end_clean();
         header("Location: " . $url);
         exit;
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:19,代码来源:class.xform.action_redirect.inc.php

示例14: a724_generatePathnamesFromTable

 function a724_generatePathnamesFromTable($params)
 {
     $debug = false;
     $sql = new rex_sql();
     $results = $sql->getArray('SELECT article_id, url_table, url_table_parameters FROM rex_a724_frau_schultze WHERE url_table != "" AND url_table_parameters != ""');
     $URLPATH = array();
     if ($sql->getRows() >= 1) {
         a724_deletePathnamesFromTable();
         foreach ($results as $result) {
             if (is_array($result) && count($result) > 0) {
                 $path = rex_getUrl($result['article_id']) . '/';
                 $path = str_replace('.html', '', $path);
                 $table = $result['url_table'];
                 $params = unserialize($result['url_table_parameters']);
                 $col_name = $params[$table][$table . "_name"];
                 $col_id = $params[$table][$table . "_id"];
                 // Daten zum Aufbau der Urls holen
                 $sqlu = new rex_sql();
                 $sqlu->setDebug($debug);
                 $res = $sqlu->getArray('SELECT ' . $col_name . ' AS name, ' . $col_id . ' AS id FROM ' . $table);
                 if ($sqlu->getRows() >= 1) {
                     // Urls in die Datenbank schreiben
                     $sqli = new rex_sql();
                     $sqli->setDebug($debug);
                     foreach ($res as $re) {
                         $table_path = $path . strtolower(rex_parse_article_name($re['name'])) . '.html';
                         $table_id = $re['id'];
                         $URLPATH[$result['url_table']][$table_id] = $table_path;
                         $sqli->setTable('rex_a724_frau_schultze');
                         $sqli->setValue('article_id', $result['article_id']);
                         $sqli->setValue('status', '1');
                         $sqli->setValue('url_table', $result['url_table']);
                         $sqli->setValue('name', $table_path);
                         $sqli->insert();
                     }
                 }
             }
         }
     }
     rex_put_file_contents(A724_URL_TABLE_PATHLIST, "<?php\n\$URLPATH = " . var_export($URLPATH, true) . ";\n");
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:41,代码来源:extension_common.inc.php

示例15: url_generate_column_article

 function url_generate_column_article($params)
 {
     global $I18N;
     $list = $params['list'];
     $return = '';
     $a = OOArticle::getArticleById($list->getValue("article_id"), $list->getValue("clang"));
     if ($a instanceof OOArticle) {
         $return = $a->getName();
         $return .= ' [';
         $return .= '<a href="index.php?article_id=' . $list->getValue('article_id') . '&amp;clang=' . $list->getValue('clang') . '">Backend</a>';
         $return .= ' | ';
         $return .= '<a href="' . rex_getUrl($list->getValue('article_id'), $list->getValue('clang')) . '">Frontend</a>';
         $return .= ']';
         $tree = $a->getParentTree();
         $levels = array();
         foreach ($tree as $object) {
             $levels[] = $object->getName();
         }
         $return .= '<div class="url-control-path"><small><b>Pfad: </b>' . implode(' : ', $levels) . '</small></div>';
     }
     return $return;
 }
开发者ID:ReggaePanda,项目名称:redaxo_plugin_url_control,代码行数:22,代码来源:url_generate.php


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