本文整理汇总了PHP中print_project_option_list函数的典型用法代码示例。如果您正苦于以下问题:PHP print_project_option_list函数的具体用法?PHP print_project_option_list怎么用?PHP print_project_option_list使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_project_option_list函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html_login_info
function html_login_info()
{
$t_username = current_user_get_field('username');
$t_access_level = get_enum_element('access_levels', current_user_get_access_level());
$t_now = date(config_get('complete_date_format'));
$t_realname = current_user_get_field('realname');
print '<table class="hide">';
print '<tr>';
print '<td class="login-info-left">';
if (current_user_is_anonymous()) {
$t_return_page = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$t_return_page .= '?' . $_SERVER['QUERY_STRING'];
}
$t_return_page = string_url($t_return_page);
print lang_get('anonymous') . ' | <a href="login_page.php?return=' . $t_return_page . '">' . lang_get('login_link') . '</a>';
if (config_get('allow_signup') == ON) {
print ' | <a href="signup_page.php">' . lang_get('signup_link') . '</a>';
}
} else {
echo lang_get('logged_in_as'), ": <span class=\"italic\">", string_display($t_username), "</span> <span class=\"small\">";
echo is_blank($t_realname) ? "({$t_access_level})" : "(" . string_display($t_realname) . " - {$t_access_level})";
echo "</span>";
}
print '</td>';
print '<td class="login-info-middle">';
print "<span class=\"italic\">{$t_now}</span>";
print '</td>';
print '<td class="login-info-right">';
print '<form method="post" name="form_set_project" action="set_project.php">';
echo lang_get('email_project'), ': ';
if (ON == config_get('show_extended_project_browser')) {
print_extended_project_browser(helper_get_current_project_trace());
} else {
if (ON == config_get('use_javascript')) {
print '<select name="project_id" class="small" onchange="document.forms.form_set_project.submit();">';
} else {
print '<select name="project_id" class="small">';
}
print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
print '</select> ';
}
print '<input type="submit" class="button-small" value="' . lang_get('switch') . '" />';
if (OFF != config_get('rss_enabled')) {
# Link to RSS issues feed for the selected project, including authentication details.
print '<a href="' . rss_get_issues_feed_url() . '">';
print '<img src="images/rss.gif" alt="' . lang_get('rss') . '" style="border-style: none; margin: 5px; vertical-align: middle;" />';
print '</a>';
}
print '</form>';
print '</td>';
print '</tr>';
print '</table>';
}
示例2: form_security_field
<fieldset>
<?php
echo form_security_field('manage_columns_copy');
?>
<input type="hidden" name="project_id" value="<?php
echo $t_project_id;
?>
" />
<input type="hidden" name="manage_page" value="<?php
echo $t_manage_page;
?>
" />
<select name="other_project_id">
<?php
print_project_option_list(null, true, $t_project_id);
?>
</select>
<?php
# Skip "Copy From" if the current project is ALL PROJECTS, the current page is management page, and the user is not administrator
if (!$t_manage_page || $t_project_id != ALL_PROJECTS || current_user_is_administrator()) {
?>
<input type="submit" name="copy_from" class="button" value="<?php
echo lang_get('copy_columns_from');
?>
" /><?php
}
?>
<input type="submit" name="copy_to" class="button" value="<?php
echo lang_get('copy_columns_to');
示例3: form_security_field
<input type="hidden" name="field_id" value="<?php
echo $f_field_id;
?>
" />
<?php
echo form_security_field('manage_custom_field_proj_add');
?>
<div class="field-container">
<label for="custom-field-project-id"><span><?php
echo lang_get('projects_title_label');
?>
</span></label>
<span class="select">
<select id="custom-field-project-id" name="project_id[]" multiple="multiple" size="5">
<?php
print_project_option_list(null, false);
?>
</select>
</span>
<span class="label-style"></span>
</div>
<div class="field-container">
<label for="custom-field-sequence"><span><?php
echo lang_get('custom_field_sequence_label');
?>
</span></label>
<span class="input"><input type="text" id="custom-field-sequence" name="sequence" value="0" /></span>
<span class="label-style"></span>
</div>
<span class="submit-button"><input type="submit" class="button" value="<?php
echo lang_get('link_custom_field_to_project_button');
示例4: check_selected
<span class="select">
<select id="config-project-id" name="project_id">
<option value="<?php
echo ALL_PROJECTS;
?>
"
<?php
check_selected($t_edit_project_id, ALL_PROJECTS);
?>
>
<?php
echo lang_get('all_projects');
?>
</option>
<?php
print_project_option_list($t_edit_project_id, false);
?>
</select>
</span>
<span class="label-style"></span>
</div>
<!-- Config option name -->
<div class="field-container">
<label for="config-option"><span><?php
echo lang_get('configuration_option');
?>
</span></label>
<span class="input">
<input type="text" name="config_option"
value="<?php
示例5: lang_get
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php
echo lang_get('post_to');
?>
</td>
<td>
<select name="project_id">
<?php
$t_sitewide = false;
if (current_user_is_administrator()) {
$t_sitewide = true;
}
print_project_option_list($v_project_id, $t_sitewide);
?>
</select>
</td>
</tr>
<tr class="row-2">
<td class="category">
<?php
echo lang_get('announcement');
?>
<br />
<span class="small"><?php
echo lang_get('stays_on_top');
?>
</span>
</td>
示例6: html_login_info
function html_login_info()
{
$t_username = current_user_get_field('username');
$t_access_level = get_enum_element('access_levels', current_user_get_access_level());
$t_now = date(config_get('complete_date_format'));
$t_realname = current_user_get_field('realname');
print '<table class="hide">';
print '<tr>';
print '<td class="login-info-left">';
if (current_user_is_anonymous()) {
if (!php_version_at_least('4.1.0')) {
global $_SERVER;
}
$t_return_page = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$t_return_page .= '?' . $_SERVER['QUERY_STRING'];
}
$t_return_page = string_url($t_return_page);
print lang_get('anonymous') . ' | <a href="login_page.php?return=' . $t_return_page . '">' . lang_get('login_link') . '</a>';
if (config_get('allow_signup') == ON) {
print ' | <a href="signup_page.php">' . lang_get('signup_link') . '</a>';
}
} else {
echo lang_get('logged_in_as'), ": <span class=\"italic\">", string_display($t_username), "</span> <span class=\"small\">";
echo is_blank($t_realname) ? "({$t_access_level})" : "(", string_display($t_realname), " - {$t_access_level})";
echo "</span>";
}
print '</td>';
print '<td class="login-info-middle">';
print "<span class=\"italic\">{$t_now}</span>";
print '</td>';
print '<td class="login-info-right">';
print '<form method="post" name="form_set_project" action="set_project.php">';
echo lang_get('email_project'), ': ';
if (ON == config_get('use_javascript')) {
print '<select name="project_id" class="small" onchange="document.forms.form_set_project.submit();">';
} else {
print '<select name="project_id" class="small">';
}
print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
print '</select> ';
print '<input type="submit" class="button-small" value="' . lang_get('switch') . '" />';
print '</form>';
print '</td>';
print '</tr>';
print '</table>';
}
示例7: print_filter_project_id
function print_filter_project_id()
{
global $t_select_modifier, $t_filter, $f_view_type;
?>
<!-- Project -->
<select <?php
print $t_select_modifier;
?>
name="project_id[]">
<option value="<?php
echo META_FILTER_CURRENT;
?>
" <?php
check_selected($t_filter['project_id'], META_FILTER_CURRENT);
?>
>[<?php
echo lang_get('current');
?>
]</option>
<?php
print_project_option_list($t_filter['project_id']);
?>
</select>
<?php
}
示例8: edit_account_prefs
function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '')
{
if (null === $p_user_id) {
$p_user_id = auth_get_current_user_id();
}
$t_redirect_url = $p_redirect_url;
if (is_blank($t_redirect_url)) {
$t_redirect_url = 'account_prefs_page.php';
}
# protected account check
if (user_is_protected($p_user_id)) {
if ($p_error_if_protected) {
trigger_error(ERROR_PROTECTED_ACCOUNT, ERROR);
} else {
return;
}
}
if (!user_pref_exists($p_user_id)) {
user_pref_set_default($p_user_id);
}
# prefix data with u_
$t_pref = user_pref_get($p_user_id);
# Account Preferences Form BEGIN
?>
<br />
<div align="center">
<form method="post" action="account_prefs_update.php">
<input type="hidden" name="user_id" value="<?php
echo $p_user_id;
?>
" />
<input type="hidden" name="redirect_url" value="<?php
echo $t_redirect_url;
?>
" />
<table class="width75" cellspacing="1">
<tr>
<td class="form-title">
<?php
echo lang_get('default_account_preferences_title');
?>
</td>
<td class="right">
<?php
if ($p_accounts_menu) {
print_account_menu('account_prefs_page.php');
}
?>
</td>
</tr>
<tr class="row-1">
<td class="category" width="50%">
<?php
echo lang_get('default_project');
?>
</td>
<td width="50%">
<select name="default_project">
<?php
print_project_option_list($t_pref->default_project);
?>
</select>
</td>
</tr>
<tr class="row-2">
<td class="category">
<?php
echo lang_get('advanced_report');
?>
</td>
<td>
<input type="checkbox" name="advanced_report" <?php
check_checked($t_pref->advanced_report, ON);
?>
/>
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php
echo lang_get('advanced_view');
?>
</td>
<td>
<input type="checkbox" name="advanced_view" <?php
check_checked($t_pref->advanced_view, ON);
?>
/>
</td>
</tr>
<tr class="row-2">
<td class="category">
<?php
echo lang_get('advanced_update');
?>
</td>
<td>
<input type="checkbox" name="advanced_update" <?php
check_checked($t_pref->advanced_update, ON);
?>
//.........这里部分代码省略.........
示例9: lang_get
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php
echo lang_get('post_to');
?>
</td>
<td>
<select name="project_id">
<?php
$t_sitewide = false;
if (access_has_project_level(MANAGER)) {
$t_sitewide = true;
}
print_project_option_list(helper_get_current_project(), $t_sitewide);
?>
</select>
</td>
</tr>
<tr>
<td class="center" colspan="2">
<input type="submit" value="<?php
echo plugin_lang_get('post_faq_button');
?>
">
</td>
</tr>
</table>
</form>
</div>
示例10: helper_alternate_class
echo helper_alternate_class();
?>
valign="top">
<td>
<?php
echo lang_get('project_name');
?>
</td>
<td>
<select name="project_id">
<option value="0" selected="selected"><?php
echo lang_get('all_projects');
?>
</option>
<?php
print_project_option_list(ALL_PROJECTS, false);
?>
</select>
</td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
valign="top">
<td>
<?php
echo lang_get('configuration_option');
?>
</td>
<td>
<input type="text" name="config_option" value="" size="64" maxlength="64" />
示例11: lang_get
?>
>
<td class="category" width="60%">
<?php
echo lang_get('reminder_feedback_project_name');
?>
</td>
<td width="20%">
<select name="reminder_feedback_project">
<option value="0" ><?php
echo lang_get('all_projects');
?>
</option>
<?php
$t_value = plugin_config_get('reminder_feedback_project');
print_project_option_list($t_value, FALSE, NULL, FALSE);
?>
</select>
</td>
</td><td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category" width="60%">
<?php
echo lang_get('reminder_feedback_status');
?>
</td>
示例12: edit_account_prefs
function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '')
{
if (null === $p_user_id) {
$p_user_id = auth_get_current_user_id();
}
$t_redirect_url = $p_redirect_url;
if (is_blank($t_redirect_url)) {
$t_redirect_url = 'account_prefs_page.php';
}
# protected account check
if (user_is_protected($p_user_id)) {
if ($p_error_if_protected) {
trigger_error(ERROR_PROTECTED_ACCOUNT, ERROR);
} else {
return;
}
}
# prefix data with u_
$t_pref = user_pref_get($p_user_id);
# Account Preferences Form BEGIN
?>
<br />
<div align="center">
<form method="post" action="account_prefs_update.php">
<?php
echo form_security_field('account_prefs_update');
?>
<input type="hidden" name="user_id" value="<?php
echo $p_user_id;
?>
" />
<input type="hidden" name="redirect_url" value="<?php
echo $t_redirect_url;
?>
" />
<table class="width75" cellspacing="1">
<tr>
<td class="form-title">
<?php
echo lang_get('default_account_preferences_title');
?>
</td>
<td class="right">
<?php
if ($p_accounts_menu) {
print_account_menu('account_prefs_page.php');
}
?>
</td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category" width="50%">
<?php
echo lang_get('default_project');
?>
</td>
<td width="50%">
<select name="default_project">
<?php
# Count number of available projects
$t_projects = current_user_get_accessible_projects();
$t_num_proj = count($t_projects);
if ($t_num_proj == 1) {
$t_num_proj += count(current_user_get_accessible_subprojects($t_projects[0]));
}
# Don't display "All projects" in selection list if there is only 1
print_project_option_list($t_pref->default_project, $t_num_proj != 1);
?>
</select>
</td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('refresh_delay');
?>
</td>
<td>
<input type="text" name="refresh_delay" size="4" maxlength="4" value="<?php
echo $t_pref->refresh_delay;
?>
" /> <?php
echo lang_get('minutes');
?>
</td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('redirect_delay');
?>
//.........这里部分代码省略.........
示例13: helper_alternate_class
echo helper_alternate_class();
?>
>
<td class="category" width="60%">
<?php
echo plugin_lang_get('project_name');
?>
</td>
<td width="20%">
<select name="customid_project_id">
<option value="0" selected="selected"><?php
echo lang_get('all_projects');
?>
</option>
<?php
print_project_option_list(plugin_config_get('project_id'), false);
?>
</select>
</td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category" width="60%">
<?php
echo lang_get('custom_field');
?>
</td>
<td width="20%">
示例14: form_security_field
</tr>
</form>
<!-- Copy Users Form -->
<form method="post" action="manage_proj_user_copy.php">
<?php
echo form_security_field('manage_proj_user_copy');
?>
<tr>
<td class="left" colspan="3">
<input type="hidden" name="project_id" value="<?php
echo $f_project_id;
?>
" />
<select name="other_project_id">
<?php
print_project_option_list(null, false, $f_project_id);
?>
</select>
<input type="submit" name="copy_from" class="button" value="<?php
echo lang_get('copy_users_from');
?>
" />
<input type="submit" name="copy_to" class="button" value="<?php
echo lang_get('copy_users_to');
?>
" />
</td>
</tr>
</form>
</table>
</div>
示例15: html_login_info
/**
* (10) Print the user's account information
* Also print the select box where users can switch projects
* @return void
*/
function html_login_info()
{
$t_username = current_user_get_field('username');
$t_access_level = get_enum_element('access_levels', current_user_get_access_level());
$t_now = date(config_get('complete_date_format'));
$t_realname = current_user_get_field('realname');
# Login information
echo '<div id="login-info">' . "\n";
if (current_user_is_anonymous()) {
$t_return_page = $_SERVER['SCRIPT_NAME'];
if (isset($_SERVER['QUERY_STRING'])) {
$t_return_page .= '?' . $_SERVER['QUERY_STRING'];
}
$t_return_page = string_url($t_return_page);
echo "\t" . '<span id="logged-anon-label">' . lang_get('anonymous') . '</span>' . "\n";
echo "\t" . '<span id="login-link"><a href="' . helper_mantis_url('login_page.php?return=' . $t_return_page) . '">' . lang_get('login_link') . '</a></span>' . "\n";
if (config_get_global('allow_signup') == ON) {
echo "\t" . '<span id="signup-link"><a href="' . helper_mantis_url('signup_page.php') . '">' . lang_get('signup_link') . '</a></span>' . "\n";
}
} else {
echo "\t" . '<span id="logged-in-label">' . lang_get('logged_in_as') . '</span>' . "\n";
echo "\t" . '<span id="logged-in-user">' . string_html_specialchars($t_username) . '</span>' . "\n";
echo "\t" . '<span id="logged-in">';
echo !is_blank($t_realname) ? "\t" . '<span id="logged-in-realname">' . string_html_specialchars($t_realname) . '</span>' . "\n" : '';
echo "\t" . '<span id="logged-in-accesslevel" class="' . $t_access_level . '">' . $t_access_level . '</span>' . "\n";
echo "\t" . '</span>' . "\n";
}
echo '</div>' . "\n";
# RSS feed
if (OFF != config_get('rss_enabled')) {
echo '<div id="rss-feed">' . "\n";
# Link to RSS issues feed for the selected project, including authentication details.
echo "\t" . '<a href="' . htmlspecialchars(rss_get_issues_feed_url()) . '">' . "\n";
echo "\t" . '<img src="' . helper_mantis_url('images/rss.png') . '" alt="' . lang_get('rss') . '" title="' . lang_get('rss') . '" />' . "\n";
echo "\t" . '</a>' . "\n";
echo '</div>' . "\n";
}
# Project Selector (hidden if only one project visisble to user)
$t_show_project_selector = true;
$t_project_ids = current_user_get_accessible_projects();
if (count($t_project_ids) == 1) {
$t_project_id = (int) $t_project_ids[0];
if (count(current_user_get_accessible_subprojects($t_project_id)) == 0) {
$t_show_project_selector = false;
}
}
if ($t_show_project_selector) {
echo '<div id="project-selector-div">';
echo '<form method="post" id="form-set-project" action="' . helper_mantis_url('set_project.php') . '">';
echo '<fieldset id="project-selector">';
# CSRF protection not required here - form does not result in modifications
echo '<label for="form-set-project-id">' . lang_get('email_project') . '</label>';
echo '<select id="form-set-project-id" name="project_id">';
print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
echo '</select> ';
echo '<input type="submit" class="button" value="' . lang_get('switch') . '" />';
echo '</fieldset>';
echo '</form>';
echo '</div>';
} else {
# User has only one project, set it as both current and default
if (ALL_PROJECTS == helper_get_current_project()) {
helper_set_current_project($t_project_id);
if (!current_user_is_protected()) {
current_user_set_default_project($t_project_id);
}
# Force reload of current page, except if we got here after
# creating the first project
$t_redirect_url = str_replace(config_get('short_path'), '', $_SERVER['REQUEST_URI']);
if ('manage_proj_create.php' != $t_redirect_url) {
html_meta_redirect($t_redirect_url, 0, false);
}
}
}
# Current time
echo '<div id="current-time">' . $t_now . '</div>';
}