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 );
			}
		}
	}
}
" />
<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;
?>
Example #3
0
/**
 * Make sure that our filters are entirely correct and complete (it is possible that they are not).
 * We need to do this to cover cases where we don't have complete control over the filters given.
 * @param array $p_filter_arr A Filter definition.
 * @return array
 * @todo function needs to be abstracted
 */
function filter_ensure_valid_filter(array $p_filter_arr)
{
    # extend current filter to add information passed via POST
    if (!isset($p_filter_arr['_version'])) {
        $p_filter_arr['_version'] = FILTER_VERSION;
    }
    $t_cookie_vers = (int) substr($p_filter_arr['_version'], 1);
    if (substr(FILTER_VERSION, 1) > $t_cookie_vers) {
        # if the version is old, update it
        $p_filter_arr['_version'] = FILTER_VERSION;
    }
    if (!isset($p_filter_arr['_view_type'])) {
        $p_filter_arr['_view_type'] = gpc_get_string('view_type', 'simple');
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_ISSUES_PER_PAGE])) {
        $p_filter_arr[FILTER_PROPERTY_ISSUES_PER_PAGE] = gpc_get_int(FILTER_PROPERTY_ISSUES_PER_PAGE, config_get('default_limit_view'));
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_HIGHLIGHT_CHANGED])) {
        $p_filter_arr[FILTER_PROPERTY_HIGHLIGHT_CHANGED] = config_get('default_show_changed');
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_STICKY])) {
        $p_filter_arr[FILTER_PROPERTY_STICKY] = gpc_string_to_bool(config_get('show_sticky_issues'));
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_SORT_FIELD_NAME])) {
        $p_filter_arr[FILTER_PROPERTY_SORT_FIELD_NAME] = 'last_updated';
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_SORT_DIRECTION])) {
        $p_filter_arr[FILTER_PROPERTY_SORT_DIRECTION] = 'DESC';
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_PLATFORM])) {
        $p_filter_arr[FILTER_PROPERTY_PLATFORM] = array(0 => (string) META_FILTER_ANY);
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_OS])) {
        $p_filter_arr[FILTER_PROPERTY_OS] = array(0 => (string) META_FILTER_ANY);
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_OS_BUILD])) {
        $p_filter_arr[FILTER_PROPERTY_OS_BUILD] = array(0 => (string) META_FILTER_ANY);
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_PROJECT_ID])) {
        $p_filter_arr[FILTER_PROPERTY_PROJECT_ID] = array(0 => META_FILTER_CURRENT);
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_START_MONTH])) {
        $p_filter_arr[FILTER_PROPERTY_START_MONTH] = gpc_get_string(FILTER_PROPERTY_START_MONTH, date('m'));
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_START_DAY])) {
        $p_filter_arr[FILTER_PROPERTY_START_DAY] = gpc_get_string(FILTER_PROPERTY_START_DAY, 1);
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_START_YEAR])) {
        $p_filter_arr[FILTER_PROPERTY_START_YEAR] = gpc_get_string(FILTER_PROPERTY_START_YEAR, date('Y'));
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_END_MONTH])) {
        $p_filter_arr[FILTER_PROPERTY_END_MONTH] = gpc_get_string(FILTER_PROPERTY_END_MONTH, date('m'));
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_END_DAY])) {
        $p_filter_arr[FILTER_PROPERTY_END_DAY] = gpc_get_string(FILTER_PROPERTY_END_DAY, date('d'));
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_END_YEAR])) {
        $p_filter_arr[FILTER_PROPERTY_END_YEAR] = gpc_get_string(FILTER_PROPERTY_END_YEAR, date('Y'));
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_SEARCH])) {
        $p_filter_arr[FILTER_PROPERTY_SEARCH] = '';
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_FILTER_BY_DATE])) {
        $p_filter_arr[FILTER_PROPERTY_FILTER_BY_DATE] = gpc_get_bool(FILTER_PROPERTY_FILTER_BY_DATE, false);
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_VIEW_STATE])) {
        $p_filter_arr[FILTER_PROPERTY_VIEW_STATE] = gpc_get(FILTER_PROPERTY_VIEW_STATE, META_FILTER_ANY);
    } else {
        if (filter_field_is_any($p_filter_arr[FILTER_PROPERTY_VIEW_STATE])) {
            $p_filter_arr[FILTER_PROPERTY_VIEW_STATE] = META_FILTER_ANY;
        }
    }
    if (!isset($p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_TYPE])) {
        $p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_TYPE] = gpc_get_int(FILTER_PROPERTY_RELATIONSHIP_TYPE, -1);
    }
    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']);
    if (count($t_sort_fields) > 2) {
        $t_sort_fields = array_slice($t_sort_fields, 0, 2);
    }
    # Make sure array is no longer than 2 elements
    $t_dir_fields = explode(',', $p_filter_arr['dir']);
    if (count($t_dir_fields) > 2) {
        $t_dir_fields = array_slice($t_dir_fields, 0, 2);
    }
    # Validate the max of two segments for $t_sort_fields and $t_dir_fields
    for ($i = 0; $i < 2; $i++) {
        if (isset($t_sort_fields[$i])) {
            $t_drop = false;
            $t_sort = $t_sort_fields[$i];
            if (strpos($t_sort, 'custom_') === 0) {
                if (false === custom_field_get_id_from_name(utf8_substr($t_sort, utf8_strlen('custom_')))) {
                    $t_drop = true;
                }
            } else {
                if (!in_array($t_sort, $t_fields)) {
                    $t_drop = true;
                }
            }
            if (!in_array($t_dir_fields[$i], array('ASC', 'DESC'))) {
                $t_drop = true;
            }
            if ($t_drop) {
                unset($t_sort_fields[$i]);
                unset($t_dir_fields[$i]);
            }
        }
    }
    if (count($t_sort_fields) > 0) {
        $p_filter_arr['sort'] = implode(',', $t_sort_fields);
        $p_filter_arr['dir'] = implode(',', $t_dir_fields);
    } else {
        $p_filter_arr['sort'] = 'last_updated';
        $p_filter_arr['dir'] = 'DESC';
    }
    # validate or filter junk from other fields
    $t_multi_select_list = array(FILTER_PROPERTY_CATEGORY_ID => 'string', FILTER_PROPERTY_SEVERITY => 'int', FILTER_PROPERTY_STATUS => 'int', FILTER_PROPERTY_REPORTER_ID => 'int', FILTER_PROPERTY_HANDLER_ID => 'int', FILTER_PROPERTY_NOTE_USER_ID => 'int', FILTER_PROPERTY_RESOLUTION => 'int', FILTER_PROPERTY_PRIORITY => 'int', FILTER_PROPERTY_BUILD => 'string', FILTER_PROPERTY_VERSION => 'string', FILTER_PROPERTY_HIDE_STATUS => 'int', FILTER_PROPERTY_FIXED_IN_VERSION => 'string', FILTER_PROPERTY_TARGET_VERSION => 'string', FILTER_PROPERTY_MONITOR_USER_ID => 'int', FILTER_PROPERTY_PROFILE_ID => 'int');
    foreach ($t_multi_select_list as $t_multi_field_name => $t_multi_field_type) {
        if (!isset($p_filter_arr[$t_multi_field_name])) {
            if (FILTER_PROPERTY_HIDE_STATUS == $t_multi_field_name) {
                $p_filter_arr[$t_multi_field_name] = array(config_get('hide_status_default'));
            } else {
                if ('custom_fields' == $t_multi_field_name) {
                    $p_filter_arr[$t_multi_field_name] = array($f_custom_fields_data);
                } else {
                    $p_filter_arr[$t_multi_field_name] = array(META_FILTER_ANY);
                }
            }
        } else {
            if (!is_array($p_filter_arr[$t_multi_field_name])) {
                $p_filter_arr[$t_multi_field_name] = array($p_filter_arr[$t_multi_field_name]);
            }
            $t_checked_array = array();
            foreach ($p_filter_arr[$t_multi_field_name] as $t_filter_value) {
                $t_filter_value = stripslashes($t_filter_value);
                if ($t_filter_value === 'any' || $t_filter_value === '[any]') {
                    $t_filter_value = META_FILTER_ANY;
                }
                if ($t_filter_value === 'none' || $t_filter_value === '[none]') {
                    $t_filter_value = META_FILTER_NONE;
                }
                if ('string' == $t_multi_field_type) {
                    $t_checked_array[] = $t_filter_value;
                } else {
                    if ('int' == $t_multi_field_type) {
                        $t_checked_array[] = (int) $t_filter_value;
                    } else {
                        if ('array' == $t_multi_field_type) {
                            $t_checked_array[] = $t_filter_value;
                        }
                    }
                }
            }
            $p_filter_arr[$t_multi_field_name] = $t_checked_array;
        }
    }
    if (is_array($t_custom_fields) && count($t_custom_fields) > 0) {
        foreach ($t_custom_fields as $t_cfid) {
            if (!isset($p_filter_arr['custom_fields'][$t_cfid])) {
                $p_filter_arr['custom_fields'][$t_cfid] = array(META_FILTER_ANY);
            } else {
                if (!is_array($p_filter_arr['custom_fields'][$t_cfid])) {
                    $p_filter_arr['custom_fields'][$t_cfid] = array($p_filter_arr['custom_fields'][$t_cfid]);
                }
                $t_checked_array = array();
                foreach ($p_filter_arr['custom_fields'][$t_cfid] as $t_filter_value) {
                    $t_filter_value = stripslashes($t_filter_value);
                    if ($t_filter_value === 'any' || $t_filter_value === '[any]') {
                        $t_filter_value = META_FILTER_ANY;
                    }
                    $t_checked_array[] = $t_filter_value;
                }
                $p_filter_arr['custom_fields'][$t_cfid] = $t_checked_array;
            }
        }
    }
    # all of our filter values are now guaranteed to be there, and correct.
    return $p_filter_arr;
}
 * @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);
# 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);
Example #6
0
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 );
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);
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);
$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', '*****@*****.**');
$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);
Example #10
0
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 {
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');
    }
}
/**
<?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')));
#
# 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));
    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
 *