當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AMP_url_update函數代碼示例

本文整理匯總了PHP中AMP_url_update函數的典型用法代碼示例。如果您正苦於以下問題:PHP AMP_url_update函數的具體用法?PHP AMP_url_update怎麽用?PHP AMP_url_update使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AMP_url_update函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: check_authen_credentials

 function check_authen_credentials()
 {
     // First check for an existing authentication token.
     if (isset($_COOKIE[$this->_cookie_name])) {
         $this->notice('cookie exists');
         if ($result = $this->_handler->check_cookie($_COOKIE[$this->_cookie_name])) {
             return $result;
         }
     }
     //Check for a temporary auth token
     if (isset($_GET[$this->_cookie_name]) && isset($_GET['authtype']) && $_GET['authtype'] == 'temp') {
         if ($result = $this->_handler->check_cookie($_GET[$this->_cookie_name])) {
             $cookie_bits = explode(':', $_GET[$this->_cookie_name]);
             $hash = $cookie_bits[0];
             $this->_handler->set_authen_tokens();
             $this->_dbcon->Execute('DELETE FROM users_sessions where hash=' . $this->_dbcon->qstr($hash));
             if (isset($_GET['auth_action']) && $_GET['auth_action'] == 'reset') {
                 trigger_error('redirecting to :' . AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
                 ampredirect(AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
                 exit;
             }
             return $result;
         }
     }
     if (isset($_REQUEST[$this->_login_username_field]) || isset($_SERVER['PHP_AUTH_USER'])) {
         $this->notice('checking password');
         return $this->_handler->check_password();
     }
     $this->error('neither cookie nor password found');
     return false;
 }
開發者ID:radicalsuz,項目名稱:amp,代碼行數:31,代碼來源:LoginType.php

示例2: get_url_edit

 function get_url_edit()
 {
     if (!(isset($this->id) && $this->id)) {
         return AMP_SYSTEM_URL_FAQ;
     }
     return AMP_url_update(AMP_SYSTEM_URL_FAQ, array('id' => $this->id));
 }
開發者ID:radicalsuz,項目名稱:amp,代碼行數:7,代碼來源:FAQ.php

示例3: nav_articles_by_date

function nav_articles_by_date()
{
    $page =& AMPContent_Page::instance();
    if ($class = $page->getClassId()) {
        $date_values = AMP_lookup('classArticlesByDate', $class);
    } else {
        $date_values = AMP_lookup('articlesByDate');
    }
    if (!$date_values) {
        return false;
    }
    $output = array();
    $renderer = AMP_get_renderer();
    foreach ($date_values as $pretty_date => $qty) {
        $real_date = strtotime($pretty_date);
        $url['year'] = date('Y', $real_date);
        $url['month'] = date('m', $real_date);
        $url['offset'] = false;
        $url['qty'] = false;
        $new_url = AMP_url_update($_SERVER['REQUEST_URI'], $url);
        $output[] = $renderer->link($new_url, $pretty_date, array('class' => AMP_CONTENT_CSS_CLASS_NAV_LINK));
        if (count($output) == AMP_CONTENT_NAV_ARCHIVE_LIMIT) {
            break;
        }
    }
    return join($renderer->newline(), $output);
}
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:27,代碼來源:nav.articlesbydate.php

示例4: onDelete

 function onDelete(&$controller, $args = array())
 {
     $model = $controller->get_model();
     $nav_layout = $model->getLayoutId();
     if ($nav_layout) {
         ampredirect(AMP_url_update(AMP_SYSTEM_URL_NAV_LAYOUT, array('id' => $nav_layout)));
     }
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:8,代碼來源:ComponentMap.inc.php

示例5: temp_auth_actions

 function temp_auth_actions()
 {
     if (isset($_GET['auth_action']) && $_GET['auth_action'] == 'reset') {
         trigger_error('redirecting to :' . AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
         ampredirect(AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
         exit;
     }
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:8,代碼來源:Admin.inc.php

示例6: render_url_for_scaled

 function render_url_for_scaled($source, $width_limit)
 {
     if ($source->width <= $width_limit) {
         return $this->render_url_for($source);
     }
     $img_class = end(split(DIRECTORY_SEPARATOR, dirname($source->getPath())));
     return AMP_url_update(AMP_CONTENT_URL_IMAGE, array('filename' => $source->getName(), 'class' => $img_class, 'action' => 'resize', 'width' => $width_limit));
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:8,代碼來源:Detail.php

示例7: buildUrlArray

 function buildUrlArray()
 {
     foreach ($this->section_keys as $id) {
         $this->urls[] = AMP_url_update(AMP_CONTENT_URL_LIST_SECTION, array('type' => $id));
     }
     foreach ($this->article_keys as $id) {
         $this->urls[] = AMP_url_update(AMP_CONTENT_URL_ARTICLE, array('id' => $id));
     }
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:9,代碼來源:XmlSitemap.php

示例8: get_url_edit

 function get_url_edit()
 {
     $badge = $this->getBadgeId();
     if ($badge) {
         return AMP_url_update(AMP_SYSTEM_URL_BADGE, array('id' => $badge));
     }
     $nav = $this->getNavId();
     if ($nav) {
         return AMP_url_update(AMP_SYSTEM_URL_NAV, array('id' => $nav));
     }
     return false;
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:12,代碼來源:Location.php

示例9: render_sections

 function render_sections($source)
 {
     $section_list = $this->load_live_sections($source);
     $sections = array();
     foreach ($section_list as $section_id => $section_name) {
         $sections[] = $this->_renderer->link(AMP_url_update(AMP_CONTENT_URL_LIST_CLASS, array('type' => $section_id, 'class' => AMP_CONTENT_CLASS_BLOG)), $section_name);
     }
     $result = join(", ", $sections);
     if (!$result) {
         return false;
     }
     return AMP_TEXT_POSTED_IN . $this->_renderer->space() . $result;
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:13,代碼來源:Blog.php

示例10: _dbEdit

 function _dbEdit($source, $column_name)
 {
     $db_images = AMP_lookup('db_images');
     if (!$db_images) {
         return false;
     }
     $image_db_id = array_search($source->getName(), $db_images);
     if ($image_db_id === FALSE) {
         return false;
     }
     $renderer =& $this->_getRenderer();
     return $renderer->link(AMP_url_update(AMP_SYSTEM_URL_IMAGES, array('id' => $image_db_id)), AMP_TEXT_EDIT);
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:13,代碼來源:List.inc.php

示例11: render_nav_links

 function render_nav_links($data, $fieldname)
 {
     if (!(isset($data['id']) && $data['id'])) {
         return false;
     }
     $linked_navs = AMP_lookup('navs_by_badge', $data['id']);
     if (!$linked_navs) {
         return false;
     }
     $renderer = AMP_get_renderer();
     foreach ($linked_navs as $id => $name) {
         $links[$id] = $renderer->link(AMP_url_update(AMP_SYSTEM_URL_NAV, array('id' => $id)), $name);
     }
     return 'Linked Navs:' . $renderer->UL($links);
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:15,代碼來源:Form.inc.php

示例12: link_to_layouts

 function link_to_layouts($data, $fieldname)
 {
     if (!(isset($data['id']) && $data['id'])) {
         return false;
     }
     $linked_layouts = AMP_lookup('nav_layouts_by_nav', $data['id']);
     if (!$linked_layouts) {
         return false;
     }
     $renderer = AMP_get_renderer();
     asort($linked_layouts);
     foreach ($linked_layouts as $id => $name) {
         if (!$name) {
             continue;
         }
         $links[$id] = $renderer->link(AMP_url_update(AMP_SYSTEM_URL_NAV_LAYOUT, array('id' => $id)), $name);
     }
     return 'Used in Layouts:' . $renderer->UL($links, array('class' => 'linked_items'));
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:19,代碼來源:Form.inc.php

示例13: _init_criteria

 function _init_criteria()
 {
     if (!isset($this->_pager)) {
         return;
     }
     $pager_target = false;
     $section = isset($this->_source_criteria['section']) && $this->_source_criteria['section'] && !is_array($this->_source_criteria['section']) ? $this->_source_criteria['section'] : false;
     $class = isset($this->_source_criteria['class']) && $this->_source_criteria['class'] && !is_array($this->_source_criteria['class']) ? $this->_source_criteria['class'] : false;
     if ($section && $class) {
         $pager_target = AMP_url_update(AMP_CONTENT_URL_LIST_CLASS, array('type' => $section, 'class' => $class));
     } elseif ($section) {
         $pager_target = AMP_url_update(AMP_CONTENT_URL_LIST_SECTION, array('type' => $section));
     } elseif ($class) {
         $pager_target = AMP_url_update(AMP_CONTENT_URL_LIST_CLASS, array('class' => $class));
     }
     if ($pager_target) {
         $this->_pager->set_target($pager_target);
     }
 }
開發者ID:radicaldesigns,項目名稱:amp,代碼行數:19,代碼來源:List.php

示例14: restore

 function restore()
 {
     $target_id = $this->getData('id');
     if (!$target_id) {
         return false;
     }
     require_once 'AMP/Content/Template.inc.php';
     $template =& new AMPContent_Template($this->dbcon, $target_id);
     $template->save_version();
     $template->mergeData($this->getData());
     $result = $template->save();
     if (!$result) {
         return false;
     }
     AMP_flush_common_cache();
     $flash =& AMP_System_Flash::instance();
     $flash->add_message(sprintf(AMP_TEXT_DATA_RESTORE_SUCCESS, $this->getName()));
     ampredirect(AMP_url_update(AMP_SYSTEM_URL_TEMPLATE, array('id' => $target_id)));
     return $result;
 }
開發者ID:radicalsuz,項目名稱:amp,代碼行數:20,代碼來源:Archive.php

示例15: _make_event_list_field

 function _make_event_list_field()
 {
     $uid = $this->udm->uid;
     if (!$uid) {
         $uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : false;
     }
     if (!$uid) {
         return;
     }
     $events = AMP_lookup('eventsByOwner', $uid);
     if (!$events) {
         return;
     }
     $event_list = '';
     $renderer = AMP_get_renderer();
     foreach ($events as $event_id => $event_name) {
         $event_list .= $renderer->link(AMP_url_update(AMP_SYSTEM_URL_EVENT, array('id' => $event_id)), $event_name) . $renderer->newline();
     }
     $this->fields['events_list'] = array('type' => 'static', 'enabled' => true, 'default' => $event_list, 'public' => false);
     $this->fields['events_list_header'] = array('type' => 'header', 'label' => 'All Events Created By this User', 'public' => false, 'enabled' => true);
     $this->insertAfterFieldOrder(array('events_list_header', 'events_list'));
 }
開發者ID:radicalsuz,項目名稱:amp,代碼行數:22,代碼來源:Read.inc.php


注:本文中的AMP_url_update函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。