本文整理汇总了PHP中gpc_get_int函数的典型用法代码示例。如果您正苦于以下问题:PHP gpc_get_int函数的具体用法?PHP gpc_get_int怎么用?PHP gpc_get_int使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gpc_get_int函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateButton
/**
* Updates a button in the plugin configuration
*
* @param $config
*/
public function updateButton($config)
{
$button = gpc_get_int($config);
if (plugin_config_get($config) != $button) {
plugin_config_set($config, $button);
}
}
示例2: xmlhttprequest_user_combobox
/**
* Print a generic combobox with a list of users above a given access level.
*/
function xmlhttprequest_user_combobox()
{
$f_user_id = gpc_get_int('user_id');
$f_user_access = gpc_get_int('access_level');
echo '<select name="user_id">';
print_user_option_list($f_user_id, ALL_PROJECTS, $f_user_access);
echo '</select>';
}
示例3: set_capability_enum
function set_capability_enum($p_threshold, $p_all_projects_only = false)
{
global $t_access, $t_project;
if ($t_access >= config_get_access($p_threshold) && (ALL_PROJECTS == $t_project || !$p_all_projects_only)) {
$f_flag = gpc_get('flag_' . $p_threshold);
$f_access = gpc_get_int('access_' . $p_threshold);
# @@debug @@ echo "<br />for $p_threshold "; var_dump($f_flag, $f_access); echo '<br />';
if ($f_flag != config_get($p_threshold)) {
config_set($p_threshold, $f_flag, NO_USER, $t_project, $f_access);
}
}
}
示例4: uploadFileBugDetails
/**
* Affichage du code dans la page de visualisation d'un bug
* Placement dans le DOM via jquery
*/
function uploadFileBugDetails()
{
#Déplacement du code d'upload dans le DOM
echo '<script type="text/javascript">
jQuery(document).ready(function($){
$("#upload_form_open").after($("#upload_form_multi").html());
});
</script>';
#Code qui va servir à l'upload ( Iframe avec une page html5 )
echo '<div id="upload_form_multi" style="display:none">
<div id="multiple_upload_area" style="margin-top:20px;">
<iframe src="plugins/UploadFile/pages/upload_iframe.php?bug_id=' . gpc_get_int('id', -1) . '" id="uploadPage" width="100%" scrolling="no" height="200px;" frameborder="0"></iframe>
</div>
</div>';
}
示例5: add_columns
function add_columns()
{
$t_project_id = helper_get_current_project();
$t_user_id = auth_get_current_user_id();
$t_user_has_level = user_get_access_level($t_user_id, $t_project_id) >= plugin_config_get('RelationshipColumnAccessLevel', PLUGINS_RELATIONSHIPCOLUMNVIEW_THRESHOLD_LEVEL_DEFAULT);
$t_result = array();
if (plugin_config_get('ShowRelationshipColumn') == gpc_get_int('ShowRelationshipColumn', ON) && $t_user_has_level) {
if ('1.2.' == substr(MANTIS_VERSION, 0, 4)) {
require_once 'classes' . DIRECTORY_SEPARATOR . 'RelationshipColumn.class.1.2.0.php';
} else {
require_once 'classes' . DIRECTORY_SEPARATOR . 'RelationshipColumn.class.1.3.0.php';
}
$t_result[] = 'RelationshipColumn';
}
return $t_result;
}
示例6: worklogmenu
function worklogmenu()
{
if (ON == plugin_config_get('promote_text')) {
$bugid = gpc_get_int('id');
if (access_has_bug_level(plugin_config_get('promote_threshold'), $bugid)) {
$t_bug_p = bug_get($bugid, true);
if (OFF == plugin_config_get('project_text')) {
$proj_id = 0;
} else {
$proj_id = $t_bug_p->project_id;
}
$subject = urlencode($t_bug_p->description);
$subject .= " ";
$subject .= urlencode($t_bug_p->additional_information);
$content = category_full_name($t_bug_p->category_id);
$content .= " -> ";
$content .= urlencode($t_bug_p->summary);
if (ON == plugin_config_get('worklog_view_check')) {
$import_page = 'worklog_add_page2.php';
} else {
$import_page = 'worklog_add.php';
}
$import_page .= '&log_type=0&';
$import_page .= '&ref_log_ids=';
$import_page .= '&ref_issue_ids=';
$import_page .= '&log_begin=';
$import_page .= '&log_end=';
$import_page .= '&content=';
$import_page .= $content;
$import_page .= '&subject=';
$import_page .= $subject;
$import_page .= '&project_id=';
$import_page .= $proj_id;
if (ON == plugin_config_get('worklog_view_check')) {
return array(plugin_lang_get('import_worklog') => plugin_page($import_page) . '" target=_new>');
} else {
return array(plugin_lang_get('import_worklog') => plugin_page($import_page));
}
}
}
}
示例7: print_document_selection
/**
* @param $types
*/
function print_document_selection($types)
{
$project_id = gpc_get_int('project_id', helper_get_current_project());
$specmanagement_database_api = new specmanagement_database_api();
echo '<select name="version_id">';
foreach ($types as $type) {
$type_string = string_html_specialchars($type);
$type_id = $specmanagement_database_api->get_type_id($type);
$version_id_array = get_version_ids($type_id, $project_id);
foreach ($version_id_array as $version_id) {
$version_spec_project_id = version_get_field($version_id, 'project_id');
if (project_includes_user($version_spec_project_id, auth_get_current_user_id()) || user_is_administrator(auth_get_current_user_id())) {
$version_string = version_full_name($version_id);
echo '<option value="' . $version_id . '">';
echo $type_string . " - " . $version_string;
echo '</option>';
}
}
}
echo '</select>';
}
示例8: faqmenu
function faqmenu()
{
if (ON == plugin_config_get('promote_text')) {
$bugid = gpc_get_int('id');
if (access_has_bug_level(plugin_config_get('promote_threshold'), $bugid)) {
$t_bug_p = bug_get($bugid, true);
if (OFF == plugin_config_get('project_text')) {
$proj_id = 0;
} else {
$proj_id = $t_bug_p->project_id;
}
$answer = urlencode($t_bug_p->description);
$answer .= " ";
$answer .= urlencode($t_bug_p->additional_information);
$question = category_full_name($t_bug_p->category_id);
$question .= " -> ";
$question .= urlencode($t_bug_p->summary);
if (ON == plugin_config_get('faq_view_check')) {
$import_page = 'faq_add_page2.php';
} else {
$import_page = 'faq_add.php';
}
$import_page .= '&question=';
$import_page .= $question;
$import_page .= '&answere=';
$import_page .= $answer;
$import_page .= '&project_id=';
$import_page .= $proj_id;
if (ON == plugin_config_get('faq_view_check')) {
return array(plugin_lang_get('import_faq') => plugin_page($import_page) . '" target=_new>');
} else {
return array(plugin_lang_get('import_faq') => plugin_page($import_page));
}
}
}
}
示例9: helper_get_current_project
$f_highlight_changed = $t_filter_cookie_arr[FILTER_PROPERTY_HIGHLIGHT_CHANGED];
$f_sort = $t_filter_cookie_arr[FILTER_PROPERTY_SORT_FIELD_NAME];
$f_dir = $t_filter_cookie_arr[FILTER_PROPERTY_SORT_DIRECTION];
$t_project_id = helper_get_current_project();
}
# This replaces the actual search that used to be here
$f_page_number = gpc_get_int('page_number', 1);
$t_per_page = -1;
$t_bug_count = null;
$t_page_count = null;
$result = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count);
$row_count = count($result);
# pre-cache custom column data
columns_plugin_cache_issue_data($result);
# for export
$t_show_flag = gpc_get_int('show_flag', 0);
html_page_top1();
html_head_end();
html_body_begin();
?>
<table class="width100"><tr><td class="form-title">
<div class="center">
<?php
echo string_display(config_get('window_title')) . ' - ' . string_display(project_get_name($t_project_id));
?>
</div>
</td></tr></table>
<br />
示例10: error_parameters
if ($f_action != 'make_default' && $f_profile_id == 0) {
error_parameters(lang_get('select_profile'));
trigger_error(ERROR_EMPTY_FIELD, ERROR);
}
}
switch ($f_action) {
case 'edit':
form_security_purge('profile_update');
print_header_redirect('account_prof_edit_page.php?profile_id=' . $f_profile_id);
break;
case 'add':
$f_platform = gpc_get_string('platform');
$f_os = gpc_get_string('os');
$f_os_build = gpc_get_string('os_build');
$f_description = gpc_get_string('description');
$t_user_id = gpc_get_int('user_id');
if (ALL_USERS != $t_user_id) {
$t_user_id = auth_get_current_user_id();
}
if (ALL_USERS == $t_user_id) {
access_ensure_global_level(config_get('manage_global_profile_threshold'));
} else {
access_ensure_global_level(config_get('add_profile_threshold'));
}
profile_create($t_user_id, $f_platform, $f_os, $f_os_build, $f_description);
form_security_purge('profile_update');
if (ALL_USERS == $t_user_id) {
print_header_redirect('manage_prof_menu_page.php');
} else {
print_header_redirect('account_prof_menu_page.php');
}
示例11: access_ensure_project_level
# You should have received a copy of the GNU General Public License
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
/**
* @package MantisBT
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2013 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
/**
* MantisBT Core API's
*/
require_once 'core.php';
require_once 'Period.php';
require_once 'graph_api.php';
access_ensure_project_level(config_get('view_summary_threshold'));
$f_width = gpc_get_int('width', 600);
$t_ar = plugin_config_get('bar_aspect');
$t_interval = new Period();
$t_interval->set_period_from_selector('interval');
$f_show_as_table = gpc_get_bool('show_table', FALSE);
$f_summary = gpc_get_bool('summary', FALSE);
$t_interval_days = $t_interval->get_elapsed_days();
if ($t_interval_days <= 14) {
$t_incr = 60 * 60;
// less than 14 days, use hourly
} else {
if ($t_interval_days <= 92) {
$t_incr = 24 * 60 * 60;
// less than three months, use daily
} else {
$t_incr = 7 * 24 * 60 * 60;
示例12: gpc_get_string
$f_os = gpc_get_string('os', '');
$f_os_build = gpc_get_string('os_build', '');
$f_product_version = gpc_get_string('product_version', '');
$f_target_version = gpc_get_string('target_version', '');
$f_profile_id = gpc_get_int('profile_id', 0);
$f_handler_id = gpc_get_int('handler_id', 0);
$f_category_id = gpc_get_int('category_id', 0);
$f_reproducibility = gpc_get_int('reproducibility', (int) config_get('default_bug_reproducibility'));
$f_eta = gpc_get_int('eta', (int) config_get('default_bug_eta'));
$f_severity = gpc_get_int('severity', (int) config_get('default_bug_severity'));
$f_priority = gpc_get_int('priority', (int) config_get('default_bug_priority'));
$f_summary = gpc_get_string('summary', '');
$f_description = gpc_get_string('description', '');
$f_steps_to_reproduce = gpc_get_string('steps_to_reproduce', config_get('default_bug_steps_to_reproduce'));
$f_additional_info = gpc_get_string('additional_info', config_get('default_bug_additional_info'));
$f_view_state = gpc_get_int('view_state', (int) config_get('default_bug_view_status'));
$f_due_date = gpc_get_string('due_date', '');
if ($f_due_date == '') {
$f_due_date = date_get_null();
}
$t_changed_project = false;
}
$f_report_stay = gpc_get_bool('report_stay', false);
$f_copy_notes_from_parent = gpc_get_bool('copy_notes_from_parent', false);
$f_copy_attachments_from_parent = gpc_get_bool('copy_attachments_from_parent', false);
$t_fields = config_get('bug_report_page_fields');
$t_fields = columns_filter_disabled($t_fields);
$t_show_category = in_array('category_id', $t_fields);
$t_show_reproducibility = in_array('reproducibility', $t_fields);
$t_show_eta = in_array('eta', $t_fields);
$t_show_severity = in_array('severity', $t_fields);
示例13: require_api
* @uses html_api.php
* @uses lang_api.php
* @uses news_api.php
* @uses print_api.php
*/
require_once 'core.php';
require_api('access_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('gpc_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('news_api.php');
require_api('print_api.php');
news_ensure_enabled();
$f_news_id = gpc_get_int('news_id', null);
html_page_top();
?>
<?php
if ($f_news_id !== null) {
$t_project_id = news_get_field($f_news_id, 'project_id');
if (news_is_private($f_news_id)) {
access_ensure_project_level(config_get('private_news_threshold'), $t_project_id);
} else {
access_ensure_project_level(VIEWER, $t_project_id);
}
print_news_string_by_news_id($f_news_id);
}
?>
示例14: require_api
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
form_security_validate('manage_custom_field_update');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_custom_fields_threshold'));
$f_field_id = gpc_get_int('field_id');
$f_return = strip_tags(gpc_get_string('return', 'manage_custom_field_page.php'));
$t_values['name'] = gpc_get_string('name');
$t_values['type'] = gpc_get_int('type');
$t_values['possible_values'] = gpc_get_string('possible_values');
$t_values['default_value'] = gpc_get_string('default_value');
$t_values['valid_regexp'] = gpc_get_string('valid_regexp');
$t_values['access_level_r'] = gpc_get_int('access_level_r');
$t_values['access_level_rw'] = gpc_get_int('access_level_rw');
$t_values['length_min'] = gpc_get_int('length_min');
$t_values['length_max'] = gpc_get_int('length_max');
$t_values['display_report'] = gpc_get_bool('display_report');
$t_values['display_update'] = gpc_get_bool('display_update');
$t_values['display_resolved'] = gpc_get_bool('display_resolved');
$t_values['display_closed'] = gpc_get_bool('display_closed');
$t_values['require_report'] = gpc_get_bool('require_report');
$t_values['require_update'] = gpc_get_bool('require_update');
$t_values['require_resolved'] = gpc_get_bool('require_resolved');
$t_values['require_closed'] = gpc_get_bool('require_closed');
$t_values['filter_by'] = gpc_get_bool('filter_by');
custom_field_update($f_field_id, $t_values);
form_security_purge('manage_custom_field_update');
html_page_top(null, $f_return);
html_operation_successful($f_return);
html_page_bottom();
示例15: form_security_validate
/**
* @package MantisBT
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2012 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
/**
* MantisBT Core API's
*/
require_once 'core.php';
require_once 'email_api.php';
form_security_validate('signup');
$f_username = strip_tags(gpc_get_string('username'));
$f_email = strip_tags(gpc_get_string('email'));
$f_captcha = gpc_get_string('captcha', '');
$f_public_key = gpc_get_int('public_key', '');
$f_username = trim($f_username);
$f_email = email_append_domain(trim($f_email));
$f_captcha = utf8_strtolower(trim($f_captcha));
# force logout on the current user if already authenticated
if (auth_is_user_authenticated()) {
auth_logout();
}
# Check to see if signup is allowed
if (OFF == config_get_global('allow_signup')) {
print_header_redirect('login_page.php');
exit;
}
if (ON == config_get('signup_use_captcha') && get_gd_version() > 0 && helper_call_custom_function('auth_can_change_password', array())) {
# captcha image requires GD library and related option to ON
$t_key = utf8_strtolower(utf8_substr(md5(config_get('password_confirm_hash_magic_string') . $f_public_key), 1, 5));