本文整理汇总了PHP中gpc_get_int_array函数的典型用法代码示例。如果您正苦于以下问题:PHP gpc_get_int_array函数的具体用法?PHP gpc_get_int_array怎么用?PHP gpc_get_int_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gpc_get_int_array函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_capability_row
function set_capability_row( $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_threshold = gpc_get_int_array( 'flag_thres_' . $p_threshold, array() );
$f_access = gpc_get_int( 'access_' . $p_threshold );
# @@debug @@ echo "<br />for $p_threshold "; var_dump($f_threshold, $f_access); echo '<br />';
$t_access_levels = MantisEnum::getAssocArrayIndexedByValues( config_get( 'access_levels_enum_string' ) );
ksort( $t_access_levels );
reset( $t_access_levels );
$t_lower_threshold = NOBODY;
$t_array_threshold = array();
foreach( $t_access_levels as $t_access_level => $t_level_name ) {
if ( in_array( $t_access_level, $f_threshold ) ) {
if ( NOBODY == $t_lower_threshold ) {
$t_lower_threshold = $t_access_level;
}
$t_array_threshold[] = $t_access_level;
} else {
if ( NOBODY <> $t_lower_threshold ) {
$t_lower_threshold = -1;
}
}
# @@debug @@ var_dump($$t_access_level, $t_lower_threshold, $t_array_threshold); echo '<br />';
}
$t_existing_threshold = config_get( $p_threshold );
$t_existing_access = config_get_access( $p_threshold );
if ( -1 == $t_lower_threshold ) {
if ( ( $t_existing_threshold != $t_array_threshold )
|| ( $t_existing_access != $f_access ) ) {
config_set( $p_threshold, $t_array_threshold, NO_USER, $t_project, $f_access );
}
} else {
if ( ( $t_existing_threshold != $t_lower_threshold )
|| ( $t_existing_access != $f_access ) ) {
config_set( $p_threshold, $t_lower_threshold, NO_USER, $t_project, $f_access );
}
}
}
}
示例2: gpc_get_int_array
" />
<input type="hidden" name="<?php
echo FILTER_PROPERTY_SORT_DIRECTION;
?>
" value="<?php
echo $f_dir;
?>
" />
<table class="width100" cellpadding="2px">
<?php
#<SQLI> Excel & Print export
#$f_bug_array stores the number of the selected rows
#$t_bug_arr_sort is used for displaying
#$f_export is a string for the word and excel pages
$f_bug_arr = gpc_get_int_array('bug_arr', array());
$f_bug_arr[$row_count] = -1;
for ($i = 0; $i < $row_count; $i++) {
if (isset($f_bug_arr[$i])) {
$index = $f_bug_arr[$i];
$t_bug_arr_sort[$index] = 1;
}
}
$f_export = implode(',', $f_bug_arr);
$t_icon_path = config_get('icon_path');
?>
<tr>
<td colspan="<?php
echo $t_num_of_columns;
?>
示例3: filter_ensure_valid_filter
//.........这里部分代码省略.........
if (!isset($p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_BUG])) {
$p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_BUG] = gpc_get_int(FILTER_PROPERTY_RELATIONSHIP_BUG, 0);
}
if (!isset($p_filter_arr[FILTER_PROPERTY_TARGET_VERSION])) {
$p_filter_arr[FILTER_PROPERTY_TARGET_VERSION] = (string) META_FILTER_ANY;
}
if (!isset($p_filter_arr[FILTER_PROPERTY_TAG_STRING])) {
$p_filter_arr[FILTER_PROPERTY_TAG_STRING] = gpc_get_string(FILTER_PROPERTY_TAG_STRING, '');
}
if (!isset($p_filter_arr[FILTER_PROPERTY_TAG_SELECT])) {
$p_filter_arr[FILTER_PROPERTY_TAG_SELECT] = gpc_get_string(FILTER_PROPERTY_TAG_SELECT, '');
}
if (!isset($p_filter_arr[FILTER_PROPERTY_MATCH_TYPE])) {
$p_filter_arr[FILTER_PROPERTY_MATCH_TYPE] = gpc_get_int(FILTER_PROPERTY_MATCH_TYPE, FILTER_MATCH_ALL);
}
# initialize plugin filters
$t_plugin_filters = filter_get_plugin_filters();
foreach ($t_plugin_filters as $t_field_name => $t_filter_object) {
if (!isset($p_filter_arr[$t_field_name])) {
switch ($t_filter_object->type) {
case FILTER_TYPE_STRING:
$p_filter_arr[$t_field_name] = gpc_get_string($t_field_name, $t_filter_object->default);
break;
case FILTER_TYPE_INT:
$p_filter_arr[$t_field_name] = gpc_get_int($t_field_name, (int) $t_filter_object->default);
break;
case FILTER_TYPE_BOOLEAN:
$p_filter_arr[$t_field_name] = gpc_get_bool($t_field_name, (bool) $t_filter_object->default);
break;
case FILTER_TYPE_MULTI_STRING:
$p_filter_arr[$t_field_name] = gpc_get_string_array($t_field_name, array(0 => (string) META_FILTER_ANY));
break;
case FILTER_TYPE_MULTI_INT:
$p_filter_arr[$t_field_name] = gpc_get_int_array($t_field_name, array(0 => META_FILTER_ANY));
break;
default:
$p_filter_arr[$t_field_name] = (string) META_FILTER_ANY;
}
}
if (!$t_filter_object->validate($p_filter_arr[$t_field_name])) {
$p_filter_arr[$t_field_name] = $t_filter_object->default;
}
}
$t_custom_fields = custom_field_get_ids();
# @@@ (thraxisp) This should really be the linked ids, but we don't know the project
$f_custom_fields_data = array();
if (is_array($t_custom_fields) && count($t_custom_fields) > 0) {
foreach ($t_custom_fields as $t_cfid) {
if (is_array(gpc_get('custom_field_' . $t_cfid, null))) {
$f_custom_fields_data[$t_cfid] = gpc_get_string_array('custom_field_' . $t_cfid, array(META_FILTER_ANY));
} else {
$f_custom_fields_data[$t_cfid] = gpc_get_string('custom_field_' . $t_cfid, (string) META_FILTER_ANY);
$f_custom_fields_data[$t_cfid] = array($f_custom_fields_data[$t_cfid]);
}
}
}
# validate sorting
$t_fields = helper_get_columns_to_view();
$t_n_fields = count($t_fields);
for ($i = 0; $i < $t_n_fields; $i++) {
if (isset($t_fields[$i]) && in_array($t_fields[$i], array('selection', 'edit', 'bugnotes_count', 'attachment_count'))) {
unset($t_fields[$i]);
}
}
# Make sure array is no longer than 2 elements
$t_sort_fields = explode(',', $p_filter_arr['sort']);
示例4: require_api
* @uses gpc_api.php
* @uses print_api.php
* @uses project_api.php
*/
/**
* MantisBT Core API's
*/
require_once 'core.php';
require_api('access_api.php');
require_api('authentication_api.php');
require_api('config_api.php');
require_api('form_api.php');
require_api('gpc_api.php');
require_api('print_api.php');
require_api('project_api.php');
form_security_validate('manage_proj_user_add');
auth_reauthenticate();
$f_project_id = gpc_get_int('project_id');
$f_user_id = gpc_get_int_array('user_id', array());
$f_access_level = gpc_get_int('access_level');
# We should check both since we are in the project section and an
# admin might raise the first threshold and not realize they need
# to raise the second
access_ensure_project_level(config_get('manage_project_threshold'), $f_project_id);
access_ensure_project_level(config_get('project_user_threshold'), $f_project_id);
# Add user(s) to the current project
foreach ($f_user_id as $t_user_id) {
project_add_user($f_project_id, $t_user_id, $f_access_level);
}
form_security_purge('manage_proj_user_add');
print_header_redirect('manage_proj_edit_page.php?project_id=' . $f_project_id);
示例5: form_security_validate
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# Mantis is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mantis. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------
# $Id: manage_custom_field_proj_add.php,v 1.2.2.1 2007-10-13 22:33:29 giallu Exp $
# --------------------------------------------------------
require_once 'core.php';
form_security_validate('manage_custom_field_proj_add');
auth_reauthenticate();
$f_field_id = gpc_get_int('field_id');
$f_project_id = gpc_get_int_array('project_id', array());
$f_sequence = gpc_get_int('sequence');
$t_manage_project_threshold = config_get('manage_project_threshold');
foreach ($f_project_id as $t_proj_id) {
if (access_has_project_level($t_manage_project_threshold, $t_proj_id)) {
if (!custom_field_is_linked($f_field_id, $t_proj_id)) {
custom_field_link($f_field_id, $t_proj_id);
}
custom_field_set_sequence($f_field_id, $t_proj_id, $f_sequence);
}
}
form_security_purge('manage_custom_field_proj_add');
print_header_redirect('manage_custom_field_edit_page.php?field_id=' . $f_field_id);
示例6: require_api
require_api( 'config_api.php' );
require_api( 'constant_inc.php' );
require_api( 'email_api.php' );
require_api( 'error_api.php' );
require_api( 'form_api.php' );
require_api( 'gpc_api.php' );
require_api( 'helper_api.php' );
require_api( 'html_api.php' );
require_api( 'lang_api.php' );
require_api( 'print_api.php' );
require_api( 'string_api.php' );
form_security_validate( 'bug_reminder' );
$f_bug_id = gpc_get_int( 'bug_id' );
$f_to = gpc_get_int_array( 'to' );
$f_body = gpc_get_string( 'body' );
$t_bug = bug_get( $f_bug_id, true );
if( $t_bug->project_id != helper_get_current_project() ) {
# in case the current project is not the same project of the bug we are viewing...
# ... override the current project. This to avoid problems with categories and handlers lists etc.
$g_project_override = $t_bug->project_id;
}
if ( bug_is_readonly( $f_bug_id ) ) {
error_parameters( $f_bug_id );
trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
}
access_ensure_bug_level( config_get( 'bug_reminder_threshold' ), $f_bug_id );
示例7: foreach
foreach ($t_plugin_filters as $t_field_name => $t_filter_object) {
switch ($t_filter_object->type) {
case FILTER_TYPE_STRING:
$f_filter_input[$t_field_name] = gpc_get_string($t_field_name, $t_filter_object->default);
break;
case FILTER_TYPE_INT:
$f_filter_input[$t_field_name] = gpc_get_int($t_field_name, $t_filter_object->default);
break;
case FILTER_TYPE_BOOLEAN:
$f_filter_input[$t_field_name] = gpc_get_bool($t_field_name, OFF);
break;
case FILTER_TYPE_MULTI_STRING:
$f_filter_input[$t_field_name] = gpc_get_string_array($t_field_name, $t_filter_object->default);
break;
case FILTER_TYPE_MULTI_INT:
$f_filter_input[$t_field_name] = gpc_get_int_array($t_field_name, $t_filter_object->default);
break;
}
}
# custom field updates
$t_custom_fields = custom_field_get_ids();
/** @todo (thraxisp) This should really be the linked ids, but we don't know the project */
$f_custom_fields_data = array();
if (is_array($t_custom_fields) && count($t_custom_fields) > 0) {
foreach ($t_custom_fields as $t_cfid) {
if (custom_field_type($t_cfid) == CUSTOM_FIELD_TYPE_DATE) {
$t_control = gpc_get_string('custom_field_' . $t_cfid . '_control', null);
$t_year = gpc_get_int('custom_field_' . $t_cfid . '_start_year', null);
$t_month = gpc_get_int('custom_field_' . $t_cfid . '_start_month', null);
$t_day = gpc_get_int('custom_field_' . $t_cfid . '_start_day', null);
$t_start_date = mktime(0, 0, 0, $t_month, $t_day, $t_year);
示例8: set_error_handler
set_error_handler('json_error_handler');
access_ensure_global_level(plugin_config_get('manage_customers_threshold'));
form_security_validate('manage_customers');
$contents = '';
switch ($_POST['action']) {
case 'deleteGroup':
CustomerManagementDao::deleteGroup(gpc_get_int('customerGroupId'));
break;
case 'deleteService':
CustomerManagementDao::deleteService(gpc_get_int('serviceId'));
break;
case 'deleteCustomer':
CustomerManagementDao::deleteCustomer(gpc_get_int('customerId'));
break;
case 'saveGroup':
CustomerManagementDao::saveGroup(gpc_get_int('id', null), gpc_get_string('name'));
break;
case 'saveService':
CustomerManagementDao::saveService(gpc_get_int('id', null), gpc_get_string('name'));
break;
case 'saveCustomer':
CustomerManagementDao::saveCustomer(gpc_get_int('id', null), gpc_get_string('name'), gpc_get_int('customer_group_id'), gpc_get_string('email'), gpc_get_int_array('service_id', array()));
break;
case 'sendNotification':
CustomerNotifier::notifyCustomers(gpc_get_int_array('customer_id'), gpc_get_string('from'), gpc_get_string('to'));
break;
case 'previewNotification':
$contents = CustomerNotifier::buildNotificationEmails(gpc_get_int_array('customer_id'), gpc_get_string('from'), gpc_get_string('to'));
break;
}
echo json_output_response($contents);
示例9: gpc_get_int
$f_reminder_days_treshold = gpc_get_int('reminder_days_treshold', 2);
$f_reminder_store_as_note = gpc_get_int('reminder_store_as_note', OFF);
$f_reminder_sender = gpc_get_string('reminder_sender', 'admin@xample.com');
$f_reminder_bug_status = gpc_get_int_array('reminder_bug_status', ASSIGNED);
$f_reminder_ignore_unset = gpc_get_int('reminder_ignore_unset', ON);
$f_reminder_ignore_past = gpc_get_int('reminder_ignore_past', ON);
$f_reminder_mail_subject = gpc_get_string('reminder_mail_subject', 'Following issue will be Due shortly');
$f_reminder_handler = gpc_get_int('reminder_handler', ON);
$f_reminder_group_issues = gpc_get_int('reminder_group_issues', ON);
$f_reminder_group_project = gpc_get_int('reminder_group_project', ON);
$f_reminder_manager_overview = gpc_get_int('reminder_manager_overview', ON);
$f_reminder_group_subject = gpc_get_string('reminder_group_subject', 'Following issue will be Due shortly');
$f_reminder_group_body1 = gpc_get_string('reminder_group_body1', 'Please review the following issues');
$f_reminder_group_body2 = gpc_get_string('reminder_group_body2', 'Please do not reply to this message');
$f_reminder_feedback_project = gpc_get_int('reminder_feedback_project', 0);
$f_reminder_feedback_status = gpc_get_int_array('reminder_feedback_status', FEEDBACK);
$f_reminder_login = gpc_get_string('reminder_login', 'admin');
$f_reminder_subject = gpc_get_string('reminder_subject', 'Issues requiring your attention');
$f_reminder_finished = gpc_get_string('reminder_finished', 'Finished processing your selection');
$f_reminder_hours = gpc_get_int('reminder_hours', OFF);
$f_reminder_colsep = gpc_get_string('reminder_colsep', ';');
plugin_config_set('reminder_project_id', $f_reminder_project_id);
plugin_config_set('reminder_days_treshold', $f_reminder_days_treshold);
plugin_config_set('reminder_store_as_note', $f_reminder_store_as_note);
plugin_config_set('reminder_sender', $f_reminder_sender);
plugin_config_set('reminder_bug_status', $f_reminder_bug_status);
plugin_config_set('reminder_ignore_unset', $f_reminder_ignore_unset);
plugin_config_set('reminder_ignore_past', $f_reminder_ignore_past);
plugin_config_set('reminder_mail_subject', $f_reminder_mail_subject);
plugin_config_set('reminder_handler', $f_reminder_handler);
plugin_config_set('reminder_group_issues', $f_reminder_group_issues);
示例10: gpc_get_string_array
if (is_array(gpc_get('reporter_id', null))) {
$f_reporter_id = gpc_get_string_array('reporter_id', META_FILTER_ANY);
} else {
$f_reporter_id = gpc_get_string('reporter_id', META_FILTER_ANY);
$f_reporter_id = array($f_reporter_id);
}
$f_handler_id = array();
if (is_array(gpc_get('handler_id', null))) {
$f_handler_id = gpc_get_string_array('handler_id', META_FILTER_ANY);
} else {
$f_handler_id = gpc_get_string('handler_id', META_FILTER_ANY);
$f_handler_id = array($f_handler_id);
}
$f_project_id = array();
if (is_array(gpc_get('project_id', null))) {
$f_project_id = gpc_get_int_array('project_id', META_FILTER_CURRENT);
} else {
$f_project_id = gpc_get_int('project_id', META_FILTER_CURRENT);
$f_project_id = array($f_project_id);
}
$f_show_resolution = array();
if (is_array(gpc_get('show_resolution', null))) {
$f_show_resolution = gpc_get_string_array('show_resolution', META_FILTER_ANY);
} else {
$f_show_resolution = gpc_get_string('show_resolution', META_FILTER_ANY);
$f_show_resolution = array($f_show_resolution);
}
$f_show_build = array();
if (is_array(gpc_get('show_build', null))) {
$f_show_build = gpc_get_string_array('show_build', META_FILTER_ANY);
} else {
示例11: storyboard_config_api
require_once STORYBOARD_CORE_URI . 'storyboard_db_api.php';
$storyboard_config_api = new storyboard_config_api();
$storyboard_db_api = new storyboard_db_api();
$option_change = gpc_get_bool('change', false);
$option_addtype = gpc_get_bool('addtype', false);
$option_deltype = gpc_get_bool('deletetype', false);
$option_changetype = gpc_get_bool('changetype', false);
/**
* Submit configuration changes
*/
if ($option_change) {
$storyboard_config_api->updateValue('AccessLevel', ADMINISTRATOR);
$storyboard_config_api->updateButton('ShowInFooter');
if (!empty($_POST['status_cols'])) {
foreach ($_POST['status_cols'] as $status_cols) {
$status_cols = gpc_get_int_array('status_cols');
if (plugin_config_get('status_cols') != $status_cols) {
plugin_config_set('status_cols', $status_cols);
}
}
}
}
/**
* Add a type
*/
if ($option_addtype) {
if (isset($_POST['type'])) {
$storyboard_db_api->insert_type($_POST['type'], 'type');
}
}
/**
示例12: gpc_get_int_array
<?php
require_once( 'core.php' );
require_once( 'current_user_api.php' );
require_once( 'bug_api.php' );
event_signal('EVENT_PLUGIN_SVNGENERATELOG',array('bug_arr' => gpc_get_int_array('bug_arr')));
示例13: form_security_validate
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
form_security_validate('plugin_Dashboard_config_update');
$f_width = gpc_get_int('width', 4);
$f_reset_width = gpc_get_bool('reset-width', false);
if ($f_reset_width) {
plugin_config_delete('width');
} else {
plugin_config_set('width', $f_width);
}
$f_filter = gpc_get_int_array('filter', array());
$f_reset_boxes = gpc_get_bool('reset-boxes', false);
if ($f_reset_boxes) {
plugin_config_delete('boxes');
} else {
$f_boxes = array();
foreach ($f_filter as $t_filter_id => $t_filter_pos) {
if ($t_filter_pos != 0) {
$f_boxes[$t_filter_id] = $t_filter_pos;
}
}
plugin_config_set('boxes', $f_boxes);
}
form_security_purge('plugin_Dashboard_config_update');
print_successful_redirect(plugin_page('dashboard', true));
示例14: update_button
update_button('NUIHighlighting');
update_color('NUIHBGColor', '#FCBDBD');
update_button('ShowZIU');
update_button('ZIHighlighting');
update_color('ZIHBGColor', '#F8FFCC');
update_button('layer_one_name');
update_color('TAMHBGColor', '#FAD785');
$col_amount = gpc_get_int('CAmount', 3);
if (plugin_config_get('CAmount') != $col_amount && plugin_config_get('CAmount') != '' && $col_amount <= 20) {
plugin_config_set('CAmount', $col_amount);
} elseif (plugin_config_get('CAmount') == '') {
plugin_config_set('CAmount', 3);
}
if (!empty($_POST['URIThreshold'])) {
foreach ($_POST['URIThreshold'] as $unreach_issue_threshold) {
$unreach_issue_threshold = gpc_get_int_array('URIThreshold');
if (plugin_config_get('URIThreshold') != $unreach_issue_threshold) {
plugin_config_set('URIThreshold', $unreach_issue_threshold);
}
}
}
update_multiple_values('CStatSelect', 50);
update_multiple_values('IAMThreshold', 5);
update_multiple_values('IAGThreshold', 30);
update_multiple_values('CStatIgn', OFF);
}
form_security_purge('plugin_UserProjectView_config_update');
print_successful_redirect(plugin_page('config_page', true));
/**
* Adds the "#"-Tag if necessary
*