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


PHP filter_out_sefurl函数代码示例

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


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

示例1: smarty_modifier_avatarize

function smarty_modifier_avatarize($user)
{
    global $tikilib;
    global $userlib;
    $avatar = $tikilib->get_user_avatar($user);
    if ($avatar != '' && $tikilib->get_user_preference($user, 'user_information', 'public') == 'public') {
        $id = $userlib->get_user_id($user);
        include_once 'tiki-sefurl.php';
        $url = "tiki-user_information.php?userId={$id}";
        $url = filter_out_sefurl($url);
        $avatar = "<a title=\"" . htmlspecialchars($user, ENT_QUOTES) . "\" href=\"{$url}\">" . $avatar . '</a>';
    }
    return $avatar;
}
开发者ID:railfuture,项目名称:tiki-website,代码行数:14,代码来源:modifier.avatarize.php

示例2: http_build_query

        $base_uri = $base_host;
        // maybe better than nothing
    }
}
if (strpos($base_uri, $tikiroot . 'route.php') !== false && !empty($inclusion)) {
    $base_uri = $base_url . $inclusion;
    if (!empty($_GET)) {
        $base_uri .= '?' . http_build_query($_GET, '', '&');
    }
    global $section, $sections;
    include_once 'tiki-sefurl.php';
    if (isset($sections[$section]['objectType'])) {
        $objectType = $sections[$section]['objectType'];
    } else {
        $objectType = $section;
    }
    if ($objectType === 'wiki page') {
        $objectType = 'wiki';
    }
    $base_uri = TikiLib::tikiUrlOpt(filter_out_sefurl($base_uri, $objectType));
}
// SSL options
if (isset($_REQUEST['stay_in_ssl_mode_present']) || isset($_REQUEST['stay_in_ssl_mode'])) {
    // We stay in HTTPS / SSL mode if 'stay_in_ssl_mode' has an 'y' or 'on' value
    $stay_in_ssl_mode = isset($_REQUEST['stay_in_ssl_mode']) && $_REQUEST['stay_in_ssl_mode'] == 'y' || isset($_REQUEST['stay_in_ssl_mode']) && $_REQUEST['stay_in_ssl_mode'] == 'on' ? 'y' : 'n';
} else {
    // Set default value of 'stay_in_ssl_mode' to the current mode state
    $stay_in_ssl_mode = $https_mode ? 'y' : 'n';
}
// Show the 'Stay in SSL mode' checkbox only if we are already in HTTPS
$show_stay_in_ssl_mode = $https_mode || $prefs['https_login'] == 'required' ? 'y' : 'n';
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:31,代码来源:absolute_urls.php

示例3: unset

            if ($tracker_info['useAttachments'] == 'y') {
                ++$cookietab;
            }
            if ($tracker_info['useComments'] == 'y') {
                ++$cookietab;
            }
            $smarty->assign('input_err', '1');
            // warning to display
            // can't go back if there are errors
            if (isset($_REQUEST['save_return'])) {
                $_REQUEST['save'] = 'save';
                unset($_REQUEST['save_return']);
            }
        }
        if (isset($_REQUEST['save_return']) && isset($_REQUEST['from'])) {
            $fromUrl = filter_out_sefurl('tiki-index.php?page=' . urlencode($_REQUEST['from']));
            header("Location: {$fromUrl}");
            exit;
        }
    }
}
// remove image from an image field
if (isset($_REQUEST["removeImage"])) {
    $img_field = array('data' => array());
    $img_field['data'][] = array('fieldId' => $_REQUEST["fieldId"], 'type' => 'i', 'name' => $_REQUEST["fieldName"], 'value' => 'blank');
    $trklib->replace_item($_REQUEST["trackerId"], $_REQUEST["itemId"], $img_field);
    $_REQUEST['show'] = "mod";
}
// ************* return to list ***************************
if (isset($_REQUEST["returntracker"]) || isset($_REQUEST["save_return"])) {
    require_once 'lib/smarty_tiki/block.self_link.php';
开发者ID:jkimdon,项目名称:cohomeals,代码行数:31,代码来源:tiki-view_tracker_item.php

示例4: tra

    }
    if (!$article_data) {
        $smarty->assign('msg', tra('Article not found'));
        $smarty->display('error.tpl');
        die;
    }
} else {
    $articleId = 0;
}
if (isset($_REQUEST['cancel_edit'])) {
    if (empty($articleId)) {
        header('location: tiki-view_articles.php');
        die;
    }
    include_once 'tiki-sefurl.php';
    header('location: ' . filter_out_sefurl("tiki-read_article.php?articleId={$articleId}", 'article', $artice_data['title']));
    die;
}
// We need separate numbering of previews, since we access preview images by this number
if (isset($_REQUEST['previewId'])) {
    $previewId = $_REQUEST['previewId'];
} else {
    $previewId = rand();
}
$smarty->assign('articleId', $articleId);
$smarty->assign('previewId', $previewId);
$smarty->assign('imageIsChanged', isset($_REQUEST['imageIsChanged']) && $_REQUEST['imageIsChanged'] == 'y' ? 'y' : 'n');
if (isset($_REQUEST['templateId']) && $_REQUEST['templateId'] > 0) {
    global $templateslib;
    require_once 'lib/templates/templateslib.php';
    $template_data = $templateslib->get_template($_REQUEST['templateId'], $prefs['language']);
开发者ID:hurcane,项目名称:tiki-azure,代码行数:31,代码来源:tiki-edit_article.php

示例5: preg_match

     //   - pref 'Go to group homepage only if login from default homepage' (limitedGoGroupHome) is disabled,
     //   - referer url (e.g. http://example.com/tiki/tiki-index.php?page=Homepage ) is the homepage (tikiIndex),
     //   - referer url complete path ( e.g. /tiki/tiki-index.php?page=Homepage ) is the homepage,
     //   - referer url relative path ( e.g. tiki-index.php?page=Homepage ) is the homepage
     //   - referer url SEF page ( e.g. /tiki/Homepage ) is the homepage
     //   - one of the three cases listed above, but compared to anonymous page instead of global homepage
     //   - first login after registration
     //   - last case ($tikiIndex_full != '') :
     //       wiki homepage could have been saved as 'tiki-index.php' instead of 'tiki-index.php?page=Homepage'.
     //       ... so we also need to check against : homepage + '?page=' + default wiki pagename
     //
     include_once 'tiki-sefurl.php';
     if ($url == '' || preg_match('/(tiki-register|tiki-login_validate|tiki-login_scr)\\.php/', $url) || $prefs['limitedGoGroupHome'] == 'n' || $url == $prefs['site_tikiIndex'] || $url_path == $prefs['site_tikiIndex'] || basename($url_path) == $prefs['site_tikiIndex'] || $anonymous_homepage != '' && ($url == $anonymous_homepage || $url_path == $anonymous_homepage || basename($url_path) == $anonymous_homepage) || filter_out_sefurl($anonymous_homepage) == basename($url_path) || $tikiIndex_full != '' && basename($url_path) == $tikiIndex_full) {
         $groupHome = $userlib->get_user_default_homepage($user);
         if ($groupHome != '') {
             $url = preg_match('/^(\\/|https?:)/', $groupHome) ? $groupHome : filter_out_sefurl('tiki-index.php?page=' . urlencode($groupHome));
         }
     }
 }
 // Unset session variable in case user su's
 unset($_SESSION['loginfrom']);
 // No sense in sending user to registration page or no page at all
 // This happens if the user has just registered and it's first login
 if ($url == '' || preg_match('/(tiki-register|tiki-login_validate|tiki-login_scr)\\.php/', $url)) {
     $url = $prefs['tikiIndex'];
 }
 // Now if the remember me feature is on and the user checked the rememberme checkbox then ...
 if ($prefs['rememberme'] != 'disabled' && isset($_REQUEST['rme']) && $_REQUEST['rme'] == 'on') {
     $userInfo = $userlib->get_user_info($user);
     $userId = $userInfo['userId'];
     $secret = $userlib->create_user_cookie($userId);
开发者ID:ameoba32,项目名称:tiki,代码行数:31,代码来源:tiki-login.php

示例6: list_menu_options

 public function list_menu_options($menuId, $offset = 0, $maxRecords = -1, $sort_mode = 'position_asc', $find = '', $full = false, $level = 0, $do_not_parse = false)
 {
     global $user, $tiki_p_admin, $prefs;
     $wikilib = TikiLib::lib('wiki');
     include_once 'tiki-sefurl.php';
     $options = $this->table('tiki_menu_options');
     $conditions = array('menuId' => $menuId);
     if ($find) {
         $conditions['search'] = $options->expr('(`name` like ? or `url` like ?)', array("%{$find}%", "%{$find}%"));
     }
     if ($level && $prefs['feature_userlevels'] == 'y') {
         $conditions['userlevel'] = $options->lesserThan($level + 1);
     }
     $menu = $this->get_menu($menuId);
     $sort = $options->expr($this->convertSortMode($sort_mode));
     $result = $options->fetchAll($options->all(), $conditions, $maxRecords, $offset, $sort);
     $cant = $options->fetchCount($conditions);
     $ret = array();
     foreach ($result as $res) {
         $res['canonic'] = $res['url'];
         $resourceGroups = array_filter(explode(',', $res['groupname'] ?: ''));
         if (!$do_not_parse && isset($menu['parse']) && $menu['parse'] === 'y') {
             $res['name'] = $wikilib->parse_data($res['name'], array('is_html' => $prefs['menus_item_names_raw'] === 'y'));
         }
         if (preg_match('|^\\(\\((.+?)\\)\\)$|', $res['url'], $matches)) {
             $res['url'] = 'tiki-index.php?page=' . rawurlencode($matches[1]);
             $res['sefurl'] = $wikilib->sefurl($matches[1]);
             $perms = Perms::get(array('type' => 'wiki page', 'object' => $matches[1]));
             if (!$perms->view && !$perms->wiki_view_ref) {
                 continue;
             }
         } else {
             $res['sefurl'] = filter_out_sefurl($res['url']);
         }
         if (!$full) {
             $display = true;
             if (isset($res['section']) and $res['section']) {
                 if (strstr($res['section'], '|')) {
                     $display = false;
                     $sections = preg_split('/\\s*\\|\\s*/', $res['section']);
                     foreach ($sections as $sec) {
                         if (!isset($prefs[$sec]) or $prefs[$sec] != 'y') {
                             $display = true;
                             break;
                         }
                     }
                 } else {
                     $display = true;
                     $sections = preg_split('/\\s*,\\s*/', $res['section']);
                     foreach ($sections as $sec) {
                         if (!isset($prefs[$sec]) or $prefs[$sec] != 'y') {
                             $display = false;
                             break;
                         }
                     }
                 }
             }
             if ($display && $tiki_p_admin != 'y') {
                 if (isset($res['perm']) and $res['perm']) {
                     if (strstr($res['perm'], '|')) {
                         $display = false;
                         $sections = preg_split('/\\s*\\|\\s*/', $res['perm']);
                         foreach ($sections as $sec) {
                             if (isset($GLOBALS[$sec]) && $GLOBALS[$sec] == 'y') {
                                 $display = true;
                                 break;
                             }
                         }
                     } else {
                         $sections = preg_split('/\\s*,\\s*/', $res['perm']);
                         $display = true;
                         foreach ($sections as $sec) {
                             if (!isset($GLOBALS[$sec]) or $GLOBALS[$sec] != 'y') {
                                 $display = false;
                                 break;
                             }
                         }
                     }
                 }
                 $userGroups = $this->get_user_groups($user);
                 if (count($resourceGroups) > 0) {
                     $intersect = array_intersect($resourceGroups, $userGroups);
                     if (count($intersect) < 1) {
                         $display = false;
                     }
                 }
             }
             if ($display) {
                 $pos = $res['position'];
                 if (empty($ret[$pos]) || empty($ret[$pos]['url'])) {
                     $ret[$pos] = $res;
                 }
             }
         } else {
             $ret[] = $res;
         }
     }
     return array('data' => array_values($ret), 'cant' => $cant);
 }
开发者ID:ameoba32,项目名称:tiki,代码行数:99,代码来源:menulib.php

示例7: getGroups

    function getGroups($token, $entry, $parameters)
    {
        // Process deletion of temporary users that are created via tokens
        $usersToDelete = $this->db->fetchAll('SELECT tokenId, userPrefix FROM tiki_auth_tokens
			WHERE (timeout != -1 AND UNIX_TIMESTAMP(creation) + timeout < UNIX_TIMESTAMP()) OR `hits` = 0');
        foreach ($usersToDelete as $del) {
            TikiLib::lib('user')->remove_temporary_user($del['userPrefix'] . $del['tokenId']);
        }
        $this->db->query('DELETE FROM tiki_auth_tokens
			 WHERE (timeout != -1 AND UNIX_TIMESTAMP(creation) + timeout < UNIX_TIMESTAMP()) OR `hits` = 0');
        $data = $this->db->query('SELECT tokenId, entry, parameters, groups, email, createUser, userPrefix FROM tiki_auth_tokens WHERE token = ? AND token = ' . self::SCHEME, array($token))->fetchRow();
        global $prefs, $full, $smarty, $tikiroot;
        // $full defined in route.php
        $sefurl = '';
        if ($prefs['feature_sefurl'] === 'y') {
            $sefurl = substr($full, strlen($tikiroot)) . '?' . http_build_query($_GET);
            $sefurlTypeMap = $this->getSefurlTypeMap();
            $smarty->loadPlugin('smarty_modifier_sefurl');
            $sefurl = $tikiroot . smarty_modifier_sefurl($sefurl, $sefurlTypeMap[$_GET[0]]);
        }
        // entry doesn't match "or" sefurl feature is in use but that also doesn't match
        if ($data['entry'] != $entry && $sefurl && $data['entry'] !== $sefurl) {
            return null;
        }
        $registered = (array) json_decode($data['parameters'], true);
        if (!$this->allPresent($registered, $parameters) || !$this->allPresent($parameters, $registered)) {
            return null;
        }
        $this->db->query('UPDATE `tiki_auth_tokens` SET `hits` = `hits` - 1 WHERE `tokenId` = ? AND hits != -1', array($data['tokenId']));
        // Process autologin of temporary users
        if ($data['createUser'] == 'y') {
            $userlib = TikiLib::lib('user');
            $tempuser = $data['userPrefix'] . $userlib->autogenerate_login($data['tokenId'], 6);
            $groups = json_decode($data['groups'], true);
            $parameters = json_decode($data['parameters'], true);
            if (!$userlib->user_exists($tempuser)) {
                $randompass = $userlib->genPass();
                $userlib->add_user($tempuser, $randompass, $data['email'], '', false, NULL, NULL, NULL, $groups);
            }
            $userlib->autologin_user($tempuser);
            $url = basename($data['entry']);
            if ($parameters) {
                $query = '?' . http_build_query($parameters, '', '&');
                $url .= $query;
            }
            include_once 'tiki-sefurl.php';
            $url = filter_out_sefurl($url);
            TikiLib::lib('access')->redirect($url);
            die;
        }
        $this->ok = true;
        return (array) json_decode($data['groups'], true);
    }
开发者ID:rjsmelo,项目名称:tiki,代码行数:53,代码来源:tokens.php

示例8: catch

        } catch (Exception $e) {
            switch ($e->getCode()) {
                case 1:
                    $smarty->assign('page_badchars_display', $wikilib->get_badchars());
                    break;
                case 2:
                    $smarty->assign('msg', tra("Page already exists"));
                    break;
                default:
                    throw $e;
            }
        }
    }
    if ($result) {
        global $perspectivelib;
        require_once 'lib/perspectivelib.php';
        $perspectivelib->replace_preference('wsHomepage', $page, $newName);
        if ($prefs['feature_sefurl'] == 'y') {
            include_once 'tiki-sefurl.php';
            header('location: ' . urlencode(filter_out_sefurl("tiki-index.php?page={$newName}", 'wiki')));
        } else {
            header('location: tiki-index.php?page=' . urlencode($newName));
        }
    }
}
ask_ticket('rename-page');
include_once 'tiki-section_options.php';
// disallow robots to index page:
$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');
$smarty->assign('mid', 'tiki-rename_page.tpl');
$smarty->display("tiki.tpl");
开发者ID:jkimdon,项目名称:cohomeals,代码行数:31,代码来源:tiki-rename_page.php

示例9: module_since_last_visit_new

/**
 * @param $mod_reference
 * @param null $params
 * @return bool
 */
function module_since_last_visit_new($mod_reference, $params = null)
{
    global $user;
    $smarty = TikiLib::lib('smarty');
    include_once 'tiki-sefurl.php';
    if (!$user) {
        return false;
    }
    if (!isset($params['use_jquery_ui']) || $params['use_jquery_ui'] != 'y') {
        $smarty->assign('use_jquery_ui', 'n');
    } else {
        $smarty->assign('use_jquery_ui', 'y');
    }
    if (!isset($params['date_as_link']) || $params['date_as_link'] != 'n') {
        $smarty->assign('date_as_link', 'y');
    } else {
        $smarty->assign('date_as_link', 'n');
    }
    if (!isset($params['fold_sections']) || $params['fold_sections'] != 'y') {
        $smarty->assign('default_folding', 'block');
        $smarty->assign('opposite_folding', 'none');
    } else {
        $smarty->assign('default_folding', 'none');
        $smarty->assign('opposite_folding', 'block');
    }
    if (empty($params['commentlength'])) {
        $params['commentlength'] = 40;
    }
    $resultCount = $mod_reference['rows'];
    global $prefs;
    $userlib = TikiLib::lib('user');
    $tikilib = TikiLib::lib('tiki');
    $smarty->loadPlugin('smarty_modifier_username');
    $ret = array();
    if ($params == null) {
        $params = array();
    }
    if ((empty($params['calendar_focus']) || $params['calendar_focus'] != 'ignore') && strpos($_SERVER['SCRIPT_NAME'], 'tiki-calendar.php') !== false && !empty($_REQUEST['todate'])) {
        $last = $_REQUEST['todate'];
        $_SESSION['slvn_last_login'] = $last;
        $smarty->assign('tpl_module_title', tra('Changes since'));
    } else {
        if (isset($_SESSION['slvn_last_login'])) {
            $last = $_SESSION['slvn_last_login'];
            $smarty->assign('tpl_module_title', tra('Changes since'));
        } else {
            $last = $tikilib->getOne('select `lastLogin` from `users_users` where `login`=?', array($user));
            $smarty->assign('tpl_module_title', tra('Since your last visit...'));
            if (!$last || !empty($params['daysAtLeast'])) {
                $now = TikiLib::lib('tiki')->now;
                if (!$last) {
                    $last = $now;
                }
                if (!empty($params['daysAtLeast']) && $now - $last < $params['daysAtLeast'] * 60 * 60 * 24) {
                    $last = $now - $params['daysAtLeast'] * 60 * 60 * 24;
                    $smarty->assign('tpl_module_title', tr('In the last %0 days...', $params['daysAtLeast']));
                }
            }
        }
    }
    $ret['lastLogin'] = $last;
    $ret['items']['comments']['label'] = tra('new comments');
    $ret['items']['comments']['cname'] = 'slvn_comments_menu';
    //TODO: should be a function on commentslib.php or use one of the existent functions
    $query = 'select `object`,`objectType`,`title`,`commentDate`,`userName`,`threadId`, `parentId`, `approved`, `archived`, `data`' . " from `tiki_comments` where `commentDate`>? and `objectType` != 'forum' order by `commentDate` desc";
    $result = $tikilib->query($query, array((int) $last), $resultCount);
    $count = 0;
    while ($res = $result->fetchRow()) {
        $ret['items']['comments']['list'][$count]['href'] = TikiLib::lib('comments')->getHref($res['objectType'], $res['object'], $res['threadId']);
        switch ($res['objectType']) {
            case 'article':
                $perm = 'tiki_p_read_article';
                $ret['items']['comments']['list'][$count]['href'] = filter_out_sefurl($ret['items']['comments']['list'][$count]['href'], 'article', $res['title']);
                break;
            case 'post':
                $perm = 'tiki_p_read_blog';
                $ret['items']['comments']['list'][$count]['href'] = filter_out_sefurl($ret['items']['comments']['list'][$count]['href'], 'blogpost', $res['title']);
                break;
            case 'blog':
                $perm = 'tiki_p_read_blog';
                $ret['items']['comments']['list'][$count]['href'] = filter_out_sefurl($ret['items']['comments']['list'][$count]['href'], 'blog', $res['title']);
                break;
            case 'faq':
                $perm = 'tiki_p_view_faqs';
                break;
            case 'file gallery':
                $perm = 'tiki_p_view_file_gallery';
                break;
            case 'image gallery':
                $perm = 'tiki_p_view_image_gallery';
                break;
            case 'poll':
                // no perm check for viewing polls, only a perm for taking them
                break;
            case 'wiki page':
//.........这里部分代码省略.........
开发者ID:rjsmelo,项目名称:tiki,代码行数:101,代码来源:mod-func-since_last_visit_new.php

示例10: wikiplugin_img


//.........这里部分代码省略.........
    include_once 'tiki-sefurl.php';
    ///////////////////////////////////// If only old img parameters used, use old code and get out of program quickly ///////////////////
    if (!empty($imgdata['src']) && strpos($imgdata['src'], '|') == FALSE && strpos($imgdata['src'], ',') == FALSE && empty($imgdata['thumb']) && empty($imgdata['button']) && empty($imgdata['max']) && empty($imgdata['styleimage']) && empty($imgdata['stylebox']) && empty($imgdata['styledesc']) && empty($imgdata['block']) && $imgdata['desc'] != 'desc' && $imgdata['desc'] != 'idesc' && $imgdata['desc'] != 'name' && $imgdata['desc'] != 'ititle' && $imgdata['rel'] != 'box') {
        if ($tikidomain && !preg_match('|^https?:|', $imgdata['src'])) {
            $imgdata['src'] = preg_replace("~img/wiki_up/~", "img/wiki_up/{$tikidomain}/", $imgdata['src']);
        }
        // Handle absolute links (e.g. to send a newsletter with images that remains on the tiki site)
        $absolute_links = isset($parseOptions['absolute_links']) ? $parseOptions['absolute_links'] : false;
        if ($imgdata['src'] != '' && $absolute_links && !preg_match('|^[a-zA-Z]+:\\/\\/|', $imgdata['src'])) {
            global $base_host, $url_path;
            $imgdata['src'] = $base_host . ($imgdata['src'][0] == '/' ? '' : $url_path) . $imgdata['src'];
        }
        $imgdata_dim = '';
        if ($prefs['feature_filegals_manager'] == 'y') {
            global $detected_lib;
            include_once 'lib/images/images.php';
        } else {
            $detected_lib = '';
        }
        if ($detected_lib != '' && ereg('^' . $tikiroot . 'tiki-download_file.php\\?', $imgdata['src'])) {
            // If an image lib has been detected and if we are using an image from a file gallery,
            //   then also resize the image server-side, because it will generally imply less data to download from the user
            //   (i.e. speed up the page download) and a better image quality (browser resize algorithms are quick but bad)
            //
            //   Note: ctype_digit is used to ensure there is only digits in width and height strings (e.g. to avoid '50%', ...)
            //
            if ((int) $imgdata['width'] > 0 && ctype_digit($imgdata['width'])) {
                $imgdata['src'] .= '&amp;x=' . $imgdata['width'];
            }
            if ((int) $imgdata['height'] > 0 && ctype_digit($imgdata['height'])) {
                $imgdata['src'] .= '&amp;y=' . $imgdata['height'];
            }
        }
        $imgdata["src"] = filter_out_sefurl(htmlentities($imgdata["src"]), $smarty);
        if ($imgdata['width']) {
            $imgdata_dim .= ' width="' . $imgdata['width'] . '"';
        }
        if ($imgdata['height']) {
            $imgdata_dim .= ' height="' . $imgdata['height'] . '"';
        }
        $repl = '<img alt="' . $imgdata["alt"] . '" src="' . $imgdata["src"] . '" border="0" ' . $imgdata_dim;
        if ($imgdata['imalign']) {
            $repl .= ' style="float: ' . $imgdata['imalign'] . '"';
        }
        if ($imgdata['usemap']) {
            $repl .= ' usemap="#' . $imgdata['usemap'] . '"';
        }
        if ($imgdata['class']) {
            $repl .= ' class="' . $imgdata['class'] . '"';
        }
        $repl .= ' />';
        if ($imgdata['link']) {
            $imgtarget = '';
            if ($prefs['popupLinks'] == 'y' && (preg_match('#^([a-z0-9]+?)://#i', $imgdata['link']) || preg_match('#^www\\.([a-z0-9\\-]+)\\.#i', $imgdata['link']))) {
                $imgtarget = ' target="_blank"';
            }
            if ($imgdata['rel']) {
                $linkrel = ' rel="' . $imgdata['rel'] . '"';
            } else {
                $linkrel = '';
            }
            if ($imgdata['title']) {
                $linktitle = ' title="' . $imgdata['title'] . '"';
            } else {
                $linktitle = '';
            }
开发者ID:rodin,项目名称:mcskb,代码行数:67,代码来源:wikiplugin_img.php

示例11: smarty_modifier_sefurl


//.........这里部分代码省略.........
            break;
        case 'calendar':
            $href = $sefurl ? "cal{$source}" : "tiki-calendar.php?calIds[]={$source}";
            break;
        case 'gallery':
            $href = 'tiki-browse_gallery.php?galleryId=' . $source;
            break;
        case 'article':
            $href = $sefurl ? "article{$source}" : "tiki-read_article.php?articleId={$source}";
            break;
        case 'topic':
            $href = "tiki-view_articles.php?topic={$source}";
            break;
        case 'file':
        case 'thumbnail':
        case 'display':
        case 'preview':
            $attributelib = TikiLib::lib('attribute');
            $attributes = $attributelib->get_attributes('file', $source);
            if ($type == 'file') {
                $prefix = 'dl';
                $suffix = null;
            } else {
                $prefix = $type;
                $suffix = '&amp;' . $type;
            }
            if (isset($attributes['tiki.content.url'])) {
                $href = $attributes['tiki.content.url'];
            } else {
                $href = $sefurl ? "{$prefix}{$source}" : "tiki-download_file.php?fileId={$source}{$suffix}";
            }
            break;
        case 'draft':
            $href = 'tiki-download_file.php?fileId=' . $source . '&amp;draft';
            break;
        case 'tracker item':
            $type = 'trackeritem';
        case 'trackeritem':
            $replacementpage = '';
            if ($prefs["feature_sefurl_tracker_prefixalias"] == 'y') {
                $trklib = TikiLib::lib('trk');
                $replacementpage = $trklib->get_trackeritem_pagealias($source);
            }
            if ($replacementpage) {
                return TikiLib::tikiUrlOpt($wikilib->sefurl($replacementpage, $with_next, $all_langs));
            } else {
                $href = 'tiki-view_tracker_item.php?itemId=' . $source;
            }
            break;
        case 'tracker':
            if ($source) {
                $href = 'tiki-view_tracker.php?trackerId=' . $source;
            } else {
                $href = 'tiki-list_trackers.php';
            }
            break;
        case 'filegallery':
        case 'file gallery':
            $href = 'tiki-list_file_gallery.php?galleryId=' . $source;
            break;
        case 'forum':
            $href = $sefurl ? "forum{$source}" : 'tiki-view_forum.php?forumId=' . $source;
            break;
        case 'forumthread':
        case 'forum post':
            // used in unified search getSupportedTypes()
            $href = $sefurl ? "forumthread{$source}" : 'tiki-view_forum_thread.php?comments_parentId=' . $source;
            break;
        case 'image':
            $href = 'tiki-browse_image.php?imageId=' . $source;
            break;
        case 'sheet':
            $href = $sefurl ? "sheet{$source}" : "tiki-view_sheets.php?sheetId={$source}";
            break;
        case 'category':
            $href = $sefurl ? "cat{$source}" : "tiki-browse_categories.php?parentId={$source}";
            break;
        case 'freetag':
            $href = "tiki-browse_freetags.php?tag=" . urlencode($source);
            break;
        case 'newsletter':
            $href = "tiki-newsletters.php?nlId=" . urlencode($source);
            break;
        case 'survey':
            $href = "tiki-take_survey.php?surveyId=" . urlencode($source);
            break;
        default:
            $href = $source;
            break;
    }
    if ($with_next && ($with_title != 'y' || $prefs['feature_sefurl'] !== 'y')) {
        $href .= '&amp;';
    }
    if ($prefs['feature_sefurl'] == 'y' && $smarty) {
        include_once 'tiki-sefurl.php';
        return TikiLib::tikiUrlOpt(filter_out_sefurl($href, $type, $title, $with_next, $with_title));
    } else {
        return TikiLib::tikiUrlOpt($href);
    }
}
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:101,代码来源:modifier.sefurl.php

示例12: tra

    $errmsg = tra('You do not have permission to view this section');
    require_once 'tiki-rss_error.php';
}
$feed = 'blog';
$id = 'blogId';
$uniqueid = "{$feed}.{$id}=" . $_REQUEST["{$id}"];
$output = $rsslib->get_from_cache($uniqueid);
if ($output['data'] == 'EMPTY') {
    $tmp = $bloglib->get_blog($_REQUEST["{$id}"]);
    $title = $prefs['feed_' . $feed . '_title'];
    $title .= $tmp['title'];
    $desc = $prefs['feed_' . $feed . '_desc'];
    $desc .= $tmp['description'];
    $dateId = 'created';
    $authorId = 'user';
    $titleId = 'title';
    $readrepl = 'tiki-view_blog_post.php?postId=%s';
    $changes = $bloglib->list_blog_posts($_REQUEST["{$id}"], false, 0, $prefs['feed_blog_max'], $dateId . '_desc', '', '', $tikilib->now);
    $tmp = array();
    include_once 'tiki-sefurl.php';
    foreach ($changes['data'] as $data) {
        $data['data'] = $tikilib->parse_data($data['data'], array('print' => true, 'is_html' => $data['wysiwyg'] === 'y' && $prefs['wysiwyg_htmltowiki'] !== 'y'));
        $data['sefurl'] = filter_out_sefurl(sprintf($readrepl, $data['postId']), 'blogpost', urlencode($data['title']));
        $tmp[] = $data;
    }
    $changes['data'] = $tmp;
    $tmp = null;
    $output = $rsslib->generate_feed($feed, $uniqueid, '', $changes, $readrepl, 'blogId', '', $title, $titleId, $desc, 'data', $dateId, $authorId, false);
}
header('Content-type: ' . $output['content-type']);
print $output['data'];
开发者ID:jkimdon,项目名称:cohomeals,代码行数:31,代码来源:tiki-blog_rss.php

示例13: urlencode

	if ($prefs['geo_locate_blogpost'] == 'y' && ! empty($_REQUEST['geolocation'])) {
		TikiLib::lib('geo')->set_coordinates('blog post', $postId, $_REQUEST['geolocation']);
	}

	// TAG Stuff
	$cat_type = 'blog post';
	$cat_objid = $postId;
	$cat_desc = TikiFilter::get('purifier')->filter(substr($edit_data, 0, 200));
	$cat_name = $title;
	$cat_href = "tiki-view_blog_post.php?postId=" . urlencode($postId);
	$cat_lang = $_REQUEST['lang'];
	include_once ("freetag_apply.php");
	include_once ("categorize.php");

	require_once('tiki-sefurl.php');	
	$url = filter_out_sefurl("tiki-view_blog_post.php?postId=$postId", 'blogpost');
	header("location: $url");
	die;
}

if ($contribution_needed) {
	$smarty->assign('title', $_REQUEST["title"]);
	$smarty->assign('parsed_data', $tikilib->parse_data($_REQUEST['data'], array('is_html' => $is_wysiwyg)));
	$smarty->assign('data', $_REQUEST['data']);
	if ($prefs['feature_freetags'] == 'y') {
		$smarty->assign('taglist', $_REQUEST["freetag_string"]);
	}
}

$cat_type = 'blog post';
$cat_objid = $postId;
开发者ID:railfuture,项目名称:tiki-website,代码行数:31,代码来源:tiki-blog_post.php

示例14: tra

        $tikilib->get_perm_object($_REQUEST['galleryId'], 'file gallery', $gal_info);
        if ($userlib->object_has_one_permission($_REQUEST['galleryId'], 'file gallery')) {
            $smarty->assign('individual', 'y');
        }
        $podCastGallery = $filegallib->isPodCastGallery($_REQUEST['galleryId'], $gal_info);
    } else {
        $smarty->assign('msg', tra('Non-existent gallery'));
        $smarty->display('error.tpl');
        die;
    }
    $gal_info['usedSize'] = $filegallib->getUsedSize($_REQUEST['galleryId']);
    $gal_info['maxQuota'] = $filegallib->getQuota($gal_info['parentId']);
    $gal_info['minQuota'] = $filegallib->getMaxQuotaDescendants($_REQUEST['galleryId']);
    if ($_REQUEST['galleryId'] == $prefs['fgal_root_user_id'] && $tiki_p_admin_file_galleries !== 'y') {
        include_once 'tiki-sefurl.php';
        header('Location: ' . filter_out_sefurl('tiki-list_file_gallery.php?galleryId=' . $filegallib->get_user_file_gallery()));
    }
}
$galleryId = $_REQUEST['galleryId'];
if (($galleryId != 0 || $tiki_p_list_file_galleries != 'y') && ($galleryId == 0 || $tiki_p_view_file_gallery != 'y')) {
    $smarty->assign('errortype', 401);
    $smarty->assign('msg', tra('You do not have permission to view this section'));
    $smarty->display('error.tpl');
    die;
}
if ($prefs['feature_use_fgal_for_user_files'] === 'y' && $gal_info['type'] === 'user' && $gal_info['visible'] !== 'y' && $gal_info['user'] !== $user && $tiki_p_admin_file_galleries !== 'y') {
    $smarty->assign('errortype', 401);
    $smarty->assign('msg', tra('You do not have permission to view this gallery'));
    $smarty->display('error.tpl');
    die;
}
开发者ID:rjsmelo,项目名称:tiki,代码行数:31,代码来源:tiki-list_file_gallery.php

示例15: tra

if (!isset($tracker_info["writerGroupCanModify"]) or (isset($gtid) and ($_REQUEST['trackerId'] != $gtid['groupTrackerId']))) {
	$tracker_info["writerGroupCanModify"] = 'n';
}
$tikilib->get_perm_object($_REQUEST['trackerId'], 'tracker', $tracker_info);
if (! $itemObject->canView()) {
	$smarty->assign('errortype', 401);
	$smarty->assign('msg', tra("Permission denied"));
	$smarty->display("error.tpl");
	die;
}

if (!empty($_REQUEST['moveto']) && $tiki_p_admin_trackers == 'y') { // mo to another tracker fields with same name
	$perms = Perms::get('tracker', $_REQUEST['moveto']);
	if ($perms->create_tracker_items) {
		$trklib->move_item($_REQUEST['trackerId'], $_REQUEST['itemId'], $_REQUEST['moveto']);
		header('Location: '.filter_out_sefurl('tiki-view_tracker_item.php?itemId=' . $_REQUEST['itemId']));
		exit;
	} else {
		$smarty->assign('errortype', 401);
		$smarty->assign('msg', tra("Permission denied"));
		$smarty->display("error.tpl");
		die;
	}
}
if (isset($_REQUEST["removeattach"])) {
	check_ticket('view-trackers-items');
	$owner = $trklib->get_item_attachment_owner($_REQUEST["removeattach"]);
	if (($user && ($owner == $user)) || ($tiki_p_admin_trackers == 'y')) {
		$access->check_authenticity(tra('Are you sure you want to remove this attachment?'));
		$trklib->remove_item_attachment($_REQUEST["removeattach"]);
	}
开发者ID:railfuture,项目名称:tiki-website,代码行数:31,代码来源:tiki-view_tracker_item.php


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