当前位置: 首页>>代码示例>>PHP>>正文


PHP gpc_get函数代码示例

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


在下文中一共展示了gpc_get函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 - 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('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 - webnotes-devel@sourceforge.net
# 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 - kenito@300baud.org
 * @copyright Copyright 2002  MantisBT Team - mantisbt-dev@lists.sourceforge.net
 * @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') . '&amp;width=600&amp;interval=' . $f_interval . '&amp;start_date=' . $f_start . '&amp;end_date=' . $f_end . '&amp;summary=' . $t_summary . '&amp;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 - kenito@300baud.org
 * @copyright Copyright 2002  MantisBT Team - mantisbt-dev@lists.sourceforge.net
 * @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 - kenito@300baud.org
 * @copyright Copyright 2002  MantisBT Team - mantisbt-dev@lists.sourceforge.net
 * @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


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