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


PHP plugin_require_api函数代码示例

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


在下文中一共展示了plugin_require_api函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: plugin_require_api

/**
 * Generate custom graphs e.g. by status for given date range
 * @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 Period.php
 * @uses access_api.php
 * @uses config_api.php
 * @uses gpc_api.php
 * @uses html_api.php
 * @uses plugin_api.php
 */
require_once 'core.php';
plugin_require_api('core/Period.php');
require_api('access_api.php');
require_api('config_api.php');
require_api('gpc_api.php');
require_api('html_api.php');
require_api('plugin_api.php');
require_js('jscalendar/calendar.js');
require_js('jscalendar/lang/calendar-en.js');
require_js('jscalendar/calendar-setup.js');
require_css('calendar-blue.css');
access_ensure_project_level(config_get('view_summary_threshold'));
$f_interval = gpc_get_int('interval', 0);
$t_today = date('Y-m-d');
$f_type = gpc_get_int('graph_type', 0);
$f_show_as_table = gpc_get_bool('show_table', false);
html_page_top1(plugin_lang_get('graph_page'));
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:bug_graph_page.php

示例2: plugin_require_api

# 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/>.
/**
 * This page displays "improved" charts on priorities : bars, 3Dpie and a mix priorities per status
 *
 * @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 'core.php';
plugin_require_api('core/graph_api.php');
access_ensure_project_level(config_get('view_summary_threshold'));
html_page_top();
print_summary_menu('summary_page.php');
echo '<br />';
print_summary_submenu();
$t_width = plugin_config_get('window_width');
$t_graph_width = (int) (($t_width - 50) * 0.6);
# gather the data for the graphs
$t_metrics = enum_bug_group(lang_get('priority_enum_string'), 'priority');
$t_token = token_set(TOKEN_GRAPH, json_encode($t_metrics));
?>
<br />
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title">
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:summary_graph_imp_priority.php

示例3: auth_reauthenticate

<?php

auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
html_page_top(plugin_lang_get('plugin_title'));
print_manage_menu();
plugin_require_api('core/config_api.php');
$t_this_page = 'manage_config';
ERP_print_menu($t_this_page);
?>

<br />
<table align="center" class="width75" cellspacing="1">

<tr>
	<td class="left">
<?php 
$t_link1 = helper_mantis_url('plugins/' . plugin_get_current() . '/scripts/bug_report_mail.php');
$t_link2 = plugin_page('bug_report_mail');
echo plugin_lang_get('jobsetup') . '<hr />' . '<ol><li><a href="' . $t_link1 . '">' . $t_link1 . '</a></li>' . '<li><a href="' . $t_link2 . '">' . $t_link2 . '</a></li></ol>';
?>
	</td>
</tr>

</table>
<br />

<?php 
if (!extension_loaded('mbstring')) {
    ?>
<table align="center" class="width50" cellspacing="1">
开发者ID:mikemol,项目名称:EmailReporting,代码行数:31,代码来源:manage_config.php

示例4: auth_reauthenticate

<?php

auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
html_page_top(plugin_lang_get('plugin_title'));
print_manage_menu();
plugin_require_api('core/config_api.php');
$t_this_page = 'view_readme';
ERP_print_menu($t_this_page);
?>

<pre>
<?php 
plugin_require_api('doc/README.bug_report_mail.txt');
?>
</pre>

<?php 
html_page_bottom(__FILE__);
开发者ID:JeromyK,项目名称:EmailReporting,代码行数:19,代码来源:view_readme.php

示例5: plugin_require_api

# 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/>.
/**
 * @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
 */
/**
 * MantisBT Core API's
 */
require_once 'core.php';
plugin_require_api('core/gantt_api.php');
require_api('version_api.php');
access_ensure_project_level(config_get('view_summary_threshold'));
$f_project_id = gpc_get_int('project_id', null);
$f_version_id = gpc_get_int('version_id', null);
$f_inherited = gpc_get_bool('inherited', true);
$f_start_index = gpc_get_int('start_index', -1);
$f_length = gpc_get_int('length', null);
$f_slice = gpc_get_int('slice', null);
if (null != $f_project_id && null != $f_version_id) {
    $t_metrics = gantt_create_summary($f_project_id, $f_version_id, $f_inherited, $f_start_index, $f_length);
    $t_gantt_chart_title = project_get_name($f_project_id);
    $t_gantt_chart_subtitle = version_full_name($f_version_id, $f_inherited, $f_project_id);
    if ($f_start_index != -1 && $f_length != null) {
        $t_gantt_chart_subtitle .= " (" . plugin_lang_get('part') . $f_slice . ")";
    }
开发者ID:martijnveen,项目名称:GanttChart,代码行数:31,代码来源:summary_gantt_chart.php

示例6: Copyright

# Mantis - a php based bugtracking system
# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
# Copyright (C) 2004  Gerrit Beine - gerrit.beine@pitcom.de
# Copyright (C) 2007  Rolf Kleef - rolf@drostan.org (IMAP)
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# This page receives an E-Mail via POP3 or IMAP and generates an Report
require_api('bug_api.php');
require_api('bugnote_api.php');
require_api('user_api.php');
require_api('file_api.php');
require_once config_get_global('absolute_path') . 'api/soap/mc_file_api.php';
require_once 'Net/POP3.php';
require_once 'Net/IMAP.php';
plugin_require_api('core/config_api.php');
plugin_require_api('core/Mail/Parser.php');
class ERP_mailbox_api
{
    private $_functionality_enabled = FALSE;
    private $_test_only = FALSE;
    public $_mailbox = array('description' => 'INITIALIZATION PHASE');
    private $_mailserver = NULL;
    private $_result = TRUE;
    private $_default_ports = array('POP3' => array('normal' => 110, 'encrypted' => 995), 'IMAP' => array('normal' => 143, 'encrypted' => 993));
    private $_validated_email_list = array();
    private $_mail_add_bug_reports;
    private $_mail_add_bugnotes;
    private $_mail_add_complete_email;
    private $_mail_add_users_from_cc_to;
    private $_mail_auto_signup;
    private $_mail_block_attachments_md5;
开发者ID:JeromyK,项目名称:EmailReporting,代码行数:31,代码来源:mail_api.php

示例7: gpc_get_string_array

        $t_mailbox += $t_mailbox_imap;
    }
    $t_plugin_content = gpc_get_string_array('plugin_content', NULL);
    if (is_array($t_plugin_content)) {
        $t_mailbox += array('plugin_content' => $t_plugin_content);
    }
}
if ($f_mailbox_action === 'add' || $f_mailbox_action === 'copy') {
    $t_mailboxes[] = $t_mailbox;
} elseif ($f_mailbox_action === 'edit' && $f_select_mailbox >= 0) {
    $t_mailboxes[$f_select_mailbox] = $t_mailbox;
} elseif ($f_mailbox_action === 'delete' && $f_select_mailbox >= 0) {
    unset($t_mailboxes[$f_select_mailbox]);
} elseif (($f_mailbox_action === 'test' || $f_mailbox_action === 'complete_test') && $f_select_mailbox >= 0) {
    # Verify mailbox - from Recmail by Cas Nuy
    plugin_require_api('core/mail_api.php');
    echo '<pre>';
    $t_mailbox_api = new ERP_mailbox_api($f_mailbox_action === 'complete_test' ? FALSE : TRUE);
    $t_result = $t_mailbox_api->process_mailbox($t_mailbox);
    echo '</pre>';
    $t_is_custom_error = is_array($t_result) && isset($t_result['ERROR_TYPE']) && $t_result['ERROR_TYPE'] === 'NON-PEAR-ERROR' || is_bool($t_result) && $t_result === FALSE;
    if ($t_is_custom_error || PEAR::isError($t_result) || $f_mailbox_action === 'complete_test') {
        $t_no_redirect = TRUE;
        html_page_top(plugin_lang_get('plugin_title'));
        ?>
<br /><div class="center">
<?php 
        echo plugin_lang_get($t_is_custom_error || PEAR::isError($t_result) ? 'test_failure' : 'test_success') . '<br /><br />';
        echo plugin_lang_get('description') . ': ' . $t_mailbox_api->_mailbox['description'] . '<br />';
        echo plugin_lang_get('mailbox_type') . ': ' . $t_mailbox_api->_mailbox['mailbox_type'] . '<br />';
        echo plugin_lang_get('hostname') . ': ', $t_mailbox_api->_mailbox['hostname'] . '<br />';
开发者ID:mikemol,项目名称:EmailReporting,代码行数:31,代码来源:manage_mailbox_edit.php

示例8: ERP_custom_function_print_auth_method_option_list

function ERP_custom_function_print_auth_method_option_list($p_sel_value)
{
    //require_once( 'Net/POP3.php' );
    plugin_require_api('core_pear/Net/POP3.php');
    //require_once( 'Net/IMAPProtocol.php' );
    plugin_require_api('core_pear/Net/IMAPProtocol.php');
    $t_mailbox_connection_pop3 = new Net_POP3();
    $t_mailbox_connection_imap = new Net_IMAPProtocol();
    $t_supported_auth_methods = array_unique(array_merge($t_mailbox_connection_pop3->supportedAuthMethods, $t_mailbox_connection_imap->supportedAuthMethods));
    natcasesort($t_supported_auth_methods);
    foreach ($t_supported_auth_methods as $t_supported_auth_method) {
        echo '<option';
        check_selected((string) $p_sel_value, $t_supported_auth_method);
        echo '>' . string_attribute($t_supported_auth_method) . '</option>';
    }
}
开发者ID:mikemol,项目名称:EmailReporting,代码行数:16,代码来源:config_api.php

示例9: plugin_require_api

<?php

//require_once( 'Mail/mimeDecode.php' );
plugin_require_api('core_pear/Mail/mimeDecode.php');
plugin_require_api('core/Mail/simple_html_dom.php');
class ERP_Mail_Parser
{
    private $_parse_html = FALSE;
    private $_encoding = 'UTF-8';
    private $_add_attachments = TRUE;
    private $_debug = FALSE;
    private $_show_mem_usage = FALSE;
    private $_memory_limit = FALSE;
    private $_file;
    private $_content;
    private $_from;
    private $_subject;
    private $_def_charset = 'auto';
    private $_fallback_charset = 'ASCII';
    private $_priority;
    private $_messageid;
    private $_references;
    private $_inreplyto;
    private $_body;
    private $_parts = array();
    private $_ctype = array();
    private $_cc = array();
    private $_to = array();
    private $_mb_list_encodings = array();
    /**
     * Based on horde-3.3.13 function _mbstringCharset
开发者ID:mikemol,项目名称:EmailReporting,代码行数:31,代码来源:Parser.php

示例10: ERP_update_check

 function ERP_update_check()
 {
     $t_config_version = plugin_config_get('config_version');
     if ($t_config_version === 0) {
         $t_username = plugin_config_get('mail_reporter', '');
         if (strlen($t_username) > 0) {
             $t_user_id = user_get_id_by_name($t_username);
             if ($t_user_id !== FALSE) {
                 $t_user_email = user_get_email($t_user_id);
                 if ($t_user_email === 'nomail') {
                     plugin_require_api('core/config_api.php');
                     # We need to allow blank emails for a sec
                     ERP_set_temporary_overwrite('allow_blank_email', ON);
                     user_set_email($t_user_id, '');
                 }
             }
         }
         $t_schema = plugin_config_get('schema');
         $t_reset_schema = plugin_config_get('reset_schema');
         if ($t_schema !== -1 && $t_reset_schema === 0) {
             plugin_config_set('schema', -1);
             plugin_config_set('reset_schema', 1);
         }
         plugin_config_set('config_version', 1);
     }
     if ($t_config_version <= 1) {
         $t_mail_reporter = plugin_config_get('mail_reporter', '');
         if (strlen($t_mail_reporter) > 0) {
             $t_mail_reporter_id = user_get_id_by_name($t_mail_reporter);
             plugin_config_set('mail_reporter_id', $t_mail_reporter_id);
         }
         plugin_config_delete('mail_directory');
         plugin_config_delete('mail_reporter');
         plugin_config_delete('mail_additional');
         plugin_config_delete('random_user_number');
         plugin_config_delete('mail_bug_priority_default');
         plugin_config_set('config_version', 2);
     }
     if ($t_config_version <= 2) {
         plugin_config_delete('mail_cronjob_present');
         plugin_config_delete('mail_check_timer');
         plugin_config_delete('mail_last_check');
         plugin_config_set('config_version', 3);
     }
     if ($t_config_version <= 3) {
         $t_mailboxes = plugin_config_get('mailboxes', array());
         $t_indexes = array('mailbox_project' => 'mailbox_project_id', 'mailbox_global_category' => 'mailbox_global_category_id');
         foreach ($t_mailboxes as $t_key => $t_array) {
             if (isset($t_array['mailbox_hostname'])) {
                 # Correct the hostname if it is stored in an older format
                 $t_hostname = $t_array['mailbox_hostname'];
                 if (!is_array($t_hostname)) {
                     // ipv6 also uses : so we need to work around that
                     if (substr_count($t_hostname, ':') === 1) {
                         $t_hostname = explode(':', $t_hostname, 2);
                     } else {
                         $t_hostname = array($t_hostname);
                     }
                     $t_hostname = array('hostname' => $t_hostname[0], 'port' => isset($t_hostname[1]) ? $t_hostname[1] : '');
                     $t_array['mailbox_hostname'] = $t_hostname;
                 }
             }
             $t_mailboxes[$t_key] = $this->ERP_update_indexes($t_array, $t_indexes);
         }
         plugin_config_set('mailboxes', $t_mailboxes);
         plugin_config_set('config_version', 4);
     }
     if ($t_config_version <= 4) {
         $t_mail_remove_mantis_email = plugin_config_get('mail_remove_mantis_email', -1);
         $t_mail_identify_reply = plugin_config_get('mail_identify_reply', $t_mail_remove_mantis_email);
         if ($t_mail_remove_mantis_email !== -1 && $t_mail_identify_reply !== $t_mail_remove_mantis_email) {
             plugin_config_set('mail_remove_mantis_email', $t_mail_identify_reply);
         }
         plugin_config_delete('mail_identify_reply');
         plugin_config_set('config_version', 5);
     }
     if ($t_config_version <= 5) {
         plugin_config_delete('mail_parse_mime');
         plugin_config_set('config_version', 6);
     }
     if ($t_config_version <= 6) {
         $t_mailboxes = plugin_config_get('mailboxes', array());
         $t_indexes = array('mailbox_enabled' => 'enabled', 'mailbox_description' => 'description', 'mailbox_type' => 'type', 'mailbox_hostname' => 'hostname', 'mailbox_encryption' => 'encryption', 'mailbox_username' => 'username', 'mailbox_password' => 'password', 'mailbox_auth_method' => 'auth_method', 'mailbox_project_id' => 'project_id', 'mailbox_global_category_id' => 'global_category_id', 'mailbox_basefolder' => 'basefolder', 'mailbox_createfolderstructure' => 'createfolderstructure');
         foreach ($t_mailboxes as $t_key => $t_array) {
             $t_mailboxes[$t_key] = $this->ERP_update_indexes($t_array, $t_indexes);
         }
         plugin_config_set('mailboxes', $t_mailboxes);
         plugin_config_set('config_version', 7);
     }
     if ($t_config_version <= 7) {
         $t_mailboxes = plugin_config_get('mailboxes', array());
         foreach ($t_mailboxes as $t_key => $t_array) {
             if (isset($t_array['hostname'])) {
                 $t_hostname = $t_array['hostname'];
                 if (is_array($t_hostname)) {
                     $t_array['hostname'] = $t_hostname['hostname'];
                     $t_array['port'] = $t_hostname['port'];
                 }
                 $t_mailboxes[$t_key] = $t_array;
             }
//.........这里部分代码省略.........
开发者ID:mikemol,项目名称:EmailReporting,代码行数:101,代码来源:EmailReporting.php

示例11: plugin_config_set

# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
/**
 * @package CoreAPI
 * @subpackage GraphAPI
 * @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
 */
require_once 'core.php';
if (plugin_config_get('eczlibrary') != config_get('plugin_MantisGraph_eczlibrary')) {
    plugin_config_set('eczlibrary', config_get('plugin_MantisGraph_eczlibrary'));
}
if (plugin_config_get('jpgraph_path') != config_get('plugin_MantisGraph_jpgraph_path')) {
    plugin_config_set('jpgraph_path', config_get('plugin_MantisGraph_jpgraph_path'));
}
plugin_require_api('core/graph_api.php', 'MantisGraph');
require_api('version_api.php');
require_api('history_api.php');
if (OFF == plugin_config_get('eczlibrary')) {
    $t_font_path = get_font_path();
    if ($t_font_path !== '' && !defined('TTF_DIR')) {
        define('TTF_DIR', $t_font_path);
    }
    $t_jpgraph_path = plugin_config_get('jpgraph_path');
    if ($t_jpgraph_path !== '') {
        set_include_path(get_include_path() . PATH_SEPARATOR . $t_jpgraph_path);
        $ip = get_include_path();
        require_once 'jpgraph_gantt.php';
        require_once 'jpgraph_mgraph.php';
    } else {
        require_lib('jpgraph/jpgraph_gantt.php');
开发者ID:martijnveen,项目名称:GanttChart,代码行数:31,代码来源:gantt_api.php


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