本文整理汇总了PHP中AMP_Url_AddVars函数的典型用法代码示例。如果您正苦于以下问题:PHP AMP_Url_AddVars函数的具体用法?PHP AMP_Url_AddVars怎么用?PHP AMP_Url_AddVars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AMP_Url_AddVars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getURL
function getURL()
{
if (!isset($this->id)) {
return AMP_CONTENT_URL_PETITIONS;
}
return AMP_Url_AddVars(AMP_CONTENT_URL_PETITIONS, array('pid=' . $this->id));
}
示例2: _formFooter
function _formFooter()
{
$renderer =& AMP_get_renderer();
$current_section_edit_link = false;
$current_class_edit_link = false;
$base_footer = ' <a href="' . AMP_Url_AddVars(AMP_SYSTEM_URL_ARTICLE, array('nosearch=1')) . '" class="standout">' . sprintf(AMP_TEXT_VIEW_ALL, AMP_pluralize(ucfirst(AMP_TEXT_ARTICLE))) . '</a>';
//sectional edit link
$current_section = isset($_REQUEST['section']) && $_REQUEST['section'] ? $_REQUEST['section'] : false;
if (!$current_section) {
$current_section = isset($_REQUEST['type']) && $_REQUEST['type'] ? $_REQUEST['type'] : false;
}
if ($current_section) {
$section_names = AMPContent_Lookup::instance('sections');
$section_name = isset($section_names[$current_section]) ? $section_names[$current_section] : false;
$current_section_edit_link = $renderer->separator() . $renderer->link(AMP_Url_AddVars(AMP_SYSTEM_URL_SECTION, array('id=' . $current_section)), $renderer->image(AMP_SYSTEM_ICON_EDIT, array('width' => '16', 'height' => '16', 'border' => 0)) . $renderer->space() . AMP_TEXT_EDIT . $renderer->space() . AMP_TEXT_SECTION . $renderer->space() . AMP_trimText($section_name, 20, false));
}
//class edit link
$current_class = isset($_REQUEST['class']) && $_REQUEST['class'] ? $_REQUEST['class'] : false;
if ($current_class) {
$class_names = AMPContent_Lookup::instance('classes');
$class_name = isset($class_names[$current_class]) ? $class_names[$current_class] : false;
$current_class_edit_link = $renderer->separator() . $renderer->link(AMP_Url_AddVars(AMP_SYSTEM_URL_CLASS, array('id=' . $current_class)), $renderer->image(AMP_SYSTEM_ICON_EDIT, array('width' => '16', 'height' => '16', 'border' => 0)) . $renderer->space() . AMP_TEXT_EDIT . $renderer->space() . AMP_TEXT_CLASS . $renderer->space() . AMP_trimText($class_name, 20, false));
}
return $base_footer . $current_section_edit_link . $current_class_edit_link . $renderer->newline();
}
示例3: getURL
function getURL()
{
if (!isset($this->id)) {
return false;
}
return AMP_Url_AddVars(AMP_CONTENT_URL_TAG, array('id=' . $this->id));
}
示例4: get_url_edit
function get_url_edit()
{
if (!(isset($this->id) && $this->id)) {
return false;
}
return AMP_Url_AddVars(AMP_SYSTEM_URL_TOOLS, array('id=' . $this->id));
}
示例5: getLoginUrl
function getLoginUrl($change_array = null)
{
if (!isset($change_array)) {
return PHP_SELF_QUERY();
}
$vars = array_merge(AMP_Url_Values(), $change_array);
return AMP_Url_AddVars($_SERVER['PHP_SELF'], $vars);
}
示例6: _getScheduleLink
function _getScheduleLink($data)
{
$baselink = AMP_Url_AddVars('schedule_item.php', 'action=list');
if (!isset($this->schedule_lookup[$this->currentrow['action_id']])) {
return $baselink;
}
return AMP_Url_AddVars($baselink, 'schedule_id=' . $this->schedule_lookup[$this->currentrow['action_id']]);
}
示例7: getTagURL
function getTagURL()
{
$tag_id = $this->getTag();
if (!$tag_id) {
return false;
}
return AMP_Url_AddVars(AMP_CONTENT_URL_TAG, array('id=' . $tag_id));
}
示例8: _renderSectionHeader
function _renderSectionHeader($section)
{
$section_header =& $section->getHeaderRef();
if (!$section_header) {
return false;
}
$section_header_url = AMP_Url_AddVars(AMP_SYSTEM_URL_ARTICLE, array('id=' . $section_header->id));
return AMP_TEXT_SECTION_HEADER . ': ' . AMP_trimText($section_header->getName(), 30, false) . $this->_renderer->space(2) . $this->_renderer->link($section_header_url, '[ ' . AMP_TEXT_EDIT . ' ]' . $this->_renderer->space() . $this->_renderer->image(AMP_SYSTEM_ICON_EDIT, array('width' => '16', 'height' => '16', 'border' => '0'))) . $this->_renderer->newline();
}
示例9: _signupLink
function _signupLink(&$source, $fieldname = null)
{
$form_id = $source->getFormId();
if (!$form_id) {
return false;
}
$renderer =& AMP_get_renderer();
return $renderer->link(AMP_Url_AddVars(AMP_SYSTEM_URL_FORM_DATA, array('modin' => 'modin=' . $form_id)), AMP_TEXT_PETITION_SIGNERS);
}
示例10: _makeThumb
function _makeThumb(&$source, $column_name)
{
require_once 'AMP/Content/Image.inc.php';
$img = $source->getTagImageRef();
if (!$img) {
return false;
}
return $this->inDiv($this->_HTML_image(AMP_Url_AddVars(AMP_SYSTEM_URL_IMAGE_VIEW, array('file=' . $img->getName(), 'class=' . AMP_IMAGE_CLASS_THUMB, 'height=30', 'action=resize')), $this->_thumb_attr), array('class' => 'tag_listing_icon'));
}
示例11: getURL
function getURL()
{
if ($url = $this->getRedirect()) {
return $url;
}
if (!$this->id) {
return false;
}
return AMP_Url_AddVars(AMP_CONTENT_URL_ARTICLE, array("vid=" . $this->id, 'id=' . $this->getArticleId(), 'preview=1'));
}
示例12: _after_init_search
function _after_init_search($criteria = null)
{
$this->_pager_target = AMP_Url_AddVars(AMP_SYSTEM_URL_ARTICLE_COMMENT, array('action=search'));
if (!isset($criteria)) {
return false;
}
$article_id = isset($criteria['article']) ? $criteria['article'] : false;
if ($article_id) {
$this->_pager_target = AMP_Url_AddVars($this->_pager_target, array('article=' . $article_id));
}
}
示例13: output
function output()
{
if (!($class_set =& AMPContent_Lookup::instance('activeClasses'))) {
return false;
}
$output = "";
foreach ($class_set as $id => $name) {
$output .= $this->_renderer->link(AMP_Url_AddVars(AMP_SYSTEM_URL_ARTICLE, array('class' => 'class=' . $id, 'AMPSearch' => 'AMPSearch=1')), $name) . $this->_renderer->newline();
//$output .= '<a href = "article_list.php?class='. $id . '">'. $name . "</a><BR>\n";
//$output .= '<a href = "article_list.php?class='. $class_id . '">'. $class_set[ $class_id ] . "</a> ( ". $class_count ." ) <BR>\n";
}
return $output;
}
示例14: _listLink
function _listLink($options = array())
{
if (!isset($options['_linked_uid'])) {
return false;
}
$comment_count_lookup = FormLookup::instance('commentCounts');
$comment_count = isset($comment_count_lookup[$options['_linked_uid']]) ? $comment_count_lookup[$options['_linked_uid']] : 0;
$link_text = ($comment_count ? $comment_count : AMP_TEXT_NO) . ' ' . AMP_pluralize(AMP_TEXT_COMMENT);
$renderer =& $this->_get_renderer();
//current comment count
$comments = $renderer->link(AMP_Url_AddAnchor(AMP_Url_AddVars(PHP_SELF_QUERY(), array('uid=' . $options['_linked_uid'])), 'comments'), $link_text);
//add comment link
$comments .= $renderer->separator() . $renderer->link(AMP_Url_AddVars(AMP_CONTENT_URL_COMMENT_ADD, array('userdata_id=' . $options['_linked_uid'])), AMP_TEXT_ADD);
return $comments . $renderer->newline(2);
}
示例15: _after_init_search
function _after_init_search($criteria = null)
{
$this->_url_add = AMP_Url_AddVars(AMP_SYSTEM_URL_ARTICLE, array('action=add'));
if (!isset($criteria)) {
return false;
}
$section_id = isset($criteria['section']) ? $criteria['section'] : (isset($criteria['type']) ? $criteria['type'] : false);
$class_id = isset($criteria['class']) ? $criteria['class'] : false;
if ($section_id) {
unset($this->_sort_default['type']);
$this->_url_add = AMP_Url_AddVars($this->_url_add, array('section=' . $section_id));
}
if ($class_id) {
$this->_url_add = AMP_Url_AddVars($this->_url_add, array('class=' . $class_id));
}
}