• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP post_param函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: bookmarks_script

/**
 * Script to make a bookmark add-form popup.
 */
function bookmarks_script()
{
    require_lang('bookmarks');
    $type = get_param('type');
    switch ($type) {
        case '_ad':
            $title = get_page_title('ADD_BOOKMARK');
            $folder = post_param('folder_new', '');
            if ($folder == '') {
                $folder = post_param('folder');
            }
            if ($folder == '!') {
                $folder = '';
            }
            add_bookmark(get_member(), $folder, post_param('title'), post_param('page_link'));
            $content = inform_screen($title, do_lang_tempcode('SUCCESS'));
            $content->attach('<script type="text/javascript">// <![CDATA[
				if (window.opener) window.close();
			//]]></script>');
            break;
        default:
            $url = find_script('bookmarks') . '?no_redirect=1&type=_ad';
            $keep = symbol_tempcode('KEEP');
            $url .= $keep->evaluate();
            $content = add_bookmark_form($url);
            break;
    }
    $echo = do_template('POPUP_HTML_WRAP', array('TITLE' => do_lang_tempcode('ADD_BOOKMARK'), 'CONTENT' => $content));
    $echo->handle_symbol_preprocessing();
    $echo->evaluate_echo();
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:34,代码来源:bookmarks.php


示例2: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     require_lang('staff_checklist');
     $newdata = post_param('stafflinksedit', NULL);
     if (!is_null($newdata)) {
         $items = explode("\n", $newdata);
         $GLOBALS['SITE_DB']->query_delete('stafflinks');
         foreach ($items as $i) {
             $q = trim($i);
             if (!empty($q)) {
                 $bits = explode('=', $q);
                 if (count($bits) >= 2) {
                     $last_bit = array_pop($bits);
                     $bits = array(implode('=', $bits), $last_bit);
                     $link = $bits[0];
                 } else {
                     $link = $q;
                 }
                 $link_title = $GLOBALS['SITE_DB']->query_value_null_ok('url_title_cache', 't_title', array('t_url' => $link));
                 if (is_null($link_title) || substr($link_title, 0, 1) == '!') {
                     $link_title = '';
                     $downloaded_at_link = http_download_file($link, 3000, false);
                     if (is_string($downloaded_at_link)) {
                         $matches = array();
                         if (preg_match('#\\s*<title[^>]*\\s*>\\s*(.*)\\s*\\s*<\\s*/title\\s*>#mi', $downloaded_at_link, $matches) != 0) {
                             require_code('character_sets');
                             $link_title = trim(str_replace('&ndash;', '-', str_replace('&mdash;', '-', @html_entity_decode(convert_to_internal_encoding($matches[1]), ENT_QUOTES, get_charset()))));
                         }
                     }
                     $GLOBALS['SITE_DB']->query_insert('url_title_cache', array('t_url' => $link, 't_title' => $link_title), false, true);
                     // To stop weird race-like conditions
                 }
                 if (count($bits) == 2) {
                     $link_desc = $bits[1];
                 } else {
                     $link_desc = $link_title;
                 }
                 $GLOBALS['SITE_DB']->query_insert('stafflinks', array('link' => $link, 'link_title' => $link_title, 'link_desc' => $link_desc));
             }
         }
     }
     $rows = $GLOBALS['SITE_DB']->query_select('stafflinks', array('*'));
     $formattedstafflinks = array();
     $unformattedstafflinks = array();
     foreach ($rows as $r) {
         if ($r['link_title'] == '') {
             $r['link_title'] = $r['link_desc'];
         }
         if (strlen($r['link_title']) > strlen($r['link_desc'])) {
             $r['link_title'] = $r['link_desc'];
         }
         $formattedstafflinks[] = array('URL' => $r['link'], 'TITLE' => $r['link_title'], 'DESC' => $r['link_title'] == $r['link_desc'] ? '' : $r['link_desc']);
         $unformattedstafflinks[] = array('LINKS' => $r['link'] . '=' . $r['link_desc']);
     }
     $map_comcode = '';
     foreach ($map as $key => $val) {
         $map_comcode .= ' ' . $key . '="' . addslashes($val) . '"';
     }
     return do_template('BLOCK_MAIN_STAFF_LINKS', array('URL' => get_self_url(), 'BLOCK_NAME' => 'main_staff_links', 'MAP' => $map_comcode, 'FORMATTEDLINKS' => $formattedstafflinks, 'UNFORMATTEDLINKS' => $unformattedstafflinks));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:66,代码来源:main_staff_links.php


示例3: action_done

 /**
  * Standard actualisation stage of pointstore item purchase.
  *
  * @return tempcode		The UI
  */
 function action_done()
 {
     $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));
     if (get_option('is_on_' . $class . '_buy') == '0') {
         return new ocp_tempcode();
     }
     $topic_id = post_param_integer('select_topic_id', -1);
     if ($topic_id == -1) {
         $_topic_id = post_param('manual_topic_id');
         $topic_id = intval($_topic_id);
     }
     $title = get_page_title('TOPIC_PINNING');
     // Check points
     $cost = intval(get_option($class));
     $points_left = available_points(get_member());
     if ($points_left < $cost && !has_specific_permission(get_member(), 'give_points_self')) {
         return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', integer_format($cost), integer_format($points_left)));
     }
     // Actuate
     $GLOBALS['FORUM_DRIVER']->pin_topic($topic_id);
     require_code('points2');
     charge_member(get_member(), $cost, do_lang('TOPIC_PINNING'));
     $GLOBALS['SITE_DB']->query_insert('sales', array('date_and_time' => time(), 'memberid' => get_member(), 'purchasetype' => 'TOPIC_PINNING', 'details' => strval($topic_id), 'details2' => ''));
     // Show message
     $url = build_url(array('page' => '_SELF', 'type' => 'misc'), '_SELF');
     return redirect_screen($title, $url, do_lang_tempcode('ORDER_GENERAL_DONE'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:32,代码来源:topic_pin.php


示例4: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     require_code('textfiles');
     $file = array_key_exists('param', $map) ? $map['param'] : 'admin_notes';
     $title = array_key_exists('title', $map) ? $map['title'] : do_lang('NOTES');
     $lang_none = array_key_exists('lang_none', $map) ? $map['lang_none'] : '0';
     $scrolls = array_key_exists('scrolls', $map) ? $map['scrolls'] : '0';
     $lang = $lang_none == '1' ? NULL : '';
     $file = filter_naughty($file, true);
     $new = post_param('new', NULL);
     if (!is_null($new)) {
         $hooks = find_all_hooks('blocks', 'main_notes');
         foreach (array_keys($hooks) as $hook) {
             require_code('hooks/blocks/main_notes/' . filter_naughty_harsh($hook));
             $ob = object_factory('Hook_notes_' . filter_naughty_harsh($hook), true);
             if (is_null($ob)) {
                 continue;
             }
             $ob->run($file);
         }
         write_text_file($file, $lang, $new);
         log_it('NOTES', $file);
         attach_message(do_lang_tempcode('SUCCESS'), 'inform');
     }
     $contents = read_text_file($file, $lang, true);
     $post_url = get_self_url();
     $map_comcode = '';
     foreach ($map as $key => $val) {
         $map_comcode .= ' ' . $key . '="' . addslashes($val) . '"';
     }
     return do_template('BLOCK_MAIN_NOTES', array('_GUID' => 'f737053505de3bd8ccfe806ec014b8fb', 'TITLE' => $title, 'BLOCK_NAME' => 'main_notes', 'MAP' => $map_comcode, 'CONTENTS' => $contents, 'SCROLLS' => array_key_exists('scrolls', $map) && $map['scrolls'] == '1', 'URL' => $post_url));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:main_notes.php


示例5: _a_tag_link_fixup

/**
 * Used by semihtml_to_comcode to fix <a> tag links. preg_replace_callback callback
 *
 * @param  array			Array of matches
 * @return string			Substituted text
 */
function _a_tag_link_fixup($matches)
{
    $referer = post_param('http_referer', ocp_srv('HTTP_REFERER'));
    $caller_url = looks_like_url($referer) ? preg_replace('#/[^/]*$#', '', $referer) : get_base_url();
    $ret = '<a ' . $matches[1] . 'href="' . qualify_url($matches[2], $caller_url) . '"' . $matches[3] . '>';
    return $ret;
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:13,代码来源:comcode_from_html.php


示例6: run

 /**
  * Standard modular run function for preview hooks.
  *
  * @return array			A pair: The preview, the updated post Comcode
  */
 function run()
 {
     if (!has_specific_permission(get_member(), 'comcode_dangerous')) {
         exit;
     }
     require_code('zones2');
     require_code('zones3');
     $bparameters = '';
     $bparameters_xml = '';
     $block = post_param('block');
     $parameters = get_block_parameters($block);
     $parameters[] = 'failsafe';
     $parameters[] = 'cache';
     $parameters[] = 'quick_cache';
     foreach ($parameters as $parameter) {
         $value = post_param($parameter, NULL);
         if (is_null($value)) {
             if (post_param_integer('tick_on_form__' . $parameter, NULL) === NULL) {
                 continue;
             }
             // If not on form, continue, otherwise must be 0
             $value = '0';
         }
         if ($value != '' && ($parameter != 'failsafe' || $value == '1') && ($parameter != 'cache' || $value != block_cache_default($block)) && ($parameter != 'quick_cache' || $value == '1')) {
             $bparameters .= ' ' . $parameter . '="' . str_replace('"', '\\"', $value) . '"';
             $bparameters_xml = '<blockParam key="' . escape_html($parameter) . '" val="' . escape_html($value) . '" />';
         }
     }
     $comcode = '[block' . $bparameters . ']' . $block . '[/block]';
     $preview = comcode_to_tempcode($comcode);
     return array($preview, NULL);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:37,代码来源:block_comcode.php


示例7: run

 /**
  * Standard modular run function for preview hooks.
  *
  * @return array			A pair: The preview, the updated post Comcode
  */
 function run()
 {
     require_code('uploads');
     $urls = get_url('', 'file', 'uploads/iotds', 0, OCP_UPLOAD_IMAGE, true, '', 'file2');
     if ($urls[0] == '') {
         if (!is_null(post_param_integer('id', NULL))) {
             $rows = $GLOBALS['SITE_DB']->query_select('iotds', array('url', 'thumb_url'), array('id' => post_param_integer('id')), '', 1);
             $urls = $rows[0];
             $url = $urls['url'];
             $thumb_url = $urls['thumb_url'];
         } else {
             warn_exit(do_lang_tempcode('IMPROPERLY_FILLED_IN_UPLOAD'));
         }
     } else {
         $url = $urls[0];
         $thumb_url = $urls[1];
     }
     $caption = comcode_to_tempcode(post_param('caption', ''));
     $title = comcode_to_tempcode(post_param('title', ''));
     require_code('images');
     $thumb = do_image_thumb(url_is_local($thumb_url) ? get_custom_base_url() . '/' . $thumb_url : $thumb_url, $caption, true);
     $url = url_is_local($url) ? get_custom_base_url() . '/' . $url : $url;
     $preview = do_template('IOTD', array('ID' => '', 'IMAGE_URL' => $url, 'SUBMITTER' => strval(get_member()), 'VIEW_URL' => $url, 'IMAGE' => $thumb, 'CAPTION' => $title));
     return array($preview, NULL);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:30,代码来源:iotd.php


示例8: backend_cloud_script

/**
 * Handle cloud registrations.
 */
function backend_cloud_script()
{
    // Closed site
    $site_closed = get_option('site_closed');
    if ($site_closed == '1' && !has_specific_permission(get_member(), 'access_closed_site') && !$GLOBALS['IS_ACTUALLY_ADMIN']) {
        header('Content-Type: text/plain');
        @exit(get_option('closed'));
    }
    $path = post_param('path', '');
    $procedure = post_param('registerProcedure', '');
    $protocol = post_param('protocol', '');
    if ($protocol == 'soap') {
        exit('false');
    }
    if ($protocol == 'http-post') {
        exit('false');
    }
    if ($protocol == 'xml-rpc' && !function_exists('xmlrpc_encode')) {
        exit('false');
    }
    $port = post_param_integer('port', '80');
    //	$watching_channel=$_POST['channels'];
    $status = register_them($path, $procedure, $protocol, $port, get_param('type', ''));
    if (!$status) {
        exit('false');
    }
    exit('true');
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:31,代码来源:rss2.php


示例9: run

 /**
  * Standard modular run function for preview hooks.
  *
  * @return array			A pair: The preview, the updated post Comcode
  */
 function run()
 {
     require_code('comcode_add');
     $comcode = _get_preview_environment_comcode(post_param('tag'));
     $temp_tpl = comcode_to_tempcode($comcode[0]);
     return array($temp_tpl, NULL);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:12,代码来源:comcode_tag.php


示例10: set_fields

 /**
  * Standard modular run function for setting features from the setup wizard.
  */
 function set_fields()
 {
     if (!addon_installed('stats')) {
         return;
     }
     set_option('stats_store_time', post_param('stats_store_time'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:10,代码来源:stats.php


示例11: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_lang('bulkupload');
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/bulkuploadassistant';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_adv_comcode';
     $GLOBALS['HELPER_PANEL_TEXT'] = comcode_lang_string('DOC_BULK_UPLOAD');
     $title = get_page_title('BULK_UPLOAD');
     $parameter = post_param('parameter', '');
     require_code('form_templates');
     if ($parameter == '') {
         $post_url = build_url(array('page' => '_SELF'), '_SELF');
         $text = paragraph(do_lang_tempcode('BULK_UPLOAD_HELP'));
         $submit_name = do_lang_tempcode('BULK_UPLOAD');
         $fields = form_input_line(do_lang_tempcode('DIRECTORY'), do_lang_tempcode('DIRECTORY_BULK'), 'parameter', 'uploads/attachments/' . date('Y-m-d', utctime_to_usertime()), true);
         return do_template('FORM_SCREEN', array('_GUID' => '77a2ca460745145d8a1d18cf24971fea', 'SKIP_VALIDATION' => true, 'HIDDEN' => '', 'FIELDS' => $fields, 'URL' => $post_url, 'TITLE' => $title, 'TEXT' => $text, 'SUBMIT_NAME' => $submit_name));
     } else {
         breadcrumb_set_parents(array(array('_SELF:_SELF:misc', do_lang_tempcode('BULK_UPLOAD'))));
         breadcrumb_set_self(do_lang_tempcode('_RESULTS'));
         $out = $this->do_dir(get_custom_file_base() . '/' . filter_naughty($parameter, true));
         if ($out->is_empty()) {
             inform_exit(do_lang_tempcode('NO_FILES'));
         }
         return do_template('BULK_HELPER_RESULTS_SCREEN', array('_GUID' => '5d373553cf21a58f15006bd4e600a9ee', 'TITLE' => $title, 'RESULTS' => $out));
     }
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:30,代码来源:admin_bulkupload.php


示例12: run

 /**
  * Standard modular run function for snippet hooks. Generates XHTML to insert into a page using AJAX.
  *
  * @return tempcode  The snippet
  */
 function run()
 {
     if (has_actual_page_access(get_member(), 'admin_themes')) {
         require_code('tempcode_compiler');
         return template_to_tempcode(post_param('css'));
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:13,代码来源:css_compile.php


示例13: run

 /**
  * Standard modular run function for preview hooks.
  *
  * @return array			A pair: The preview, the updated post Comcode
  */
 function run()
 {
     $_GET['keep_theme_seed'] = post_param('seed_hex');
     $_GET['keep_theme_dark'] = post_param('dark', '0');
     $_GET['keep_theme_source'] = 'default';
     $_GET['keep_theme_algorithm'] = 'equations';
     $preview = request_page($GLOBALS['SITE_DB']->query_value('zones', 'zone_default_page'), true, '');
     return array($preview, NULL);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:14,代码来源:setup_wizard.php


示例14: _do_template

/**
 * A template has not been structurally cached, so compile it and store in the cache.
 *
 * @param  ID_TEXT			The theme the template is in the context of
 * @param  PATH				The path to the template file
 * @param  ID_TEXT			The codename of the template (e.g. foo)
 * @param  ID_TEXT			The actual codename to use for the template (e.g. thin_foo)
 * @param  LANGUAGE_NAME	The language the template is in the context of
 * @param  string				File type suffix of template file
 * @param  ?ID_TEXT			The theme to cache in (NULL: main theme)
 * @return tempcode			The compiled tempcode
 */
function _do_template($theme, $path, $codename, $_codename, $lang, $suffix, $theme_orig = NULL)
{
    if (is_null($theme_orig)) {
        $theme_orig = $theme;
    }
    $base_dir = ($theme == 'default' && ($suffix != '.css' || strpos($path, '/css_custom') === false) ? get_file_base() : get_custom_file_base()) . '/themes/';
    global $CACHE_TEMPLATES, $FILE_ARRAY, $TEMPLATE_PREVIEW_OP, $MEM_CACHE;
    if (isset($FILE_ARRAY)) {
        $html = unixify_line_format(file_array_get('themes/' . $theme . $path . $codename . $suffix));
    } else {
        $html = unixify_line_format(file_get_contents($base_dir . filter_naughty($theme . $path . $codename) . $suffix, FILE_TEXT));
    }
    if (strpos($html, '{$,Parser hint: pure}') !== false) {
        return make_string_tempcode(preg_replace('#\\{\\$,.*\\}#U', '/*no minify*/', $html));
    }
    if ($GLOBALS['SEMI_DEBUG_MODE'] && strpos($html, '.innerHTML') !== false && strpos($html, 'Parser hint: .innerHTML okay') === false) {
        require_code('site');
        attach_message('Do not use the .innerHTML property in your Javascript because it will not work in true XHTML (when the browsers real XML parser is in action). Use ocPortal\'s global setInnerHTML/getInnerHTML functions.', 'warn');
    }
    // Strip off trailing final lines from single lines templates. Editors often put these in, and it causes annoying "visible space" issues
    if (substr($html, -1, 1) == chr(10) && substr_count($html, chr(10)) == 1) {
        $html = substr($html, 0, strlen($html) - 1);
    }
    if ($TEMPLATE_PREVIEW_OP) {
        $test = post_param($codename, NULL);
        if (!is_null($test)) {
            $html = post_param($test . '_new');
        }
    }
    $result = template_to_tempcode($html, 0, false, $codename, $theme, $lang);
    if ($CACHE_TEMPLATES && ($suffix == '.tpl' || $codename == 'no_cache')) {
        if (!is_null($MEM_CACHE)) {
            persistant_cache_set(array('TEMPLATE', $theme, $lang, $_codename), $result->to_assembly(), strpos($path, 'default/templates/') !== false);
        } else {
            $path2 = get_custom_file_base() . '/themes/' . $theme_orig . '/templates_cached/' . filter_naughty($lang) . '/';
            $myfile = @fopen($path2 . filter_naughty($_codename) . $suffix . '.tcd', 'wb');
            if ($myfile === false) {
                if (@mkdir($path2, 0777)) {
                    require_code('files');
                    fix_permissions($path2, 0777);
                } else {
                    if (file_exists($path2 . filter_naughty($_codename) . $suffix . '.tcd')) {
                        warn_exit(do_lang_tempcode('WRITE_ERROR', $path2 . filter_naughty($_codename) . $suffix . '.tcd'));
                    } else {
                        warn_exit(do_lang_tempcode('WRITE_ERROR_CREATE', $path2 . filter_naughty($_codename) . $suffix . '.tcd'));
                    }
                }
            } else {
                fwrite($myfile, $result->to_assembly($lang));
                fclose($myfile);
                fix_permissions($path2 . filter_naughty($_codename) . $suffix . '.tcd');
            }
        }
    }
    return $result;
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:68,代码来源:tempcode_compiler__runtime.php


示例15: _get_input_date

/**
 * Check a POST inputted date for validity, and get the Unix timestamp for the inputted date.
 *
 * @param  ID_TEXT		The stub of the parameter name (stub_year, stub_month, stub_day, stub_hour, stub_minute)
 * @param  boolean		Whether to allow over get parameters also
 * @return ?TIME			The timestamp of the date (NULL: no input date was chosen)
 */
function _get_input_date($stub, $get_also = false)
{
    $timezone = post_param('timezone', get_users_timezone());
    if ($get_also) {
        //		if (either_param_integer($stub,0)==0) return NULL; // NULL was chosen		Doesn't work like this now
        $year = either_param_integer($stub . '_year', NULL);
        if (is_null($year)) {
            return NULL;
        }
        $month = either_param_integer($stub . '_month', NULL);
        if (is_null($month)) {
            return NULL;
        }
        $day = either_param_integer($stub . '_day', NULL);
        if (is_null($day)) {
            return NULL;
        }
        $hour = either_param_integer($stub . '_hour', NULL);
        $minute = either_param_integer($stub . '_minute', NULL);
    } else {
        //		if (post_param_integer($stub,0)==0) return NULL; // NULL was chosen		Doesn't work like this now
        $year = post_param_integer($stub . '_year', NULL);
        if (is_null($year)) {
            return NULL;
        }
        $month = post_param_integer($stub . '_month', NULL);
        if (is_null($month)) {
            return NULL;
        }
        $day = post_param_integer($stub . '_day', NULL);
        if (is_null($day)) {
            return NULL;
        }
        $hour = post_param_integer($stub . '_hour', NULL);
        $minute = post_param_integer($stub . '_minute', NULL);
    }
    if (!checkdate($month, $day, $year)) {
        warn_exit(do_lang_tempcode('INVALID_DATE_GIVEN'));
    }
    if (is_null($hour)) {
        if (strpos($stub, 'end') !== false) {
            $hour = 23;
            $minute = 59;
        } else {
            $hour = 0;
            $minute = 0;
        }
    }
    $time = mktime($hour, $minute, 0, $month, $day, $year);
    if ($year >= 1970 || @strftime('%Y', @mktime(0, 0, 0, 1, 1, 1963)) == '1963') {
        $amount_forward = tz_time($time, $timezone) - $time;
        $time = $time - $amount_forward;
    }
    return $time;
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:62,代码来源:temporal2.php


示例16: run

 /**
  * Standard modular run function for preview hooks.
  *
  * @return array			A pair: The preview, the updated post Comcode
  */
 function run()
 {
     require_lang('ocf');
     require_css('ocf');
     $original_comcode = post_param('post');
     $posting_ref_id = post_param_integer('posting_ref_id', mt_rand(0, 100000));
     $post_bits = do_comcode_attachments($original_comcode, 'seedy_post', strval(-$posting_ref_id), true, $GLOBALS['SITE_DB']);
     $post_comcode = $post_bits['comcode'];
     $post_html = $post_bits['tempcode'];
     return array($post_html, $post_comcode);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:16,代码来源:cedi_post.php


示例17: run

 /**
  * Standard modular run function for preview hooks.
  *
  * @return array			A pair: The preview, the updated post Comcode
  */
 function run()
 {
     // Find review, if there is one
     $individual_review_ratings = array();
     $review_rating = post_param('review_rating', '');
     if ($review_rating != '') {
         $individual_review_ratings[''] = array('REVIEW_TITLE' => '', 'REVIEW_RATING' => $review_rating);
     }
     $poster_name = $GLOBALS['FORUM_DRIVER']->get_username(get_member());
     $post = comcode_to_tempcode(post_param('post'));
     // OCF renderings of poster
     static $hooks = NULL;
     if (is_null($hooks)) {
         $hooks = find_all_hooks('modules', 'topicview');
     }
     static $hook_objects = NULL;
     if (is_null($hook_objects)) {
         $hook_objects = array();
         foreach (array_keys($hooks) as $hook) {
             require_code('hooks/modules/topicview/' . filter_naughty_harsh($hook));
             $object = object_factory('Hook_' . filter_naughty_harsh($hook), true);
             if (is_null($object)) {
                 continue;
             }
             $hook_objects[$hook] = $object;
         }
     }
     if (!is_guest()) {
         require_code('ocf_members2');
         $poster_details = ocf_show_member_box(get_member(), false, $hooks, $hook_objects, false);
     } else {
         $custom_fields = new ocp_tempcode();
         $poster_details = new ocp_tempcode();
     }
     if (addon_installed('ocf_forum')) {
         if (!is_guest()) {
             $poster = do_template('OCF_POSTER_MEMBER', array('ONLINE' => true, 'ID' => strval(get_member()), 'POSTER_DETAILS' => $poster_details, 'PROFILE_URL' => $GLOBALS['FORUM_DRIVER']->member_profile_url(get_member(), false, true), 'POSTER_USERNAME' => $poster_name));
         } else {
             $poster = do_template('OCF_POSTER_GUEST', array('IP_LINK' => '', 'POSTER_DETAILS' => $poster_details, 'POSTER_USERNAME' => $poster_name));
         }
     } else {
         $poster = make_string_tempcode(escape_html($poster_name));
         // Should never happen actually, as applies discounts hook from even running
     }
     $highlight = false;
     $datetime_raw = time();
     $datetime = get_timezoned_date(time());
     $poster_url = $GLOBALS['FORUM_DRIVER']->member_profile_url(get_member());
     $title = post_param('title', '');
     $tpl = do_template('POST', array('INDIVIDUAL_REVIEW_RATINGS' => $individual_review_ratings, 'HIGHLIGHT' => $highlight, 'TITLE' => $title, 'TIME_RAW' => strval($datetime_raw), 'TIME' => $datetime, 'POSTER_URL' => $poster_url, 'POSTER_NAME' => $poster_name, 'POST' => $post, 'POSTER_ID' => strval(get_member()), 'POSTER' => $poster, 'POSTER_DETAILS' => $poster_details, 'ID' => '', 'CHILDREN' => '', 'RATING' => '', 'EMPHASIS' => '', 'BUTTONS' => '', 'TOPIC_ID' => '', 'UNVALIDATED' => '', 'IS_SPACER_POST' => false, 'NUM_TO_SHOW_LIMIT' => '0'));
     return array($tpl, NULL);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:57,代码来源:comments.php


示例18: applies

 /**
  * Find whether this preview hook applies.
  *
  * @return array			Quartet: Whether it applies, the attachment ID type, whether the forum DB is used [optional], list of fields to limit to [optional]
  */
 function applies()
 {
     require_lang('ocf');
     $member_id = get_param_integer('id', get_member());
     $applies = get_param('page', '') == 'members' && post_param('signature', NULL) !== NULL;
     if ($applies) {
         require_code('ocf_groups');
         $max_sig_length = ocf_get_member_best_group_property($member_id, 'max_sig_length_comcode');
         if (strlen(post_param('post', '')) > $max_sig_length) {
             warn_exit(do_lang_tempcode('SIGNATURE_TOO_BIG'));
         }
     }
     return array($applies, 'ocf_signature', true, array('post'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:19,代码来源:ocf_signature.php


示例19: set_from_referrer_field

function set_from_referrer_field()
{
    require_lang('referrals');
    $referrer = post_param('referrer', '');
    if ($referrer == '') {
        return;
    }
    // NB: This doesn't mean failure, it may already have been set by the recommend module when the recommendation was *made*
    $referrer_member = $GLOBALS['FORUM_DB']->query_value_null_ok_full('SELECT id FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_members WHERE ' . db_string_equal_to('m_username', $referrer) . ' OR ' . db_string_equal_to('m_email_address', $referrer));
    if (!is_null($referrer_member)) {
        $GLOBALS['FORUM_DB']->query_delete('f_invites', array('i_email_address' => post_param('email_address')), '', 1);
        // Delete old invites for this email address
        $GLOBALS['FORUM_DB']->query_insert('f_invites', array('i_inviter' => $referrer_member, 'i_email_address' => post_param('email_address'), 'i_time' => time(), 'i_taken' => 0));
    }
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:15,代码来源:ocf_join.php


示例20: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     require_lang('messaging');
     require_code('feedback');
     $to = array_key_exists('param', $map) ? $map['param'] : get_option('staff_address');
     $post = post_param('post', '');
     if (post_param_integer('_comment_form_post', 0) == 1 && $post != '') {
         if (addon_installed('captcha')) {
             if (get_option('captcha_on_feedback') == '1') {
                 require_code('captcha');
                 enforce_captcha();
             }
         }
         $message = new ocp_tempcode();
         /*Used to be written out here*/
         attach_message(do_lang_tempcode('MESSAGE_SENT'), 'inform');
         require_code('mail');
         $email_from = trim(post_param('email', $GLOBALS['FORUM_DRIVER']->get_member_email_address(get_member())));
         mail_wrap(post_param('title'), $post, array($to), NULL, $email_from, $GLOBALS['FORUM_DRIVER']->get_username(get_member()), 3, NULL, false, get_member());
         if ($email_from != '') {
             mail_wrap(do_lang('YOUR_MESSAGE_WAS_SENT_SUBJECT', post_param('title')), do_lang('YOUR_MESSAGE_WAS_SENT_BODY', $post), array($email_from), NULL, '', '', 3, NULL, false, get_member());
         }
     } else {
         $message = new ocp_tempcode();
     }
     $box_title = array_key_exists('title', $map) ? $map['title'] : do_lang('CONTACT_US');
     $private = array_key_exists('private', $map) && $map['private'] == '1';
     $em = $GLOBALS['FORUM_DRIVER']->get_emoticon_chooser();
     require_javascript('javascript_editing');
     $comcode_help = build_url(array('page' => 'userguide_comcode'), get_comcode_zone('userguide_comcode', false));
     require_javascript('javascript_validation');
     $comment_url = get_self_url();
     $email_optional = array_key_exists('email_optional', $map) ? intval($map['email_optional']) == 1 : true;
     if (addon_installed('captcha')) {
         require_code('captcha');
         $use_captcha = get_option('captcha_on_feedback') == '1' && use_captcha();
         if ($use_captcha) {
             generate_captcha();
         }
     } else {
         $use_captcha = false;
     }
     $comment_details = do_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => '', 'FIRST_POST_URL' => '', 'FIRST_POST' => '', 'USE_CAPTCHA' => $use_captcha, 'EMAIL_OPTIONAL' => $email_optional, 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'GET_EMAIL' => !$private, 'GET_TITLE' => !$private, 'EM' => $em, 'DISPLAY' => 'block', 'TITLE' => $box_title, 'COMMENT_URL' => $comment_url));
     $out = do_template('BLOCK_MAIN_CONTACT_SIMPLE', array('_GUID' => '298a357f442f440c6b42e58d6717e57c', 'EMAIL_OPTIONAL' => true, 'COMMENT_DETAILS' => $comment_details, 'MESSAGE' => $message));
     return $out;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:52,代码来源:main_contact_simple.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP post_param_integer函数代码示例发布时间:2022-05-15
下一篇:
PHP post_int函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap