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


PHP get_param函数代码示例

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


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

示例1: create_category_tree

 /**
  * Standard function to create the standardised category tree
  *
  * @param  ID_TEXT		Notification code
  * @param  ?ID_TEXT		The ID of where we're looking under (NULL: N/A)
  * @return array 			Tree structure
  */
 function create_category_tree($notification_code, $id)
 {
     $pagelinks = array();
     $notification_category = get_param('id', NULL);
     $done_in_url = is_null($notification_category);
     $types = $GLOBALS['SITE_DB']->query_select('chat_buddies', array('member_liked'), array('member_likes' => get_member()));
     // Only show options for friends to simplify
     $types2 = $GLOBALS['SITE_DB']->query_select('notifications_enabled', array('l_code_category'), array('l_notification_code' => substr($notification_code, 0, 80), 'l_member_id' => get_member()));
     // Already monitoring members who may not be friends
     foreach ($types2 as $type) {
         $types[] = array('member_liked' => intval($type['l_code_category']));
     }
     foreach ($types as $type) {
         $username = $GLOBALS['FORUM_DRIVER']->get_username($type['member_liked']);
         if (!is_null($username)) {
             $pagelinks[$type['member_liked']] = array('id' => strval($type['member_liked']), 'title' => $username);
             if (!$done_in_url) {
                 if (strval($type['member_liked']) == $notification_category) {
                     $done_in_url = true;
                 }
             }
         }
     }
     if (!$done_in_url) {
         $pagelinks[] = array('id' => $notification_category, 'title' => $GLOBALS['FORUM_DRIVER']->get_username(intval($notification_category)));
     }
     global $M_SORT_KEY;
     $M_SORT_KEY = 'title';
     usort($pagelinks, 'multi_sort');
     return array_values($pagelinks);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:activity.php

示例2: restricted_manually_enabled_backdoor

/**
 * Backdoor handler. Can only be activated by those with FTP write-access.
 *
 * @return MEMBER			The member to simulate
 */
function restricted_manually_enabled_backdoor()
{
    global $IS_A_COOKIE_LOGIN;
    $IS_A_COOKIE_LOGIN = true;
    $ks = get_param('keep_su', NULL);
    if (!is_null($ks)) {
        $GLOBALS['IS_ACTUALLY_ADMIN'] = true;
        $su = $GLOBALS['FORUM_DRIVER']->get_member_from_username($ks);
        if (!is_null($su)) {
            return $su;
        } elseif (is_numeric($ks)) {
            return intval($ks);
        }
    }
    $members = $GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(), 1);
    if (count($members) != 0) {
        $ret = $GLOBALS['FORUM_DRIVER']->pname_id($members[key($members)]);
        $GLOBALS['FORUM_DRIVER']->ocf_flood_control($ret);
    } else {
        $ret = $GLOBALS['FORUM_DRIVER']->get_guest_id() + 1;
    }
    require_code('users_inactive_occasionals');
    create_session($ret, 1);
    return $ret;
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:30,代码来源:users_active_actions.php

示例3: _b_wp_archives_monthly_show

 function _b_wp_archives_monthly_show($options, $wp_num = '')
 {
     $block_style = $options[0] ? $options[0] : 0;
     $with_count = $options[1] == 0 ? false : true;
     $tpl_file = empty($options[2]) ? 'wp_archives_monthly.html' : $options[2];
     $sel_value = '';
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'm', 'string', '');
         init_param('GET', 'year', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         init_param('GET', 'day', 'integer', '');
         if (strlen(get_param('m')) == 6) {
             $sel_value = get_param('m');
         } else {
             if (test_param('year') && test_param('monthnum') && !test_param('day')) {
                 $sel_value = get_param('year') . zeroise(get_param('monthnum'), 2);
             }
         }
     }
     $block['wp_num'] = $wp_num;
     $block['divid'] = 'wpArchive' . $wp_num;
     $block['siteurl'] = wp_siteurl();
     $block['style'] = block_style_get(false);
     $block['block_style'] = $block_style;
     $block['with_count'] = $with_count;
     $now = current_time('mysql');
     $postHandler =& wp_handler('Post');
     $criteria =& new CriteriaCompo(new Criteria('post_date', $now, '<'));
     $criteria->add(new Criteria('post_status', 'publish'));
     $criteria->setSort('post_date');
     $criteria->setOrder('DESC');
     $criteria->setGroupby('YEAR(post_date), MONTH(post_date)');
     $postObjects =& $postHandler->getObjects($criteria, false, 'DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts');
     $block['records'] = array();
     if ($postObjects) {
         foreach ($postObjects as $postObject) {
             $this_year = $postObject->getExtraVar('year');
             $this_month = $postObject->getExtraVar('month');
             $_record['url'] = get_month_link($this_year, $this_month);
             $_record['text'] = format_month($this_year, $GLOBALS['month'][zeroise($this_month, 2)]);
             if ($with_count) {
                 $_record['count'] = '&nbsp;(' . $postObject->getExtraVar('posts') . ')';
             } else {
                 $_record['count'] = '';
             }
             $_record['select'] = $sel_value == $this_year . zeroise($this_month, 2) ? 'selected="selected"' : '';
             $block['records'][] = $_record;
         }
     }
     $_wpTpl =& new WordPresTpl('theme');
     $_wpTpl->assign('block', $block);
     if (!$_wpTpl->tpl_exists($tpl_file)) {
         $tpl_file = 'wp_archives_monthly.html';
     }
     $block['content'] = $_wpTpl->fetch($tpl_file);
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:60,代码来源:wp_archives_monthly.php

示例4: nice_get_choose_table

 /**
  * Standard aed_module table function.
  *
  * @param  array			Details to go to build_url for link to the next screen.
  * @return array			A quartet: The choose table, Whether re-ordering is supported from this screen, Search URL, Archive URL.
  */
 function nice_get_choose_table($url_map)
 {
     require_code('templates_results_table');
     $current_ordering = get_param('sort', 't_title ASC', true);
     if (strpos($current_ordering, ' ') === false) {
         warn_exit(do_lang_tempcode('INTERNAL_ERROR'));
     }
     list($sortable, $sort_order) = explode(' ', $current_ordering, 2);
     $sortables = array('t_title' => do_lang_tempcode('TITLE'));
     if (strtoupper($sort_order) != 'ASC' && strtoupper($sort_order) != 'DESC' || !array_key_exists($sortable, $sortables)) {
         log_hack_attack_and_exit('ORDERBY_HACK');
     }
     global $NON_CANONICAL_PARAMS;
     $NON_CANONICAL_PARAMS[] = 'sort';
     $header_row = results_field_title(array(do_lang_tempcode('TITLE'), do_lang_tempcode('ACTIONS')), $sortables, 'sort', $sortable . ' ' . $sort_order);
     $fields = new ocp_tempcode();
     require_code('form_templates');
     list($rows, $max_rows) = $this->get_entry_rows(false, $current_ordering);
     foreach ($rows as $row) {
         $edit_link = build_url($url_map + array('id' => $row['id']), '_SELF');
         $fields->attach(results_entry(array($row['t_title'], protect_from_escaping(hyperlink($edit_link, do_lang_tempcode('EDIT'), false, true, '#' . strval($row['id'])))), true));
     }
     $search_url = NULL;
     $archive_url = NULL;
     return array(results_table(do_lang($this->menu_label), get_param_integer('start', 0), 'start', either_param_integer('max', 20), 'max', $max_rows, $header_row, $fields, $sortables, $sortable, $sort_order), false, $search_url, $archive_url);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:32,代码来源:admin_ocf_post_templates.php

示例5: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_lang('bookmarks');
     require_code('bookmarks');
     require_css('bookmarks');
     if (is_guest()) {
         access_denied('NOT_AS_GUEST');
     }
     // Decide what we're doing
     $type = get_param('type', 'misc');
     if ($type == 'misc') {
         return $this->manage_bookmarks();
     }
     if ($type == '_manage') {
         return $this->_manage_bookmarks();
     }
     if ($type == '_edit') {
         return $this->_edit_bookmark();
     }
     if ($type == 'ad') {
         return $this->ad();
     }
     if ($type == '_ad') {
         return $this->_ad();
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:32,代码来源:bookmarks.php

示例6: run

 /**
  * Standard modular run function for snippet hooks. Generates XHTML to insert into a page using AJAX.
  *
  * @return tempcode  The snippet
  */
 function run()
 {
     $type = get_param('type');
     if (!has_zone_access(get_member(), 'adminzone')) {
         return new ocp_tempcode();
     }
     decache('main_staff_checklist');
     require_lang('staff_checklist');
     switch ($type) {
         case 'add':
             $recurinterval = get_param_integer('recurinterval', 0);
             $task_title = get_param('tasktitle', false, true);
             $id = $GLOBALS['SITE_DB']->query_insert('customtasks', array('tasktitle' => $task_title, 'datetimeadded' => time(), 'recurinterval' => $recurinterval, 'recurevery' => get_param('recurevery'), 'taskisdone' => NULL), true);
             require_code('notifications');
             $subject = do_lang('CT_NOTIFICATION_MAIL_SUBJECT', get_site_name(), $task_title);
             $mail = do_lang('CT_NOTIFICATION_MAIL', comcode_escape(get_site_name()), comcode_escape($task_title));
             dispatch_notification('checklist_task', NULL, $subject, $mail);
             return do_template('BLOCK_MAIN_STAFF_CHECKLIST_CUSTOM_TASK', array('TASKTITLE' => comcode_to_tempcode(get_param('tasktitle', false, true)), 'DATETIMEADDED' => display_time_period(time()), 'RECURINTERVAL' => $recurinterval == 0 ? '' : integer_format($recurinterval), 'RECUREVERY' => get_param('recurevery'), 'TASKDONE' => 'not_completed', 'ID' => strval($id)));
         case 'delete':
             $GLOBALS['SITE_DB']->query_delete('customtasks', array('id' => get_param_integer('id')), '', 1);
             break;
         case 'mark_done':
             $GLOBALS['SITE_DB']->query_update('customtasks', array('taskisdone' => time()), array('id' => get_param_integer('id')), '', 1);
             break;
         case 'mark_undone':
             $GLOBALS['SITE_DB']->query_update('customtasks', array('taskisdone' => NULL), array('id' => get_param_integer('id')), '', 1);
             break;
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:35,代码来源:checklist_task_manage.php

示例7: filter_regions

/**
 * Callback to add filters on top of the result set
 *
 * @param Form
 */
function filter_regions(&$Form)
{
    load_class('regional/model/_country.class.php', 'Country');
    $CountryCache =& get_CountryCache(NT_('All'));
    $Form->select_country('c', get_param('c'), $CountryCache, T_('Country'), array('allow_none' => true));
    $Form->text('s', get_param('s'), 30, T_('Search'), '', 255);
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:12,代码来源:_region_list.view.php

示例8: _redirect_screen

/**
 * Redirect the user - transparently, storing a message that will be shown on their destination page.
 *
 * @param  tempcode		Title to display on redirect page
 * @param  mixed			Destination URL (may be Tempcode)
 * @param  mixed			Message to show (may be Tempcode)
 * @param  boolean		For intermediatory hops, don't mark so as to read status messages - save them up for the next hop (which will not be intermediatory)
 * @param  ID_TEXT		Code of message type to show
 * @set    warn inform fatal
 * @return tempcode		Redirection message (likely to not actually be seen due to instant redirection)
 */
function _redirect_screen($title, $url, $text, $intermediatory_hop = false, $msg_type = 'inform')
{
    if (is_object($url)) {
        $url = $url->evaluate();
    }
    global $FORCE_META_REFRESH, $ATTACHED_MESSAGES_RAW;
    $special_page_type = get_param('special_page_type', 'view');
    if ($special_page_type == 'view' && $GLOBALS['NON_PAGE_SCRIPT'] == 0 && !headers_sent() && !$FORCE_META_REFRESH) {
        foreach ($ATTACHED_MESSAGES_RAW as $message) {
            $GLOBALS['SITE_DB']->query_insert('messages_to_render', array('r_session_id' => get_session_id(), 'r_message' => is_object($message[0]) ? $message[0]->evaluate() : escape_html($message[0]), 'r_type' => $message[1], 'r_time' => time()));
        }
        $_message = is_object($text) ? $text->evaluate() : escape_html($text);
        if ($_message != '' && (count($ATTACHED_MESSAGES_RAW) == 0 || $_message != do_lang('SUCCESS') && $_message != do_lang('REDIRECTING'))) {
            $GLOBALS['SITE_DB']->query_insert('messages_to_render', array('r_session_id' => get_session_id(), 'r_message' => $_message, 'r_type' => $msg_type, 'r_time' => time()));
        }
        if (!$intermediatory_hop) {
            $hash_pos = strpos($url, '#');
            if ($hash_pos !== false) {
                $hash_bit = substr($url, $hash_pos);
                $url = substr($url, 0, $hash_pos);
            } else {
                $hash_bit = '';
            }
            $url .= (strpos($url, '?') === false ? '?' : '&') . 'redirected=1' . $hash_bit;
        }
    }
    require_code('site2');
    assign_refresh($url, 0.0);
    return do_template('REDIRECT_SCREEN', array('_GUID' => '44ce3d1ffc6536b299ed0944e8ca7253', 'URL' => $url, 'TITLE' => $title, 'TEXT' => $text));
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:41,代码来源:templates_redirect_screen.php

示例9: MasterObject

 function MasterObject(&$config)
 {
     if (!$config['widget_enable']) {
         $msg = 'Widget功能没有启用';
         if (get_param('in_ajax')) {
             widget_error($msg);
         } else {
             exit($msg);
         }
     }
     $this->Config = $config;
     $this->Get =& $_GET;
     $this->Post =& $_POST;
     $this->Module = get_param('mod');
     $this->Code = get_param('code');
     $this->DatabaseHandler =& Obj::registry('DatabaseHandler');
     $this->MemberHandler = jclass('member');
     $this->MemberHandler->init();
     if ($this->MemberHandler->HasPermission($this->Module, $this->Code) == false) {
         widget_error($this->MemberHandler->GetError(), 203);
     }
     Obj::register("MemberHandler", $this->MemberHandler);
     define("FORMHASH", substr(md5(substr(time(), 0, -4) . $this->Config['auth_key']), 0, 16));
     if ($_SERVER['REQUEST_METHOD'] == "POST") {
         if ($this->Post["FORMHASH"] != FORMHASH) {
         }
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:28,代码来源:master.mod.php

示例10: DoClean

 function DoClean()
 {
     $type = get_param('type');
     if (!$type) {
         $this->Messager("请先选择要清理的缓存对象");
     }
     $this->_removeTopicAttach();
     $this->_removeTopicLongtext();
     $this->_removeVoteImage();
     if (in_array('data', $type)) {
         cache_db('clear');
         jtable('failedlogins')->truncate();
         DB::query("update " . TABLE_PREFIX . "members set `username`=`uid` WHERE `username`!=`uid` AND `username` REGEXP '^[0-9]*\$'");
     }
     if (in_array('tpl', $type)) {
         cache_clear();
         jconf::set('validate_category', array());
         jlogic('credits')->rule_conf(true);
     }
     if (in_array('channel', $type)) {
         jlogic('channel')->update_data();
     }
     if (in_array('album', $type)) {
         jlogic('image')->update_data();
     }
     $this->Messager("已清空所有缓存");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:27,代码来源:cache.mod.php

示例11: setOperName

 public function setOperName($uid, $full)
 {
     $parts = explode(' ', $full);
     $res = 0;
     $this->select('UPDATE oper.users SET lname = :ln, fname = :fn, pname = :pn WHERE id = :uid', ['uid' => $uid, 'ln' => get_param($parts, 0), 'fn' => get_param($parts, 1), 'pn' => get_param($parts, 2)], $res);
     return $res > 0;
 }
开发者ID:matyukhin-maxim,项目名称:ticket-db,代码行数:7,代码来源:TransferModel.php

示例12: MasterObject

 function MasterObject(&$config, $auto_run = false)
 {
     if (!$config['wap']) {
         include ROOT_PATH . 'wap/include/error_wap.php';
         exit;
     }
     $this->Config = $config;
     require_once ROOT_PATH . 'wap/include/func/wap_global.func.php';
     $this->Get =& $_GET;
     $this->Post =& $_POST;
     $this->Module = get_param('mod');
     $this->Code = get_param('code');
     $this->DatabaseHandler =& Obj::registry('DatabaseHandler');
     $this->MemberHandler = jclass('member');
     $this->MemberHandler->init();
     if ($this->MemberHandler->HasPermission($this->Module, $this->Code) == false) {
         $member_error = $this->MemberHandler->GetError();
         $member_error = array_iconv($this->Config['charset'], 'utf-8', $member_error);
         $this->Messager($member_error, null);
     }
     if (!in_array($this->Module, array('member', 'login', 'other'))) {
         $visit_rets = $this->MemberHandler->visit();
         if ($visit_rets['error']) {
             $this->Messager(null, 'index.php?mod=login&referer=' . urlencode('index.php?' . $_SERVER['QUERY_STRING']));
         }
     }
     $this->Title = $this->MemberHandler->CurrentAction['name'];
     Obj::register("MemberHandler", $this->MemberHandler);
     if ($this->auto_run || $auto_run) {
         $this->auto_run();
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:32,代码来源:master.mod.php

示例13: auth_set

 function auth_set($member_id, $oauth_url)
 {
     require_lang('twitter');
     require_code('twitter');
     $api_key = get_option('twitter_api_key', true);
     $api_secret = get_option('twitter_api_secret', true);
     $twitter = new Twitter($api_key, $api_secret);
     if (get_param_integer('oauth_in_progress', 0) == 0) {
         $response = $twitter->oAuthRequestToken($oauth_url->evaluate());
         $twitter->oAuthAuthorize($response['oauth_token']);
         exit;
     }
     $response = $twitter->oAuthAccessToken(get_param('oauth_token'), get_param('oauth_verifier'));
     if (!isset($response['oauth_token'])) {
         attach_message(do_lang_tempcode('TWITTER_OAUTH_FAIL', escape_html($response['message'])), 'warn');
         return false;
     }
     $save_to = 'twitter_oauth_token';
     if (!is_null($member_id)) {
         $save_to .= '__' . strval($member_id);
     }
     set_long_value($save_to, $response['oauth_token']);
     $save_to = 'twitter_oauth_token_secret';
     if (!is_null($member_id)) {
         $save_to .= '__' . strval($member_id);
     }
     set_long_value($save_to, $response['oauth_token_secret']);
     return true;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:29,代码来源:twitter.php

示例14: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     global $Messages, $localtimenow;
     // Group ID
     param('ivc_grp_ID', 'integer');
     param_check_not_empty('ivc_grp_ID', T_('Please select a group'));
     $this->set_from_Request('grp_ID', 'ivc_grp_ID', true);
     // Code
     param('ivc_code', 'string');
     param_check_not_empty('ivc_code', T_('You must provide an invitation code!'));
     param_check_regexp('ivc_code', '#^[A-Za-z0-9\\-_]{3,32}$#', T_('Invitation code must be from 3 to 32 letters, digits or signs "-", "_".'));
     $this->set_from_Request('code', 'ivc_code');
     // Expire date
     if (param_date('ivc_expire_date', T_('Please enter a valid date.'), true) && param_time('ivc_expire_time')) {
         // If date and time were both correct we may set the 'expire_ts' value
         $this->set('expire_ts', form_date(get_param('ivc_expire_date'), get_param('ivc_expire_time')));
     }
     // Source
     param('ivc_source', 'string');
     $this->set_from_Request('source', 'ivc_source', true);
     if (mysql2timestamp($this->get('expire_ts')) < $localtimenow) {
         // Display a warning if date is expired
         $Messages->add($this->ID == 0 ? T_('Note: The newly created invitation code is already expired') : T_('Note: The updated invitation code is already expired'), 'warning');
     }
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_invitation.class.php

示例15: actionIndex

 public function actionIndex()
 {
     $this->render('', false);
     $uid = get_param($this->authdata, 'id');
     // Если не авторизованы то идет лесом
     if (!$uid) {
         $this->redirect('/login/');
     }
     // иначе получим список доступных ему сайтов, и нарисуем ссылки на них
     $sites = $this->model->getGrantedSites($uid);
     $this->render('', false);
     if (count($sites) === 0) {
         $this->render('no-sites');
         return;
     }
     $this->data['siteList'] = '';
     $secure = [$uid, date('Y-m-d H:i:s'), get_param($this->authdata, 'fullname')];
     foreach ($sites as $item) {
         $link = get_param($item, 'link');
         $name = get_param($item, 'sitename');
         $key = get_param($item, 'passkey');
         $cipherText = Cipher::encode($secure, $key, true);
         $cipherText = strtr($cipherText, '+/=', '-,_');
         $link .= "auth/openid/";
         if (strpos($link, 'oper') !== false) {
             $link .= 'token/';
         }
         $link .= $cipherText;
         $this->data['siteList'] .= CHtml::createLink($name, null, ['href' => $link, 'class' => 'list-group-item strong italic']);
     }
     $this->render('panel', false);
     $this->render('');
 }
开发者ID:matyukhin-maxim,项目名称:openid,代码行数:33,代码来源:SitesController.php


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