本文整理汇总了PHP中require_api函数的典型用法代码示例。如果您正苦于以下问题:PHP require_api函数的具体用法?PHP require_api怎么用?PHP require_api使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了require_api函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: require_api
* Miscellaneous functions that provide functionality on top of other APIS
* are found in the helper_api.
*
* @package CoreAPI
* @subpackage UtilityAPI
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*
* @uses config_api.php
* @uses constant_inc.php
* @uses error_api.php
*/
require_api('config_api.php');
require_api('constant_inc.php');
require_api('error_api.php');
/**
* converts a 1 value to X
* converts a 0 value to a space
* @param integer $p_num A numeric to translate as a boolean for display.
* @return string X or space
* @access public
*/
function trans_bool($p_num)
{
if (0 == $p_num) {
return ' ';
} else {
return 'X';
}
}
示例2: require_api
* ii) "Print Issues Columns" - These are the fields that are included when printing out bug
* details.
* iii) "Export Issues Columns" - These are the list of fields included when exporting an issue from
* the bug tracker.
* Note: These are now shared between different types of exports - for example, the core MantisBT
* distribution can export to Excel and Word Documents.
*
* The settings defined here can be allocated to the current project, or All Projects. In addition,
* it is possible to copy the column configuration between different projects.
*
* @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
*
* @uses core.php
* @uses current_user_api.php
* @uses html_api.php
* @uses lang_api.php
*/
require_once 'core.php';
require_api('current_user_api.php');
require_api('html_api.php');
require_api('lang_api.php');
html_page_top(lang_get('manage_columns_config'));
current_user_ensure_unprotected();
# Define constant that will be checked by the include page.
define('ACCOUNT_COLUMNS', true);
define('MANAGE_COLUMNS_INC_ALLOW', true);
include dirname(__FILE__) . '/manage_columns_inc.php';
html_page_bottom();
示例3: require_api
* @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*
* @uses authentication_api.php
* @uses config_api.php
* @uses constant_inc.php
* @uses error_api.php
* @uses plugin_api.php
* @uses user_pref_api.php
*/
require_api('authentication_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('error_api.php');
require_api('plugin_api.php');
require_api('user_pref_api.php');
# Cache of localization strings in the language specified by the last
# lang_load call
$g_lang_strings = array();
# stack for language overrides
$g_lang_overrides = array();
# To be used in custom_strings_inc.php :
$g_active_language = '';
/**
* Loads the specified language and stores it in $g_lang_strings, to be used by lang_get
* @param string $p_lang
* @param string $p_dir
* @return null
*/
function lang_load($p_lang, $p_dir = null)
{
示例4: require_api
*
* @package CoreAPI
* @subpackage IconAPI
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*
* @uses config_api.php
* @uses constant_inc.php
* @uses helper_api.php
* @uses utility_api.php
*/
require_api('config_api.php');
require_api('constant_inc.php');
require_api('helper_api.php');
require_api('utility_api.php');
/**
* gets the status icon
* @param string $p_icon Icon file name.
* @return string html img tag containing status icon
* @access public
*/
function icon_get_status_icon($p_icon)
{
$t_icon_path = config_get('icon_path');
$t_status_icon_arr = config_get('status_icon_arr');
$t_priotext = get_enum_element('priority', $p_icon);
if (isset($t_status_icon_arr[$p_icon]) && !is_blank($t_status_icon_arr[$p_icon])) {
return '<img src="' . $t_icon_path . $t_status_icon_arr[$p_icon] . '" alt="" title="' . $t_priotext . '" />';
} else {
return ' ';
示例5: require_api
# 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/>.
/**
* JSON API
*
* @package CoreAPI
* @subpackage JSONAPI
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2012 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*
* @uses url_api.php
*/
require_api('url_api.php');
/**
* Get a chunk of JSON from a given URL.
* @param string URL
* @param string Top-level member to retrieve
* @return multi JSON class structure
*/
function json_url($p_url, $p_member = null)
{
$t_data = url_get($p_url);
$t_json = json_decode(utf8_encode($t_data));
if (is_null($p_member)) {
return $t_json;
} else {
return $t_json->{$p_member};
}
示例6: require_api
* @uses config_api.php
* @uses event_api.php
* @uses form_api.php
* @uses gpc_api.php
* @uses print_api.php
* @uses project_api.php
*/
require_once 'core.php';
require_api('access_api.php');
require_api('authentication_api.php');
require_api('config_api.php');
require_api('event_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_update');
auth_reauthenticate();
$f_project_id = gpc_get_int('project_id');
$f_name = gpc_get_string('name');
$f_description = gpc_get_string('description');
$f_status = gpc_get_int('status');
$f_view_state = gpc_get_int('view_state');
$f_file_path = gpc_get_string('file_path', '');
$f_enabled = gpc_get_bool('enabled');
$f_inherit_global = gpc_get_bool('inherit_global', 0);
access_ensure_project_level(config_get('manage_project_threshold'), $f_project_id);
project_update($f_project_id, $f_name, $f_description, $f_status, $f_view_state, $f_file_path, $f_enabled, $f_inherit_global);
event_signal('EVENT_MANAGE_PROJECT_UPDATE', array($f_project_id));
form_security_purge('manage_proj_update');
print_header_redirect('manage_proj_page.php');
示例7: require_api
# along with Mantis. If not, see <http://www.gnu.org/licenses/>.
/**
* Bug Revision API
*
* @package CoreAPI
* @subpackage BugRevisionAPI
* @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*
* @uses constant_inc.php
* @uses database_api.php
*/
require_api( 'constant_inc.php' );
require_api( 'database_api.php' );
/**
* Add a new revision to a bug history.
* @param int $p_bug_id Bug ID
* @param int $p_user_id User ID
* @param int $p_type Revision Type
* @param string $p_value Value
* @param int $p_bugnote_id Bugnote ID
* @param int $p_timestamp Timestamp(int)
* @return int Revision ID
*/
function bug_revision_add( $p_bug_id, $p_user_id, $p_type, $p_value, $p_bugnote_id=0, $p_timestamp = null ) {
if ( $p_type <= REV_ANY ) {
return null;
}
示例8: require_api
* @uses project_hierarchy_api.php
*/
require_once 'core.php';
require_api('access_api.php');
require_api('authentication_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('current_user_api.php');
require_api('event_api.php');
require_api('form_api.php');
require_api('gpc_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('project_api.php');
require_api('project_hierarchy_api.php');
form_security_validate('manage_proj_create');
auth_reauthenticate();
access_ensure_global_level(config_get('create_project_threshold'));
$f_name = gpc_get_string('name');
$f_description = gpc_get_string('description');
$f_view_state = gpc_get_int('view_state');
$f_status = gpc_get_int('status');
$f_file_path = gpc_get_string('file_path', '');
$f_inherit_global = gpc_get_bool('inherit_global', 0);
$f_inherit_parent = gpc_get_bool('inherit_parent', 0);
$f_parent_id = gpc_get_int('parent_id', 0);
if (0 != $f_parent_id) {
project_ensure_exists($f_parent_id);
}
$t_project_id = project_create(strip_tags($f_name), $f_description, $f_status, $f_view_state, $f_file_path, true, $f_inherit_global);
示例9: require_once
/**
* This page allows the user to set the fields of the bugs he wants to print
* Update is POSTed to acount_prefs_update.php
* Reset is POSTed to acount_prefs_reset.php
*
* @package MantisBT
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*
* @uses core.php
* @uses authentication_api.php
* @uses html_api.php
*/
/**
* MantisBT Core API's
*/
require_once( 'core.php' );
require_api( 'authentication_api.php' );
require_api( 'html_api.php' );
define( 'PRINT_ALL_BUG_OPTIONS_INC_ALLOW', true );
include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'print_all_bug_options_inc.php' );
auth_ensure_user_authenticated();
html_page_top();
edit_printing_prefs();
html_page_bottom();
示例10: require_api
* @uses bug_api.php
* @uses compress_api.php
* @uses config_api.php
* @uses constant_inc.php
* @uses gpc_api.php
* @uses relationship_graph_api.php
*/
require_once 'core.php';
require_api('access_api.php');
require_api('authentication_api.php');
require_api('bug_api.php');
require_api('compress_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('gpc_api.php');
require_api('relationship_graph_api.php');
# If relationship graphs were made disabled, we disallow any access to
# this script.
auth_ensure_user_authenticated();
if (ON != config_get('relationship_graph_enable')) {
access_denied();
}
$f_bug_id = gpc_get_int('bug_id');
$f_type = gpc_get_string('graph', 'relation');
$f_orientation = gpc_get_string('orientation', config_get('relationship_graph_orientation'));
access_ensure_bug_level(VIEWER, $f_bug_id);
$t_bug = bug_get($f_bug_id, true);
compress_enable();
$t_graph_relation = 'relation' == $f_type;
$t_graph_horizontal = 'horizontal' == $f_orientation;
if ($t_graph_relation) {
示例11: require_api
* @uses string_api.php
* @uses workflow_api.php
*/
require_once 'core.php';
require_api('authentication_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('current_user_api.php');
require_api('form_api.php');
require_api('helper_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('project_api.php');
require_api('string_api.php');
require_api('workflow_api.php');
auth_reauthenticate();
html_page_top(lang_get('manage_workflow_config'));
print_manage_menu('adm_permissions_report.php');
print_manage_config_menu('manage_config_workflow_page.php');
# CSS class names for overrides color coding
define('COLOR_GLOBAL', 'color-global');
define('COLOR_PROJECT', 'color-project');
$g_access = current_user_get_access_level();
$t_project = helper_get_current_project();
$g_can_change_workflow = $g_access >= config_get_access('status_enum_workflow');
$g_can_change_flags = $g_can_change_workflow;
$g_overrides = array();
/**
* Set overrides
* @param string $p_config Configuration value.
示例12: require_api
* MantisBT Core API's
*/
require_once 'core.php';
require_api('access_api.php');
require_api('bug_api.php');
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('history_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('relationship_api.php');
form_security_validate('bug_relationship_add');
$f_rel_type = gpc_get_int('rel_type');
$f_src_bug_id = gpc_get_int('src_bug_id');
$f_dest_bug_id_string = gpc_get_string('dest_bug_id');
# user has access to update the bug...
access_ensure_bug_level(config_get('update_bug_threshold'), $f_src_bug_id);
$f_dest_bug_id_string = str_replace(',', '|', $f_dest_bug_id_string);
$f_dest_bug_id_array = explode('|', $f_dest_bug_id_string);
foreach ($f_dest_bug_id_array as $f_dest_bug_id) {
$f_dest_bug_id = (int) $f_dest_bug_id;
# source and destination bugs are the same bug...
if ($f_src_bug_id == $f_dest_bug_id) {
trigger_error(ERROR_RELATIONSHIP_SAME_BUG, ERROR);
}
# the related bug exists...
示例13: require_api
* Export billing information to csv
*
* @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
*
* @uses core.php
* @uses billing_api.php
* @uses bug_api.php
* @uses csv_api.php
*/
require_once 'core.php';
require_api('billing_api.php');
require_api('bug_api.php');
require_api('csv_api.php');
helper_begin_long_process();
$t_filename = csv_get_default_filename();
$t_date_format = config_get('normal_date_format');
$f_project_id = gpc_get_int('project_id');
$f_cost = gpc_get_int('cost');
$f_from = gpc_get_string('from');
$f_to = gpc_get_string('to');
$t_separator = ',';
billing_ensure_reporting_access($f_project_id);
$t_show_cost = ON == config_get('time_tracking_with_billing') && $f_cost != 0;
$t_billing_rows = billing_get_for_project($f_project_id, $f_from, $f_to, $f_cost);
$t_show_realname = config_get('show_realname') == ON;
header('Pragma: public');
header('Content-Type: text/csv; name=' . urlencode(file_clean_name($t_filename)));
header('Content-Transfer-Encoding: BASE64;');
示例14: error_reporting
* Mantis Database installation process
*
* @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
*/
error_reporting(E_ALL);
@set_time_limit(0);
# Load the MantisDB core in maintenance mode. This mode will assume that
# config/config_inc.php hasn't been specified. Thus the database will not be opened
# and plugins will not be loaded.
define('MANTIS_MAINTENANCE_MODE', true);
require_once dirname(dirname(__FILE__)) . '/core.php';
require_api('install_helper_functions_api.php');
require_api('crypto_api.php');
$g_error_send_page_header = false;
# bypass page headers in error handler
$g_failed = false;
$g_database_upgrade = false;
/**
* Print Test result
*
* @param integer $p_result Result - BAD|GOOD.
* @param boolean $p_hard_fail Fail installation or soft warning.
* @param string $p_message Message to display to user.
* @return void
*/
function print_test_result($p_result, $p_hard_fail = true, $p_message = '')
{
global $g_failed;
示例15: require_api
*/
/**
* MantisBT Core API's
*/
require_once 'core.php';
require_api('authentication_api.php');
require_api('compress_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('current_user_api.php');
require_api('custom_field_api.php');
require_api('error_api.php');
require_api('filter_api.php');
require_api('filter_constants_inc.php');
require_api('gpc_api.php');
require_api('helper_api.php');
auth_ensure_user_authenticated();
compress_enable();
global $t_filter;
global $t_select_modifier;
$t_filter = current_user_get_bug_filter();
if ($t_filter === false) {
$t_filter = filter_get_default();
}
$t_project_id = helper_get_current_project();
$t_current_user_access_level = current_user_get_access_level();
$t_accessible_custom_fields_ids = array();
$t_accessible_custom_fields_names = array();
$t_accessible_custom_fields_types = array();
$t_accessible_custom_fields_values = array();
$t_filter_cols = 7;