本文整理汇总了PHP中plugin_page函数的典型用法代码示例。如果您正苦于以下问题:PHP plugin_page函数的具体用法?PHP plugin_page怎么用?PHP plugin_page使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plugin_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: export_issues_menu
/**
* Export Issues Menu
* @return array
*/
function export_issues_menu()
{
if (!access_has_project_level(plugin_config_get('export_threshold'))) {
return array();
}
return array('<a href="' . plugin_page('export') . '">' . plugin_lang_get('export') . '</a>');
}
示例2: kanban_ajax_button_bug_change_status
/**
* Print Change Status to: AJAXified button
* This code is similar to button_bug_change_status except that the
* button is AJAXified.
* Uses projax.php
*
* @param int $p_bug_id
* @param int $t_project_id
* @param int $t_user_id
* @return null
*/
function kanban_ajax_button_bug_change_status($p_bug_id, $t_project_id, $t_user_id)
{
global $g_projax;
$t_bug_project_id = bug_get_field($p_bug_id, 'project_id');
$t_bug_current_state = bug_get_field($p_bug_id, 'status');
$t_current_access = access_get_project_level($t_bug_project_id);
$t_enum_list = get_status_option_list($t_current_access, $t_bug_current_state, false, bug_get_field($p_bug_id, 'reporter_id') == auth_get_current_user_id() && ON == config_get('allow_reporter_close'), $t_bug_project_id);
if (count($t_enum_list) > 0) {
# resort the list into ascending order after noting the key from the first element (the default)
$t_default_arr = each($t_enum_list);
$t_default = $t_default_arr['key'];
ksort($t_enum_list);
reset($t_enum_list);
echo "<div id=\"ajax_statuschange\"><form method=\"post\" id=\"ajax_status_form\" action=\"xmlhttprequest.php\">";
# CSRF protection not required here - form does not result in modifications
echo "<input type=\"hidden\" name=\"project_id\" id=\"project_id\" value=\"{$t_project_id}\" />";
echo "<input type=\"hidden\" name=\"user_id\" id=\"user_id\" value=\"{$t_user_id}\" />";
echo "<input type=\"hidden\" name=\"entrypoint\" id=\"entrypoint\" value=\"bug_update_status\" />";
$t_button_text = lang_get('bug_status_to_button');
// AJAX button options
$options = array('url' => plugin_page('kanban_ajax_request'), 'with' => true, 'confirm' => lang_get('confirm_change_status'), 'success' => 'location.reload()', 'failure' => 'alert("Error: " ' + request . status + ')');
echo $g_projax->submit_to_remote('ajax_status', $t_button_text, $options);
echo " <select name=\"new_status\">";
# space at beginning of line is important
foreach ($t_enum_list as $key => $val) {
echo "<option value=\"{$key}\" ";
check_selected($key, $t_default);
echo ">{$val}</option>";
}
echo '</select>';
$t_bug_id = string_attribute($p_bug_id);
echo "<input type=\"hidden\" name=\"id\" value=\"{$t_bug_id}\" />\n";
echo "</form></div>\n";
}
}
示例3: menu
/**
* If the whiteboard menu plugin isnt installed, show the storyboard menu instead
*
* @return null|string
*/
function menu()
{
if (!plugin_is_installed('WhiteboardMenu') && plugin_config_get('ShowMenu') && $this->getUserHasLevel()) {
return '<a href="' . plugin_page('storyboard_index') . '">' . plugin_lang_get('menu_title') . '</a>';
}
return null;
}
示例4: menu
public function menu($event)
{
$links = array();
$links[] = '<a href="' . plugin_page("board") . '">' . plugin_lang_get("board") . '</a>';
return $links;
}
示例5: menu_manage
public function menu_manage($event, $user_id)
{
if (access_has_global_level(plugin_config_get("manage_customers_threshold"))) {
$page = plugin_page("manage_customers");
$label = plugin_lang_get("manage_customers");
return '<a href="' . string_html_specialchars($page) . '">' . $label . '</a>';
}
}
示例6: menu
function menu()
{
require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'userprojectapi.php';
if (!userprojectapi::checkPluginIsRegisteredInWhiteboardMenu()) {
userprojectapi::addPluginToWhiteboardMenu();
}
if ((!plugin_is_installed('WhiteboardMenu') || !file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) && plugin_config_get('ShowMenu') && $this->getUserHasLevel()) {
return '<a href="' . plugin_page('UserProject') . '&sortVal=userName&sort=ASC">' . plugin_lang_get('menu_title') . '</a>';
}
return null;
}
示例7: menu_main
function menu_main()
{
$t_links = array();
if (plugin_config_get('show_repo_link')) {
$t_page = plugin_page('index', false, 'Source');
$t_lang = plugin_lang_get('repositories', 'Source');
$t_links[] = "<a href=\"{$t_page}\">{$t_lang}</a>";
}
if (plugin_config_get('show_search_link')) {
$t_page = plugin_page('search_page', false, 'Source');
$t_lang = plugin_lang_get('search', 'Source');
$t_links[] = "<a href=\"{$t_page}\">{$t_lang}</a>";
}
return $t_links;
}
示例8: print_tablefooter
function print_tablefooter()
{
$specmanagement_authorization_api = new specmanagement_authorization_api();
if ($specmanagement_authorization_api->userHasGlobalLevel() || $specmanagement_authorization_api->userHasWriteLevel()) {
echo '<tr>';
echo '<td colspan="' . COLS . '" class="center">';
echo '<form action="' . plugin_page('manage_types') . '" method="post">';
echo '<span class="input">';
echo '<input type="submit" name="to_plugin_config" class="button" value="' . plugin_lang_get('mantypes_to_pl_cfg') . '"/> ';
echo '<input type="submit" name="edit" class="button" value="' . plugin_lang_get('mantypes_edit') . '"/>';
echo '</span>';
echo '</td>';
echo '</tr>';
}
}
示例9: worklogmenu
function worklogmenu()
{
if (ON == plugin_config_get('promote_text')) {
$bugid = gpc_get_int('id');
if (access_has_bug_level(plugin_config_get('promote_threshold'), $bugid)) {
$t_bug_p = bug_get($bugid, true);
if (OFF == plugin_config_get('project_text')) {
$proj_id = 0;
} else {
$proj_id = $t_bug_p->project_id;
}
$subject = urlencode($t_bug_p->description);
$subject .= " ";
$subject .= urlencode($t_bug_p->additional_information);
$content = category_full_name($t_bug_p->category_id);
$content .= " -> ";
$content .= urlencode($t_bug_p->summary);
if (ON == plugin_config_get('worklog_view_check')) {
$import_page = 'worklog_add_page2.php';
} else {
$import_page = 'worklog_add.php';
}
$import_page .= '&log_type=0&';
$import_page .= '&ref_log_ids=';
$import_page .= '&ref_issue_ids=';
$import_page .= '&log_begin=';
$import_page .= '&log_end=';
$import_page .= '&content=';
$import_page .= $content;
$import_page .= '&subject=';
$import_page .= $subject;
$import_page .= '&project_id=';
$import_page .= $proj_id;
if (ON == plugin_config_get('worklog_view_check')) {
return array(plugin_lang_get('import_worklog') => plugin_page($import_page) . '" target=_new>');
} else {
return array(plugin_lang_get('import_worklog') => plugin_page($import_page));
}
}
}
}
示例10: calculate_page_content
function calculate_page_content()
{
$specmanagement_database_api = new specmanagement_database_api();
$specmanagement_print_api = new specmanagement_print_api();
$types = array();
$types_rows = $specmanagement_database_api->get_full_types();
foreach ($types_rows as $types_row) {
$types[] = $types_row[1];
}
html_page_top1(plugin_lang_get('select_doc_title'));
echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
html_page_top2();
// if ( plugin_is_installed( 'WhiteboardMenu' ) && file_exists ( config_get_global ( 'plugin_path' ) . 'WhiteboardMenu' ) )
// {
// require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
// $whiteboard_print_api = new whiteboard_print_api();
// $whiteboard_print_api->printWhiteboardMenu();
// }
if (project_includes_user(helper_get_current_project(), auth_get_current_user_id()) || helper_get_current_project() == 0 || user_is_administrator(auth_get_current_user_id())) {
echo '<div align="center">';
echo '<hr size="1" width="50%" />';
$specmanagement_print_api->printTableTop('50');
$specmanagement_print_api->printFormTitle(2, 'menu_title');
$specmanagement_print_api->printCategoryField(1, 1, 'select_type');
echo '<td>';
echo '<form method="post" name="form_set_source" action="' . plugin_page('editor') . '">';
print_document_selection($types);
$specmanagement_print_api->printRow();
echo '<td class="center" colspan="2">';
echo '<input type="submit" name="formSubmit" class="button" value="' . plugin_lang_get('select_confirm') . '"/>';
echo '</td>';
echo '</tr>';
echo '</form>';
echo '</td>';
$specmanagement_print_api->printTableFoot();
} else {
echo '<table class="width60"><tr><td class="center">' . lang_get('access_denied') . '</td></tr></table>';
}
html_page_bottom1();
}
示例11: menu
function menu()
{
if (plugin_config_get('show_menu')) {
require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'wmApi.php';
$projectId = helper_get_current_project();
$userId = auth_get_current_user_id();
$userAccessLevel = user_get_access_level($userId, $projectId);
$whiteboardPlugins = wmApi::getWhiteboardPlugins();
$showMenu = false;
foreach ($whiteboardPlugins as $whiteboardPlugin) {
$pluginAccessLevel = $whiteboardPlugin[2];
if (user_is_administrator($userId) || $userAccessLevel >= $pluginAccessLevel) {
$showMenu = true;
break;
}
}
if ($showMenu) {
return '<a href="' . plugin_page('whiteboard_menu') . '">' . plugin_lang_get('menu_title') . '</a>';
}
}
return null;
}
示例12: faqmenu
function faqmenu()
{
if (ON == plugin_config_get('promote_text')) {
$bugid = gpc_get_int('id');
if (access_has_bug_level(plugin_config_get('promote_threshold'), $bugid)) {
$t_bug_p = bug_get($bugid, true);
if (OFF == plugin_config_get('project_text')) {
$proj_id = 0;
} else {
$proj_id = $t_bug_p->project_id;
}
$answer = urlencode($t_bug_p->description);
$answer .= " ";
$answer .= urlencode($t_bug_p->additional_information);
$question = category_full_name($t_bug_p->category_id);
$question .= " -> ";
$question .= urlencode($t_bug_p->summary);
if (ON == plugin_config_get('faq_view_check')) {
$import_page = 'faq_add_page2.php';
} else {
$import_page = 'faq_add.php';
}
$import_page .= '&question=';
$import_page .= $question;
$import_page .= '&answere=';
$import_page .= $answer;
$import_page .= '&project_id=';
$import_page .= $proj_id;
if (ON == plugin_config_get('faq_view_check')) {
return array(plugin_lang_get('import_faq') => plugin_page($import_page) . '" target=_new>');
} else {
return array(plugin_lang_get('import_faq') => plugin_page($import_page));
}
}
}
}
示例13: token_set
$t_token = token_set( TOKEN_GRAPH, serialize( $t_metrics ) );
?>
<br />
<table class="width100" cellspacing="1">
<tr>
<td class="form-title">
<?php echo plugin_lang_get( 'graph_imp_resolution_title' ) ?>
</td>
</tr>
<tr>
<td class="center">
<img src="<?php echo plugin_page( 'summary_graph_byresolution.php')?>&width=<?php echo $t_graph_width?>" alt="" />
</td>
</tr>
<tr>
<td class="center">
<img src="<?php echo plugin_page( 'summary_graph_byresolution_pct.php')?>&width=<?php echo $t_graph_width?>" alt="" />
</td>
</tr>
<tr>
<td class="center">
<img src="<?php echo plugin_page( 'summary_graph_byresolution_mix.php')?>&width=<?php echo $t_graph_width?>" alt="" />
</td>
</tr>
</table>
<?php
html_page_bottom();
示例14: manage_usergroups_menu
function manage_usergroups_menu()
{
return array('<a href="' . plugin_page('manage_usergroups') . '">' . plugin_lang_get('manage_groups') . '</a>');
}
示例15: plugin_lang_get
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';
} else {
echo '<br /><img src="' . plugin_page('bug_graph_bycategory.php') . '&width=600&interval=' . $f_interval . '&start_date=' . $f_start . '&end_date=' . $f_end . '&summary=' . $t_summary . '&show_table=0" alt="Bug Graph" />';
}
}
}
html_page_bottom();