本文整理汇总了PHP中collapse_open函数的典型用法代码示例。如果您正苦于以下问题:PHP collapse_open函数的具体用法?PHP collapse_open怎么用?PHP collapse_open使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了collapse_open函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_bug
function display_bug($p_event, $p_bug_id)
{
require_once 'Source.ViewAPI.php';
$t_project_id = bug_get_field($p_bug_id, 'project_id');
$t_view_threshold = config_get('plugin_Source_view_threshold');
if (!access_has_project_level($t_view_threshold, $t_project_id)) {
return;
}
$t_changesets = $this->changesets;
if (count($t_changesets) < 1) {
return;
}
collapse_open('Source');
?>
<br/>
<a name="changesets"/>
<table class="width100" cellspacing="1">
<tr>
<td class="form-title"><?php
collapse_icon('Source');
echo plugin_lang_get('related_changesets', 'Source');
?>
</td>
</tr>
<?php
Source_View_Changesets($t_changesets);
?>
</table>
<?php
collapse_closed('Source');
?>
<br/>
<table class="width100" cellspacing="1">
<tr>
<td class="form-title"><?php
collapse_icon('Source');
echo plugin_lang_get('related_changesets', 'Source');
?>
</td>
</tr>
</table>
<?php
collapse_end('Source');
}
示例2: print_profile_option_list
<?php
print_profile_option_list(auth_get_current_user_id(), $f_profile_id);
?>
</select>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2" class="none">
<?php
if (ON == config_get('use_javascript')) {
?>
<?php
collapse_open('profile');
collapse_icon('profile');
?>
<?php
echo lang_get('or_fill_in');
?>
<table class="width100" cellspacing="0">
<?php
} else {
?>
<?php
echo lang_get('or_fill_in');
?>
<?php
}
?>
示例3: filter_draw_selection_area
/**
* Mainly based on filter_draw_selection_area2() but adds the support for the collapsible
* filter display.
* @param integer $p_page_number Page number.
* @param boolean $p_for_screen Whether output is for screen view.
* @return void
* @see filter_draw_selection_area2
*/
function filter_draw_selection_area($p_page_number, $p_for_screen = true)
{
collapse_open('filter');
filter_draw_selection_area2($p_page_number, $p_for_screen, true);
collapse_closed('filter');
filter_draw_selection_area2($p_page_number, $p_for_screen, false);
collapse_end('filter');
}
示例4: relationship_view_box
/**
* print HTML relationship form
* @param integer $p_bug_id A bug identifier.
* @return void
*/
function relationship_view_box($p_bug_id)
{
?>
<br/>
<?php
collapse_open('relationships');
?>
<table class="width100" cellspacing="1">
<tr class="row-2">
<td width="15%" class="form-title" colspan="2">
<?php
collapse_icon('relationships');
echo lang_get('bug_relationships');
if (ON == config_get('relationship_graph_enable')) {
?>
<span class="small"><?php
print_bracket_link('bug_relationship_graph.php?bug_id=' . $p_bug_id . '&graph=relation', lang_get('relation_graph'));
?>
</span>
<span class="small"><?php
print_bracket_link('bug_relationship_graph.php?bug_id=' . $p_bug_id . '&graph=dependency', lang_get('dependency_graph'));
?>
</span>
<?php
}
?>
</td>
</tr>
<?php
# bug not read-only and user authenticated
if (!bug_is_readonly($p_bug_id)) {
# user access level at least updater
if (access_has_bug_level(config_get('update_bug_threshold'), $p_bug_id)) {
?>
<tr class="row-1">
<th class="category"><?php
echo lang_get('add_new_relationship');
?>
</th>
<td><?php
echo lang_get('this_bug');
?>
<form method="post" action="bug_relationship_add.php">
<?php
echo form_security_field('bug_relationship_add');
?>
<input type="hidden" name="src_bug_id" value="<?php
echo $p_bug_id;
?>
" size="4" />
<?php
relationship_list_box(config_get('default_bug_relationship'));
?>
<input type="text" name="dest_bug_id" value="" />
<input type="submit" name="add_relationship" class="button" value="<?php
echo lang_get('add_new_relationship_button');
?>
" />
</form>
</td></tr>
<?php
}
}
?>
<tr>
<td colspan="2"><?php
echo relationship_get_summary_html($p_bug_id);
?>
</td>
</tr>
</table>
<?php
collapse_closed('relationships');
?>
<table class="width100" cellspacing="1">
<tr>
<td class="form-title">
<?php
collapse_icon('relationships');
echo lang_get('bug_relationships');
?>
</td>
</tr>
</table>
<?php
collapse_end('relationships');
}
示例5: array
#precache users
$t_bugnote_users = array();
foreach ($t_bugnotes as $t_bugnote) {
$t_bugnote_users[] = $t_bugnote->reporter_id;
}
user_cache_array_rows($t_bugnote_users);
$num_notes = count($t_bugnotes);
?>
<?php
# Bugnotes BEGIN
?>
<a id="bugnotes"></a><br />
<?php
collapse_open('bugnotes');
?>
<table class="bugnotes width100" cellspacing="1">
<tr>
<td class="form-title" colspan="2">
<?php
collapse_icon('bugnotes');
?>
<?php
echo lang_get('bug_notes_title');
?>
</td>
</tr>
<?php
# no bugnotes
if (0 == $num_notes) {
示例6: count
$t_sponsorships_exist = count($t_sponsorship_ids) > 0;
$t_can_sponsor = !bug_is_readonly($f_bug_id) && !current_user_is_anonymous();
$t_show_sponsorships = $t_sponsorships_exist || $t_can_sponsor;
} else {
$t_show_sponsorships = false;
}
#
# Sponsorship Box
#
if ($t_show_sponsorships) {
?>
<a id="sponsorships"></a> <br />
<?php
collapse_open('sponsorship');
?>
<table class="width100" cellspacing="1">
<tr>
<td width="50" rowspan="3">
<img src="images/dollars.gif" alt="<?php
echo lang_get('sponsor_verb');
?>
" />
</td>
<td class="form-title" colspan="2">
<?php
collapse_icon('sponsorship');
echo lang_get('users_sponsoring_bug');
$t_details_url = lang_get('sponsorship_process_url');
示例7: require_api
require_api('config_api.php');
require_api('constant_inc.php');
require_api('filter_api.php');
require_api('gpc_api.php');
require_api('helper_api.php');
require_api('lang_api.php');
require_api('utility_api.php');
if (OFF == config_get('time_tracking_enabled')) {
return;
}
?>
<a id="bugnotestats"></a><br />
<?php
collapse_open('bugnotestats');
$t_bugnote_stats_from_def = date("d:m:Y", $tpl_bug->date_submitted);
$t_bugnote_stats_from_def_ar = explode(":", $t_bugnote_stats_from_def);
$t_bugnote_stats_from_def_d = $t_bugnote_stats_from_def_ar[0];
$t_bugnote_stats_from_def_m = $t_bugnote_stats_from_def_ar[1];
$t_bugnote_stats_from_def_y = $t_bugnote_stats_from_def_ar[2];
$t_bugnote_stats_from_d = gpc_get_string('start_day', $t_bugnote_stats_from_def_d);
$t_bugnote_stats_from_m = gpc_get_string('start_month', $t_bugnote_stats_from_def_m);
$t_bugnote_stats_from_y = gpc_get_string('start_year', $t_bugnote_stats_from_def_y);
$t_bugnote_stats_to_def = date("d:m:Y");
$t_bugnote_stats_to_def_ar = explode(":", $t_bugnote_stats_to_def);
$t_bugnote_stats_to_def_d = $t_bugnote_stats_to_def_ar[0];
$t_bugnote_stats_to_def_m = $t_bugnote_stats_to_def_ar[1];
$t_bugnote_stats_to_def_y = $t_bugnote_stats_to_def_ar[2];
$t_bugnote_stats_to_d = gpc_get_string('end_day', $t_bugnote_stats_to_def_d);
$t_bugnote_stats_to_m = gpc_get_string('end_month', $t_bugnote_stats_to_def_m);
示例8: str_replace
// get user id
$query = str_replace('%value%', $f_bug_id, $reporterIdQuery);
$result = $proxyMySql->query($query);
$userId = $result->fetch_object()->reporter_id;
// load data
$query = str_replace('%value%', $userId, $existMedicalRecordQuery);
$medicalRecord = new stdClass();
$result = $proxyMySql->query($query);
if ($data = $result->fetch_object()) {
$medicalRecord->date_of_birth = $data->date_of_birth;
$medicalRecord->sex = $data->sex;
$medicalRecord->records = $data->records;
$medicalRecord->observations = $data->observations;
}
echo '<br />';
collapse_open('medical_record_form');
?>
<form method="post" action="bug_user_medical_record_view.php">
<table class="width100" cellspacing="1">
<!-- Title -->
<tr>
<td class="form-title" colspan="2">
<?php
collapse_icon('medical_record_form');
echo lang_get('medical_record');
?>
</td>
</tr>
<!-- Date of Birth -->
<tr <?php
示例9: require_api
require_api( 'file_api.php' );
require_api( 'form_api.php' );
require_api( 'lang_api.php' );
require_api( 'utility_api.php' );
# check if we can allow the upload... bail out if we can't
if ( !file_allow_bug_upload( $f_bug_id ) ) {
return false;
}
$t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
?>
<br />
<?php
collapse_open( 'upload_form' );
?>
<form method="post" enctype="multipart/form-data" action="bug_file_add.php">
<?php echo form_security_field( 'bug_file_add' ) ?>
<table class="width100" cellspacing="1">
<tr>
<td class="form-title" colspan="2">
<?php
collapse_icon( 'upload_form' );
echo lang_get( 'upload_file' ) ?>
</td>
</tr>
<tr class="row-1">
<td class="category" width="15%">
<?php echo lang_get( 'select_file' ) ?><br />
示例10: require_api
require_api( 'helper_api.php' );
require_api( 'history_api.php' );
require_api( 'lang_api.php' );
require_api( 'print_api.php' );
require_api( 'string_api.php' );
$t_access_level_needed = config_get( 'view_history_threshold' );
if ( !access_has_bug_level( $t_access_level_needed, $f_bug_id ) ) {
return;
}
?>
<a id="history"></a><br />
<?php
collapse_open( 'history' );
$t_history = history_get_events_array( $f_bug_id );
?>
<table class="width100" cellspacing="0">
<tr>
<td class="form-title" colspan="4">
<?php
collapse_icon( 'history' );
echo lang_get( 'bug_history' ) ?>
</td>
</tr>
<tr class="row-category-history">
<td class="small-caption">
<?php echo lang_get( 'date_modified' ) ?>
</td>
<td class="small-caption">
示例11: collapse_open
#
# 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 - 2012 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
if (!bug_is_readonly($f_bug_id) && access_has_bug_level(config_get('add_bugnote_threshold'), $f_bug_id)) {
# Bugnote Add Form BEGIN
?>
<a name="addbugnote"></a> <br />
<?php
collapse_open('bugnote_add');
?>
<form name="bugnoteadd" method="post" action="bugnote_add.php">
<?php
echo form_security_field('bugnote_add');
?>
<input type="hidden" name="bug_id" value="<?php
echo $f_bug_id;
?>
" />
<table class="width100" cellspacing="1">
<tr>
<td class="form-title" colspan="2">
<?php
collapse_icon('bugnote_add');
echo lang_get('add_bugnote_title');
示例12: require_api
require_api('bug_api.php');
require_api('collapse_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('event_api.php');
require_api('form_api.php');
require_api('helper_api.php');
require_api('html_api.php');
require_api('lang_api.php');
if (!bug_is_readonly($f_bug_id) && access_has_bug_level(config_get('add_bugnote_threshold'), $f_bug_id)) {
# Bugnote Add Form BEGIN
?>
<a id="addbugnote"></a> <br />
<?php
collapse_open('bugnote_add', '', 'form-container');
?>
<form id="bugnoteadd" method="post" action="bugnote_add.php" enctype="multipart/form-data">
<?php
echo form_security_field('bugnote_add');
?>
<input type="hidden" name="bug_id" value="<?php
echo $f_bug_id;
?>
" />
<table>
<thead>
<tr>
<td class="form-title" colspan="2"><?php
collapse_icon('bugnote_add');
echo lang_get('add_bugnote_title');
示例13: print_bug_attachment
/**
* Prints information about a single attachment including download link, file
* size, upload timestamp and an expandable preview for text and image file
* types.
* If $p_security_token is null, a token will be generated with form_security_token().
* If otherwise specified (i.e. not null), the parameter must contain
* a valid security token, previously generated by form_security_token().
* Use this to avoid performance issues when loading pages having many calls to
* this function, such as print_bug_attachments_list().
* @param array $p_attachment An attachment array from within the array returned by the file_get_visible_attachments() function.
* @param mixed $p_security_token Optional; null (default) or security token string.
* @see form_security_token()
* @return void
*/
function print_bug_attachment(array $p_attachment, $p_security_token = null)
{
$t_show_attachment_preview = $p_attachment['preview'] && $p_attachment['exists'] && ($p_attachment['type'] == 'text' || $p_attachment['type'] == 'image');
if ($t_show_attachment_preview) {
$t_collapse_id = 'attachment_preview_' . $p_attachment['id'];
global $g_collapse_cache_token;
$g_collapse_cache_token[$t_collapse_id] = false;
collapse_open($t_collapse_id);
}
# The same token is used for both links in the collapse section
if (null === $p_security_token) {
$p_security_token = form_security_token('bug_file_delete');
}
print_bug_attachment_header($p_attachment, $p_security_token);
if ($t_show_attachment_preview) {
echo lang_get('word_separator');
collapse_icon($t_collapse_id);
if ($p_attachment['type'] == 'text') {
print_bug_attachment_preview_text($p_attachment);
} else {
if ($p_attachment['type'] === 'image') {
print_bug_attachment_preview_image($p_attachment);
}
}
collapse_closed($t_collapse_id);
print_bug_attachment_header($p_attachment, $p_security_token);
echo lang_get('word_separator');
collapse_icon($t_collapse_id);
collapse_end($t_collapse_id);
}
}
示例14: lang_get
<div class="field-container">
<label><span><?php echo lang_get( 'select_profile' ) ?></span></label>
<span class="select">
<?php if( count( profile_get_all_for_user( auth_get_current_user_id() ) ) > 0 ) { ?>
<select <?php echo helper_get_tab_index() ?> id="profile_id" name="profile_id">
<?php print_profile_option_list( auth_get_current_user_id(), $f_profile_id ) ?>
</select>
<?php } ?>
<?php collapse_icon( 'profile' ); ?>
<?php echo lang_get( 'or_fill_in' ); ?>
</span>
<span class="label-style"></span>
</div>
<?php collapse_open( 'profile' ); ?>
<div class="field-container">
<label><span><?php echo lang_get( 'platform' ) ?></span></label>
<span class="input">
<?php if( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) { ?>
<select id="platform" name="platform">
<option value=""></option>
<?php print_platform_option_list( $f_platform ); ?>
</select>
<?php
} else {
echo '<input type="text" id="platform" name="platform" class="autocomplete" size="32" maxlength="32" tabindex="' . helper_get_tab_index_value() . '" value="' . string_attribute( $f_platform ) . '" />';
}
?>
</span>
<span class="label-style"></span>
示例15: print_bug_attachment
/**
* Prints information about a single attachment including download link, file
* size, upload timestamp and an expandable preview for text and image file
* types.
* @param array $p_attachment An attachment arrray from within the array returned by the file_get_visible_attachments() function
*/
function print_bug_attachment($p_attachment)
{
$t_show_attachment_preview = $p_attachment['preview'] && $p_attachment['exists'] && ($p_attachment['type'] == 'text' || $p_attachment['type'] == 'image');
if ($t_show_attachment_preview) {
$t_collapse_id = 'attachment_preview_' . $p_attachment['id'];
global $g_collapse_cache_token;
$g_collapse_cache_token[$t_collapse_id] = false;
collapse_open($t_collapse_id);
}
print_bug_attachment_header($p_attachment);
if ($t_show_attachment_preview) {
echo lang_get('word_separator');
collapse_icon($t_collapse_id);
if ($p_attachment['type'] == 'text') {
print_bug_attachment_preview_text($p_attachment);
} else {
if ($p_attachment['type'] === 'image') {
print_bug_attachment_preview_image($p_attachment);
}
}
collapse_closed($t_collapse_id);
print_bug_attachment_header($p_attachment);
echo lang_get('word_separator');
collapse_icon($t_collapse_id);
collapse_end($t_collapse_id);
}
}