本文整理汇总了PHP中gpc_get函数的典型用法代码示例。如果您正苦于以下问题:PHP gpc_get函数的具体用法?PHP gpc_get怎么用?PHP gpc_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gpc_get函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: bfefooter
function bfefooter()
{
if ("/view.php" == $_SERVER['PHP_SELF']) {
$t_bugnote_add_text = str_replace(array("\n", "\r"), array('\\n', '\\r'), bugnote_get_text(gpc_get('bugnote_id', '')));
if ($t_bugnote_add_text) {
return '<!-- Beginn BFE-Footer -->' . "\n" . '<script type="text/javascript">' . "\n" . ' document.getElementsByName("bugnote_text")[0].value="' . $t_bugnote_add_text . '";' . "\n" . '</script>' . "\n" . '<!-- Ende BFE-Footer -->' . "\n";
}
}
}
开发者ID:bfekomsthoeft,项目名称:TTS_Praxisprojekt1,代码行数:9,代码来源:BFEplugin.php
示例2: 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);
}
}
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:12,代码来源:manage_config_work_threshold_set.php
示例3: gpc_get_bool
function gpc_get_bool($p_var_name, $p_default = false)
{
$t_result = gpc_get($p_var_name, $p_default);
if ($t_result === $p_default) {
return $p_default;
} else {
if (is_array($t_result)) {
error_parameters($p_var_name);
trigger_error(ERROR_GPC_ARRAY_UNEXPECTED, ERROR);
}
return gpc_string_to_bool($t_result);
}
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:13,代码来源:gpc_api.php
示例4: gpc_get
$f_database_name = gpc_get('database_name', config_get('database_name', 'bugtracker'));
$f_db_schema = gpc_get('db_schema', config_get('db_schema', ''));
$f_db_username = gpc_get('db_username', config_get('db_username', ''));
$f_db_password = gpc_get('db_password', config_get('db_password', ''));
if (CONFIGURED_PASSWORD == $f_db_password) {
$f_db_password = config_get('db_password');
}
$f_timezone = gpc_get('timezone', config_get('default_timezone'));
# Set default prefix/suffix form variables ($f_db_table_XXX)
$t_prefix_type = $f_db_type == 'oci8' ? $f_db_type : 'other';
foreach ($t_prefix_defaults[$t_prefix_type] as $t_key => $t_value) {
${'f_' . $t_key} = gpc_get($t_key, $t_value);
}
}
$f_admin_username = gpc_get('admin_username', '');
$f_admin_password = gpc_get('admin_password', '');
if (CONFIGURED_PASSWORD == $f_admin_password) {
$f_admin_password = '';
}
$f_log_queries = gpc_get_bool('log_queries', false);
$f_db_exists = gpc_get_bool('db_exists', false);
if ($t_config_exists) {
if (0 == $t_install_state) {
print_test('Config File Exists - Upgrade', true);
print_test('Setting Database Type', '' !== $f_db_type, true, 'database type is blank?');
# @TODO: dsn config seems to be undefined, remove ?
$t_db_conn_exists = $f_dsn !== '' || $f_database_name !== '' && $f_db_username !== '' && $f_hostname !== '';
# Oracle supports binding in two ways:
# - hostname, username/password and database name
# - tns name (insert into hostname field) and username/password, database name is still empty
if ($f_db_type == 'oci8') {
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:install.php
示例5: form_security_validate
* @copyright Copyright (C) 2002 - 2014 MantisBT Team - [email protected]
* @link http://www.mantisbt.org
*/
/**
* MantisBT Core API's
*/
require_once 'core.php';
require_once 'email_api.php';
form_security_validate('manage_config_email_set');
auth_reauthenticate();
$t_can_change_level = min(config_get_access('notify_flags'), config_get_access('default_notify_flags'));
access_ensure_project_level($t_can_change_level);
$t_redirect_url = 'manage_config_email_page.php';
$t_project = helper_get_current_project();
$f_flags = gpc_get('flag', array());
$f_thresholds = gpc_get('flag_threshold', array());
$f_actions_access = gpc_get_int('notify_actions_access');
html_page_top(lang_get('manage_email_config'), $t_redirect_url);
$t_access = current_user_get_access_level();
$t_can_change_flags = $t_access >= config_get_access('notify_flags');
$t_can_change_defaults = $t_access >= config_get_access('default_notify_flags');
# build a list of the possible actions and flags
$t_valid_actions = array('owner', 'reopened', 'deleted', 'bugnote');
if (config_get('enable_sponsorship') == ON) {
$t_valid_actions[] = 'sponsor';
}
$t_valid_actions[] = 'relation';
$t_statuses = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
ksort($t_statuses);
reset($t_statuses);
foreach ($t_statuses as $t_status => $t_label) {
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:manage_config_email_set.php
示例6: gpc_get_bool_array
function gpc_get_bool_array($p_var_name, $p_default = null)
{
# Don't pass along a default unless one was given to us
# otherwise we prevent an error being triggered
if (func_num_args() > 1) {
$t_result = gpc_get($p_var_name, $p_default);
} else {
$t_result = gpc_get($p_var_name);
}
if (!is_array($t_result)) {
#trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR);
echo "Unexpected array '{$p_var_name}'.";
}
for ($i = 0; $i < sizeof($t_result); $i++) {
$t_result[$i] = gpc_string_to_bool($t_result[$i]);
}
return $t_result;
}
开发者ID:BackupTheBerlios,项目名称:webnotes-svn,代码行数:18,代码来源:gpc_api.php
示例7: gpc_get_string_array
break;
case CUSTOM_FIELD_DATE_AFTER:
$t_start = $t_start_date + $t_one_day - 1;
$t_end = 2147483647;
// Some time in 2038, max value of a signed int.
break;
case CUSTOM_FIELD_DATE_ONORAFTER:
$t_start = $t_start_date;
$t_end = 2147483647;
// Some time in 2038, max value of a signed int.
break;
}
$f_custom_fields_data[$t_cfid][1] = $t_start;
$f_custom_fields_data[$t_cfid][2] = $t_end;
} else {
if (is_array(gpc_get('custom_field_' . $t_cfid, null))) {
$f_custom_fields_data[$t_cfid] = gpc_get_string_array('custom_field_' . $t_cfid, META_FILTER_ANY);
} else {
$f_custom_fields_data[$t_cfid] = gpc_get_string('custom_field_' . $t_cfid, META_FILTER_ANY);
$f_custom_fields_data[$t_cfid] = array($f_custom_fields_data[$t_cfid]);
}
}
}
}
$f_relationship_type = gpc_get_int(FILTER_PROPERTY_RELATIONSHIP_TYPE, -1);
$f_relationship_bug = gpc_get_int(FILTER_PROPERTY_RELATIONSHIP_BUG, 0);
if ($f_temp_filter) {
$f_type = 1;
}
if ($f_and_not_assigned) {
$f_and_not_assigned = 'on';
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:31,代码来源:view_all_set.php
示例8: Copyright
# phpWebNotes - a php based note addition system
# Copyright (C) 2000-2002 Webnotes Team - [email protected]
# This program is distributed under the terms and conditions of the GPL
# See the files README and LICENSE for details
# --------------------------------------------------------
# $Id: admin_manage_users_update.php,v 1.6 2002/10/07 02:54:39 vboctor Exp $
# --------------------------------------------------------
require_once 'core' . DIRECTORY_SEPARATOR . 'api.php';
login_cookie_check();
access_ensure_check_action(ACTION_USERS_EDIT);
$f_user_id = gpc_get('f_user_id');
$f_email = gpc_get('f_email');
$f_password = gpc_get('f_password');
$f_password_confirm = gpc_get('f_password_confirm');
$f_access_level = gpc_get('f_access_level');
if ($f_password != $f_password_confirm) {
util_header_redirect($g_admin_manage_users_edit . '?f_user_id=' . $f_user_id);
}
if (isset($f_enabled)) {
$f_enabled = 1;
} else {
$f_enabled = 0;
}
if (isset($f_protected)) {
$f_protected = 1;
} else {
$f_protected = 0;
}
user_update($f_user_id, $f_email, $f_password, $f_access_level, $f_enabled, $f_protected);
util_header_redirect($g_admin_manage_users);
开发者ID:BackupTheBerlios,项目名称:webnotes-svn,代码行数:30,代码来源:admin_manage_users_update.php
示例9: dirname
# 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/>.
/**
* This upgrade moves attachments from the database to the disk
* @package MantisBT
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - [email protected]
* @copyright Copyright 2002 MantisBT Team - [email protected]
* @link http://www.mantisbt.org
*/
require_once dirname(dirname(__FILE__)) . '/core.php';
form_security_validate('move_attachments_project_select');
access_ensure_global_level(config_get_global('admin_site_threshold'));
$f_file_type = gpc_get('type');
$f_project_to_move = gpc_get('to_move', null);
/**
* Moves attachments from the specified list of projects from disk to database
* @param string $p_type Attachment type ('bug' or 'project')
* @param array $p_projects List of projects to process
* @return array summary of moves per project
*/
function move_attachments_to_db($p_type, $p_projects)
{
if (empty($p_projects)) {
return array();
}
# Build the SQL query based on attachment type
$t_file_table = '{' . $p_type . '_file}';
switch ($p_type) {
case 'project':
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:move_attachments.php
示例10: get_dropdown
<?php
echo get_dropdown($t_show, 'show_table', $f_show_as_table ? 1 : 0);
?>
</td>
<td>
<input type="submit" class="button" name="show" value="<?php
echo plugin_lang_get('show_graph');
?>
"/>
</td>
</tr>
</table>
</form>
<?php
# build the graphs if both an interval and graph type are selected
if (0 != $f_type && $f_interval > 0 && gpc_get('show', '') != '') {
$t_width = plugin_config_get('window_width');
$t_summary = $f_type % 2 != 0;
$t_body = (int) ($f_type / 2);
$f_start = $t_period->get_start_formatted();
$f_end = $t_period->get_end_formatted();
if ($t_body == 1 || $t_body == 3) {
if ($f_show_as_table) {
include config_get_global('plugin_path') . plugin_get_current() . '/pages/bug_graph_bystatus.php';
} else {
echo '<br /><img src="' . plugin_page('bug_graph_bystatus.php') . '&width=600&interval=' . $f_interval . '&start_date=' . $f_start . '&end_date=' . $f_end . '&summary=' . $t_summary . '&show_table=0" alt="Bug Graph" />';
}
}
if ($t_body == 2 || $t_body == 3) {
if ($f_show_as_table) {
include config_get_global('plugin_path') . plugin_get_current() . '/pages/bug_graph_bycategory.php';
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:bug_graph_page.php
示例11: auth_ensure_user_authenticated
auth_ensure_user_authenticated();
$f_user_id = gpc_get_int( 'user_id' );
$f_redirect_url = gpc_get_string( 'redirect_url' );
# the check for the protected state is already done in the form, there is
# no need to duplicate it here.
# get the fields list
$t_field_name_arr = get_field_names();
$field_name_count = count($t_field_name_arr);
# check the checkboxes
for ($i=0 ; $i <$field_name_count ; $i++) {
$t_name='print_'.utf8_strtolower(str_replace(' ','_',$t_field_name_arr[$i]));
$t_flag = gpc_get( $t_name, null );
if ( $t_flag === null ) {
$t_prefs_arr[$i] = 0;
} else {
$t_prefs_arr[$i] = 1;
}
}
# get user id
$t_user_id = $f_user_id;
$c_export = implode('',$t_prefs_arr);
# update preferences
$t_user_print_pref_table = db_get_table( 'user_print_pref' );
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:print_all_bug_options_update.php
示例12: dirname
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - [email protected]
* @copyright Copyright 2002 MantisBT Team - [email protected]
* @link http://www.mantisbt.org
*/
/**
* MantisBT Core API's
*/
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'core.php';
access_ensure_global_level(config_get_global('admin_site_threshold'));
# Page header, menu
html_page_top('MantisBT Administration - Moving Attachments');
echo '<div align="center"><p>';
print_bracket_link(helper_mantis_url('admin/system_utils.php'), 'Back to System Utilities');
echo '</p></div>';
# File type should be 'bug' (default) or 'project'
$f_file_type = gpc_get('type', 'bug');
$t_bug_table = db_get_table('mantis_bug_table');
$t_project_table = db_get_table('mantis_project_table');
switch ($f_file_type) {
case 'project':
$t_type = 'Project Files';
$t_file_table = db_get_table('mantis_project_file_table');
$t_query = "SELECT p.id, p.name, COUNT(f.id) disk\n\t\t\tFROM {$t_file_table} f\n\t\t\tLEFT JOIN {$t_project_table} p ON p.id = f.project_id\n\t\t\tWHERE content <> ''\n\t\t\tGROUP BY p.id, p.name\n\t\t\tORDER BY p.name";
break;
case 'bug':
default:
$t_type = 'Attachments';
$t_file_table = db_get_table('mantis_bug_file_table');
$t_query = "SELECT p.id, p.name, COUNT(f.id) disk\n\t\t\tFROM {$t_file_table} f\n\t\t\tJOIN {$t_bug_table} b ON b.id = f.bug_id\n\t\t\tJOIN {$t_project_table} p ON p.id = b.project_id\n\t\t\tWHERE content <> ''\n\t\t\tGROUP BY p.id, p.name\n\t\t\tORDER BY p.name";
break;
}
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:move_attachments_page.php
示例13: filter_ensure_valid_filter
function filter_ensure_valid_filter($p_filter_arr)
{
# extend current filter to add information passed via POST
if (!isset($p_filter_arr['_version'])) {
$p_filter_arr['_version'] = config_get('cookie_version');
}
$t_cookie_vers = (int) substr($p_filter_arr['_version'], 1);
if (substr(config_get('cookie_version'), 1) > $t_cookie_vers) {
# if the version is old, update it
$p_filter_arr['_version'] = config_get('cookie_version');
}
if (!isset($p_filter_arr['_view_type'])) {
$p_filter_arr['_view_type'] = gpc_get_string('view_type', 'simple');
}
if (!isset($p_filter_arr['per_page'])) {
$p_filter_arr['per_page'] = gpc_get_int('per_page', config_get('default_limit_view'));
}
if (!isset($p_filter_arr['highlight_changed'])) {
$p_filter_arr['highlight_changed'] = config_get('default_show_changed');
}
if (!isset($p_filter_arr['sticky_issues'])) {
$p_filter_arr['sticky_issues'] = config_get('show_sticky_issues');
}
if (!isset($p_filter_arr['sort'])) {
$p_filter_arr['sort'] = "last_updated";
}
if (!isset($p_filter_arr['dir'])) {
$p_filter_arr['dir'] = "DESC";
}
if (!isset($p_filter_arr['platform'])) {
$p_filter_arr['platform'] = array(0 => META_FILTER_ANY);
}
if (!isset($p_filter_arr['os'])) {
$p_filter_arr['os'] = array(0 => META_FILTER_ANY);
}
if (!isset($p_filter_arr['os_build'])) {
$p_filter_arr['os_build'] = array(0 => META_FILTER_ANY);
}
if (!isset($p_filter_arr['project_id'])) {
$p_filter_arr['project_id'] = array(0 => META_FILTER_CURRENT);
}
if (!isset($p_filter_arr['start_month'])) {
$p_filter_arr['start_month'] = gpc_get_string('start_month', date('m'));
}
if (!isset($p_filter_arr['start_day'])) {
$p_filter_arr['start_day'] = gpc_get_string('start_day', 1);
}
if (!isset($p_filter_arr['start_year'])) {
$p_filter_arr['start_year'] = gpc_get_string('start_year', date('Y'));
}
if (!isset($p_filter_arr['end_month'])) {
$p_filter_arr['end_month'] = gpc_get_string('end_month', date('m'));
}
if (!isset($p_filter_arr['end_day'])) {
$p_filter_arr['end_day'] = gpc_get_string('end_day', date('d'));
}
if (!isset($p_filter_arr['end_year'])) {
$p_filter_arr['end_year'] = gpc_get_string('end_year', date('Y'));
}
if (!isset($p_filter_arr['search'])) {
$p_filter_arr['search'] = '';
}
if (!isset($p_filter_arr['and_not_assigned'])) {
$p_filter_arr['and_not_assigned'] = gpc_get_bool('and_not_assigned', false);
}
if (!isset($p_filter_arr['do_filter_by_date'])) {
$p_filter_arr['do_filter_by_date'] = gpc_get_bool('do_filter_by_date', false);
}
if (!isset($p_filter_arr['view_state'])) {
$p_filter_arr['view_state'] = gpc_get('view_state', '');
} else {
if ($p_filter_arr['view_state'] == 'any' || $p_filter_arr['view_state'] == 0) {
$p_filter_arr['view_state'] = META_FILTER_ANY;
}
}
if (!isset($p_filter_arr['relationship_type'])) {
$p_filter_arr['relationship_type'] = gpc_get_int('relationship_type', -1);
}
if (!isset($p_filter_arr['relationship_bug'])) {
$p_filter_arr['relationship_bug'] = gpc_get_int('relationship_bug', 0);
}
if (!isset($p_filter_arr['target_version'])) {
$p_filter_arr['target_version'] = META_FILTER_ANY;
}
if (!isset($p_filter_arr['tag_string'])) {
$p_filter_arr['tag_string'] = gpc_get_string('tag_string', '');
}
if (!isset($p_filter_arr['tag_select'])) {
$p_filter_arr['tag_select'] = gpc_get_string('tag_select', '');
}
$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) && sizeof($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, META_FILTER_ANY);
} else {
$f_custom_fields_data[$t_cfid] = gpc_get_string('custom_field_' . $t_cfid, META_FILTER_ANY);
$f_custom_fields_data[$t_cfid] = array($f_custom_fields_data[$t_cfid]);
//.........这里部分代码省略.........
开发者ID:amjadtbssm,项目名称:website,代码行数:101,代码来源:filter_api.php
示例14: config_delete
}
}
if ($t_workflow == $t_workflow_parent && $f_access == $t_access_current) {
# If new value is equal to parent and access has not changed
config_delete('status_enum_workflow', ALL_USERS, $t_project);
} else {
if ($t_workflow != config_get('status_enum_workflow') || $f_access != $t_access_current) {
# Set config if value or access have changed
config_set('status_enum_workflow', $t_workflow, NO_USER, $t_project, $f_access);
}
}
}
# process the access level changes
if (config_get_access('status_enum_workflow') <= $t_access) {
# get changes to access level to change these values
$f_access = gpc_get('status_access');
$t_access_current = config_get_access('status_enum_workflow');
# Build access level reference arrays (parent level and current config)
$t_set_parent = config_get_parent($t_project, 'set_status_threshold');
$t_set_current = config_get('set_status_threshold');
$t_bug_submit_status = config_get('bug_submit_status');
foreach ($t_enum_status as $t_status => $t_status_label) {
if (!isset($t_set_parent[$t_status])) {
if ($t_bug_submit_status == $t_status) {
$t_set_parent[$t_status] = config_get_parent($t_project, 'report_bug_threshold');
} else {
$t_set_parent[$t_status] = config_get_parent($t_project, 'update_bug_status_threshold');
}
}
if (!isset($t_set_current[$t_status])) {
if ($t_bug_submit_status == $t_status) {
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:manage_config_workflow_set.php
示例15: dirname
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
/**
* This upgrade moves attachments from the database to the disk
* @package MantisBT
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - [email protected]
* @copyright Copyright 2002 MantisBT Team - [email protected]
* @link http://www.mantisbt.org
*/
/**
* MantisBT Core API's
*/
require_once dirname(dirname(__FILE__)) . '/core.php';
form_security_validate('move_attachments_project_select');
access_ensure_global_level(config_get_global('admin_site_threshold'));
$f_file_type = gpc_get('type');
$f_projects_to_disk = gpc_get('to_disk', null);
/**
* Moves attachments from the specified list of projects from database to disk
* @param string $p_type Attachment type ('bug' or 'project')
* @param array $p_projects List of projects to process
* @return array summary of moves per project
*/
function move_attachments_to_disk($p_type, $p_projects)
{
if (empty($p_projects)) {
return array();
}
# Build the SQL query based on attachment type
$t_file_table = db_get_table("mantis_{$p_type}_file_table");
switch ($p_type) {
case 'project':
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:move_attachments.php
示例16: auth_reauthenticate
# Autochange status Plugin for Mantis BugTracker :
# © Hennes Hervé <[email protected]>
# 2015-2016
# http://www.h-hennes.fr/blog/
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
html_page_top(plugin_lang_get('title'));
print_manage_menu();
#Gestion de la soumission du formulaire (Création )
if (gpc_get('submitCreate', false)) {
$query = "INSERT INTO mantis_autochange_status\r\n (`project_id`,`from_status`,`to_status`,`status_days`,`reminder`,`reminder_message`,`reminder_days`,`active`)\r\n VALUES ( " . db_param() . "," . db_param() . "," . db_param() . "," . db_param() . "," . db_param() . "," . db_param() . "," . db_param() . "," . db_param() . ")";
db_query_bound($query, array(gpc_get_int('project_id'), gpc_get_int('from_status'), gpc_get_int('to_status'), gpc_get_int('status_days'), gpc_get_int('reminder'), gpc_get_string('reminder_message'), gpc_get_int('reminder_days'), gpc_get_int('active')));
print_successful_redirect(plugin_page('config', true));
}
#Gestion de la soumission du formulaire (Mise à jour )
if (gpc_get('submitEdit', false)) {
$query = "UPDATE mantis_autochange_status " . "SET `project_id` =" . db_param() . ",`from_status`=" . db_param() . ",`to_status`=" . db_param() . ",`status_days`=" . db_param() . ",`reminder`=" . db_param() . ",`reminder_message`=" . db_param() . ",`reminder_days`=" . db_param() . ",`active`=" . db_param() . "" . " WHERE changestatus_id=" . db_param();
db_query_bound($query, array(gpc_get_int('project_id'), gpc_get_int('from_status'), gpc_get_int('to_status'), gpc_get_int('status_days'), gpc_get_int('reminder'), gpc_get_string('reminder_message'), gpc_get_int('reminder_days'), gpc_get_int('active'), gpc_get_int('changestatus_id')));
print_successful_redirect(plugin_page('config', true));
}
#Mise à jour récupération des données
if ($edit_id = gpc_get_int('changestatus_id', false)) {
$change_query = db_query("SELECT * FROM mantis_autochange_status WHERE changestatus_id=" . $edit_id);
$change_datas = db_fetch_array($change_query);
}
#Bug rencontrés avec certains workflow
include_once dirname(__FILE__) . '/functions.php';
$function = 'print_status_option_list_plugin';
$t_projects = project_cache_all();
?>
<h2><?php
开发者ID:nenes25,项目名称:mantisbt_autochangestatus,代码行数:31,代码来源:changestatus.php
示例17: dirname
#
# 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 2000 - 2002 Kenzaburo Ito - [email protected]
* @copyright Copyright 2002 MantisBT Team - [email protected]
* @link http://www.mantisbt.org
*/
/**
* Mantis Core API's
*/
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'core.php';
access_ensure_global_level(config_get_global('admin_site_threshold'));
html_page_top();
$f_to = gpc_get('send', null);
if ($f_to !== null) {
if ($f_to == 'all') {
echo "Sending emails...<br />";
email_send_all();
echo "Done";
} else {
if ($f_to == 'sendordelall') {
echo "Sending or deleting emails...<br />";
email_send_all(true);
echo "Done";
} else {
$t_email_data = email_queue_get((int) $f_to);
// check if email was found. This can fail if another request picks up the email first and sends it.
echo 'Sending email...<br />';
if ($t_email_data !== false) {
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:email_queue.php
示例18: filter_ensure_valid_filter
/**
* 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) {
//.........这里部分代码省略.........
开发者ID:vipjaven,项目名称:mantisbt,代码行数:101,代码来源:filter_api.php
示例19: config_set
$t_workflow[$t_state] = $t_workflow_row;
}
}
if ($t_workflow != config_get('status_enum_workflow')) {
config_set('status_enum_workflow', $t_workflow, NO_USER, $t_project, $f_access);
}
}
# process the access level changes
if (config_get_access('status_enum_workflow') <= $t_access) {
# get changes to access level to change these values
$f_access = gpc_get('status_access');
# walk through the status labels to set the status threshold
$t_enum_status = explode_enum_string(config_get('status_enum_string'));
$t_set_status = array();
foreach ($t_statuses as $t_status_id => $t_status_label) {
$f_level = gpc_get('access_change_' . $t_status_id);
if (NEW_ == $t_status_id) {
if ((int) $f_level != config_get('report_bug_threshold')) {
config_set('report_bug_threshold', (int) $f_level, ALL_USERS, $t_project, $f_access);
}
} else {
$t_set_status[$t_status_id] = (int) $f_level;
}
}
if ($t_set_status != config_get('set_status_threshold')) {
config_set('set_status_threshold', $t_set_status, ALL_USERS, $t_project, $f_access);
}
}
?>
<br />
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:manage_config_workflow_set.php
示例20: login_cookie_check
# --------------------------------------------------------
# $Id: admin_manage_users_edit.php,v 1.8 2002/10/07 02:54:39 vboctor Exp $
# --------------------------------------------------------
require_once 'core' . DIRECTORY_SEPARATOR . 'api.php';
login_cookie_check();
access_ensure_check_action(ACTION_USERS_EDIT);
print_html_top();
print_head_top();
print_title($g_window_title);
print_css($g_css_inc_file);
print_head_bottom();
print_body_top();
print_header($g_page_title);
print_top_page($g_top_page_inc);
print_admin_menu();
$f_user_id = gpc_get('f_user_id');
$t_user_array = user_get_row($f_user_id);
extract($t_user_array, EXTR_PREFIX_ALL, 'v');
# @@@ Need to LOCALIZE text
?>
<div align="center">
<div class="small-width">
<form method="post" action="<?php
echo $g_admin_manage_users_update;
?>
">
<input type="hidden" name="f_user_id" value="<?php
echo $v_id;
?>
" />
<table class="box" summary="">
开发者ID:BackupTheBerlios,项目名称:webnotes-svn,代码行数:31,代码来源:admin_manage_users_edit.php
注:本文中的gpc_get函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论