• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP helper_alternate_class函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: reportBugFormTop

    function reportBugFormTop($p_event, $p_project_id)
    {
        # allow to change reporter_id (if access level is higher than defined)
        $t_user_id = auth_get_current_user_id();
        $t_access_level = user_get_access_level($t_user_id, $p_project_id);
        if ($t_access_level >= plugin_config_get('select_threshold')) {
            ?>
		    
			<tr <?php 
            echo helper_alternate_class();
            ?>
>
				<td class="category" width="30%">
					<?php 
            echo lang_get('reporter');
            ?>
				</td>
				<td width="70%">
					<select <?php 
            echo helper_get_tab_index();
            ?>
 name="reporter_id">
						<?php 
            print_reporter_option_list($t_user_id, $p_project_id);
            ?>
					</select>
				</td>
			</tr>
<?php 
        }
    }
开发者ID:bkraul,项目名称:CustomReporter,代码行数:31,代码来源:CustomReporter.php


示例2: printTableRowHead

 /**
  *
  */
 public function printTableRowHead()
 {
     if ($this->getMantisVersion() == '1.2.') {
         echo '<tr ' . helper_alternate_class() . '>';
     } else {
         echo '<tr>';
     }
 }
开发者ID:Cre-ator,项目名称:Whiteboard.StoryBoard-Plugin,代码行数:11,代码来源:storyboard_config_api.php


示例3: account_update_form

 /**
  * When updating user preferences, allowing the user or admin to specify
  * a version control username to be associated with the account.
  * @param string Event name
  * @param int User ID
  */
 function account_update_form($p_event, $p_user_id)
 {
     if (!access_has_global_level(config_get('plugin_Source_username_threshold'))) {
         return;
     }
     $t_user = SourceUser::load($p_user_id);
     echo '<tr ', helper_alternate_class(), '><td class="category">', plugin_lang_get('vcs_username', 'Source'), '<input type="hidden" name="Source_vcs" value="1"/></td><td>', '<input name="Source_vcs_username" value="', $t_user->username, '"/></td></tr>';
 }
开发者ID:hcw70,项目名称:source-integration,代码行数:14,代码来源:SourceIntegration.php


示例4: data_input_from_tl

    /**
     * @author Lennard Bredenkamp, BFE
     * import the data which came from TestLink via POST
     * and show data on bug report page
     */
    function data_input_from_tl()
    {
        // global $this->tts_new_ttslink_bug;
        global $tts_new_ttslink_bug;
        $tts_new_ttslink_bug = false;
        // if(!$tts_new_ttslink_bug) echo "false";
        $args = $_POST;
        if (isset($args['exec_id'], $args['tproject_id'])) {
            $tts_exec_id = gpc_get_string('exec_id');
            $tts_tproject_id = gpc_get_string('tproject_id');
            $tts_new_ttslink_bug = true;
            // echo "blubb2: ".$tts_new_ttslink_bug;
            ?>
		  
		  
		<tr <?php 
            echo helper_alternate_class();
            ?>
>
		<td class="category">
			TestTracker-Beziehung
		</td>
		<td>
			<table>
				<tr>
					<td style="padding-right: 30px">
						<b>Ausf&uuml;hrungs-ID:</b> <?php 
            echo $tts_exec_id;
            ?>
					</td>
					<td >
						<b>Testprojekt-ID:</b> <?php 
            echo $tts_tproject_id;
            ?>
					</td>
				</tr>
			</table>
			<input type="hidden" name="tts_exec_id" id="tts_exec_id" value="<?php 
            echo $tts_exec_id;
            ?>
">
			<input type="hidden" name="tts_tproject_id" id="tts_tproject_id" value="<?php 
            echo $tts_tproject_id;
            ?>
">
		</td>
		</tr>
		<?php 
        }
    }
开发者ID:bfekomsthoeft,项目名称:TTS_Praxisprojekt1,代码行数:55,代码来源:TTSintegr.php


示例5: get_capability_row

function get_capability_row($p_caption, $p_access_level)
{
    $t_access_levels = MantisEnum::getValues(config_get('access_levels_enum_string'));
    $t_output = '<tr ' . helper_alternate_class() . '><td>' . string_display($p_caption) . '</td>';
    foreach ($t_access_levels as $t_access_level) {
        if ($t_access_level >= (int) $p_access_level) {
            $t_value = '<img src="images/ok.gif" width="20" height="15" alt="X" title="X" />';
        } else {
            $t_value = '&#160;';
        }
        $t_output .= '<td class="center">' . $t_value . '</td>';
    }
    $t_output .= '</tr>' . "\n";
    return $t_output;
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:15,代码来源:adm_permissions_report.php


示例6: get_capability_row

function get_capability_row($p_caption, $p_access_level)
{
    $t_access_levels = explode_enum_string(config_get('access_levels_enum_string'));
    $t_output = '<tr ' . helper_alternate_class() . '><td>' . string_display($p_caption) . '</td>';
    foreach ($t_access_levels as $t_access_level) {
        $t_entry_array = explode_enum_arr($t_access_level);
        if ((int) $t_entry_array[0] >= (int) $p_access_level) {
            $t_value = '<img src="images/ok.gif" width="20" height="15" alt="X" title="X" />';
        } else {
            $t_value = '&nbsp;';
        }
        $t_output .= '<td class="center">' . $t_value . '</td>';
    }
    $t_output .= '</tr>' . "\n";
    return $t_output;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:16,代码来源:adm_permissions_report.php


示例7: update_repo_form

    public function update_repo_form($p_repo)
    {
        $t_sf_project = isset($p_repo->info['sf_project']) ? $p_repo->info['sf_project'] : '';
        ?>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo lang_get('plugin_SourceSFSVN_sf_project');
        ?>
</td>
<td><input name="sf_project" maxlength="250" size="40" value="<?php 
        echo string_attribute($t_sf_project);
        ?>
"/></td>
</tr>
<?php 
        return parent::update_repo_form($p_repo);
    }
开发者ID:01-Scripts,项目名称:source-integration,代码行数:20,代码来源:SourceSFSVN.php


示例8: display_commit_message

 function display_commit_message($event, $bugid)
 {
     if (!$bugid) {
         return;
     }
     $t_fields = config_get('bug_view_page_fields');
     $t_fields = columns_filter_disabled($t_fields);
     $tpl_show_id = in_array('id', $t_fields);
     $tpl_show_description = in_array('description', $t_fields);
     $tpl_show_status = in_array('status', $t_fields);
     if ($tpl_show_id && $tpl_show_description && $tpl_show_status) {
         bug_ensure_exists($bugid);
         $bug = bug_get($bugid, true);
         access_ensure_bug_level(VIEWER, $bugid);
         $tpl_description = string_display_links($bug->summary);
         $tpl_status = get_enum_element('status', $bug->status);
         $tpl_link = config_get('path') . string_get_bug_view_url($bugid, null);
         $message = sprintf('%s - #JJ%d: %s<br/>%s', strtoupper($tpl_status), $bugid, $tpl_description, $tpl_link);
         echo '<tr ', helper_alternate_class(), '>';
         echo '<td class="category">', plugin_lang_get('commit_message'), '</td>';
         echo '<td colspan="5">' . $message . '</td>';
         echo '</tr>';
     }
 }
开发者ID:jon48,项目名称:webtrees-tools,代码行数:24,代码来源:PersoDevTools.php


示例9: string_display_line

                    if (-1 == $t_dependency) {
                        $t_ready = false;
                        $t_depends[] = '<span class="small dependency_dated">' . string_display_line($t_plugins[$t_plugin]->name . ' ' . $t_version) . '</span>';
                    } else {
                        $t_ready = false;
                        $t_depends[] = '<span class="small dependency_unmet">' . string_display_line($t_plugin . ' ' . $t_version) . '</span>';
                    }
                }
            }
        }
        if (0 < count($t_depends)) {
            $t_depends = implode($t_depends, '<br />');
        } else {
            $t_depends = '<span class="small dependency_met">' . lang_get('plugin_no_depends') . '</span>';
        }
        echo '<tr ', helper_alternate_class(), '>';
        echo '<td class="small center">', $t_name, '</td>';
        echo '<td class="small">', $t_description, $t_author, $t_url, '</td>';
        echo '<td class="center">', $t_depends, '</td>';
        echo '<td class="center">';
        if ($t_ready) {
            print_bracket_link('manage_plugin_install.php?name=' . $t_basename . form_security_param('manage_plugin_install'), lang_get('plugin_install'));
        }
        echo '</td></tr>';
    }
    ?>

</table>
<?php 
}
?>
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:31,代码来源:manage_plugin_page.php


示例10: html_robots_noindex

<?php
html_robots_noindex();

html_page_top( lang_get( 'report_bug_link' ) );

print_recently_visited();

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

<tr>
	<td class="form-title" >
		SVN : Log Message
	</td>
</tr>

<tr <?php echo helper_alternate_class( )?>>
	<td>
		<textarea style="width:100%;" rows="20"><?php	echo $t_generated_log;?></textarea>
	</td>
</tr>


</table>

<?php 
html_page_bottom();
开发者ID:Jguilbaud,项目名称:mantispluginSvnGenerateLog,代码行数:28,代码来源:generateLog.php


示例11: edit_printing_prefs

function edit_printing_prefs($p_user_id = null, $p_error_if_protected = true, $p_redirect_url = '')
{
    if (null === $p_user_id) {
        $p_user_id = auth_get_current_user_id();
    }
    $c_user_id = db_prepare_int($p_user_id);
    # protected account check
    if ($p_error_if_protected) {
        user_ensure_unprotected($p_user_id);
    }
    $t_user_print_pref_table = db_get_table('mantis_user_print_pref_table');
    if (is_blank($p_redirect_url)) {
        $p_redirect_url = 'print_all_bug_page.php';
    }
    # get the fields list
    $t_field_name_arr = get_field_names();
    $field_name_count = count($t_field_name_arr);
    # Grab the data
    $query = "SELECT print_pref\n\t\t\tFROM {$t_user_print_pref_table}\n\t\t\tWHERE user_id=" . db_param();
    $result = db_query_bound($query, array($c_user_id));
    ## OOPS, No entry in the database yet.  Lets make one
    if (0 == db_num_rows($result)) {
        # create a default array, same size than $t_field_name
        for ($i = 0; $i < $field_name_count; $i++) {
            $t_default_arr[$i] = 1;
        }
        $t_default = implode('', $t_default_arr);
        # all fields are added by default
        $query = "INSERT\n\t\t\t\tINTO {$t_user_print_pref_table}\n\t\t\t\t(user_id, print_pref)\n\t\t\t\tVALUES\n\t\t\t\t(" . db_param() . "," . db_param() . ")";
        $result = db_query_bound($query, array($c_user_id, $t_default));
        # Rerun select query
        $query = "SELECT print_pref\n\t\t\t\tFROM {$t_user_print_pref_table}\n\t\t\t\tWHERE user_id=" . db_param();
        $result = db_query_bound($query, array($c_user_id));
    }
    # putting the query result into an array with the same size as $t_fields_arr
    $row = db_fetch_array($result);
    $t_prefs = $row['print_pref'];
    # Account Preferences Form BEGIN
    $t_index_count = 0;
    ?>
<br />
<div align="center">
<form method="post" action="print_all_bug_options_update.php">
<?php 
    echo form_security_field('print_all_bug_options_update');
    ?>
<input type="hidden" name="user_id" value="<?php 
    echo $p_user_id;
    ?>
" />
<input type="hidden" name="redirect_url" value="<?php 
    echo string_attribute($p_redirect_url);
    ?>
" />
<table class="width75" cellspacing="1">
<tr>
	<td class="form-title">
		<?php 
    echo lang_get('printing_preferences_title');
    ?>
	</td>
	<td class="right">
	</td>
</tr>


<?php 
    # display the checkboxes
    for ($i = 0; $i < $field_name_count; $i++) {
        printf('<tr %s>', helper_alternate_class($i));
        ?>

	<td class="category">
		<?php 
        echo lang_get($t_field_name_arr[$i]);
        ?>
	</td>
	<td>
		<input type="checkbox" name="<?php 
        echo 'print_' . $t_field_name_arr[$i];
        ?>
"
		<?php 
        if (isset($t_prefs[$i]) && $t_prefs[$i] == 1) {
            echo 'checked="checked"';
        }
        ?>
 />
	</td>
</tr>

<?php 
    }
    ?>
<tr>
	<td>&#160;</td>
	<td>
		<input type="submit" class="button" value="<?php 
    echo lang_get('update_prefs_button');
    ?>
//.........这里部分代码省略.........
开发者ID:Tarendai,项目名称:spring-website,代码行数:101,代码来源:print_all_bug_options_inc.php


示例12: update_repo_form

    public function update_repo_form($p_repo)
    {
        $t_gitweb_root = null;
        $t_gitweb_project = null;
        if (isset($p_repo->info['gitweb_root'])) {
            $t_gitweb_root = $p_repo->info['gitweb_root'];
        }
        if (isset($p_repo->info['gitweb_project'])) {
            $t_gitweb_project = $p_repo->info['gitweb_project'];
        }
        if (isset($p_repo->info['master_branch'])) {
            $t_master_branch = $p_repo->info['master_branch'];
        } else {
            $t_master_branch = 'master';
        }
        ?>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo plugin_lang_get('gitweb_root');
        ?>
</td>
<td><input name="gitweb_root" maxlength="250" size="40" value="<?php 
        echo string_attribute($t_gitweb_root);
        ?>
"/></td>
</tr>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo plugin_lang_get('gitweb_project');
        ?>
</td>
<td><input name="gitweb_project" maxlength="250" size="40" value="<?php 
        echo string_attribute($t_gitweb_project);
        ?>
"/></td>
</tr>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo plugin_lang_get('master_branch');
        ?>
</td>
<td><input name="master_branch" maxlength="250" size="40" value="<?php 
        echo string_attribute($t_master_branch);
        ?>
"/></td>
</tr>
<?php 
    }
开发者ID:01-Scripts,项目名称:source-integration,代码行数:57,代码来源:SourceGitweb.php


示例13: error_print_stack_trace

function error_print_stack_trace()
{
    if (extension_loaded('xdebug')) {
        #check for xdebug presence
        $t_stack = xdebug_get_function_stack();
        # reverse the array in a separate line of code so the
        #  array_reverse() call doesn't appear in the stack
        $t_stack = array_reverse($t_stack);
        array_shift($t_stack);
        #remove the call to this function from the stack trace
        print '<center><table class="width75">';
        foreach ($t_stack as $t_frame) {
            print '<tr ' . helper_alternate_class() . '>';
            print '<td>' . string_html_entities($t_frame['file']) . '</td><td>' . $t_frame['line'] . '</td><td>' . (isset($t_frame['function']) ? $t_frame['function'] : '???') . '</td>';
            $t_args = array();
            if (isset($t_frame['params'])) {
                foreach ($t_frame['params'] as $t_value) {
                    $t_args[] = error_build_parameter_string($t_value);
                }
            }
            print '<td>( ' . string_html_entities(implode($t_args, ', ')) . ' )</td></tr>';
        }
        print '</table></center>';
    } else {
        $t_stack = debug_backtrace();
        array_shift($t_stack);
        #remove the call to this function from the stack trace
        array_shift($t_stack);
        #remove the call to the error handler from the stack trace
        print '<center><table class="width75">';
        print '<tr><th>Filename</th><th>Line</th><th>Function</th><th>Args</th></tr>';
        foreach ($t_stack as $t_frame) {
            print '<tr ' . helper_alternate_class() . '>';
            print '<td>' . string_html_entities($t_frame['file']) . '</td><td>' . (isset($t_frame['line']) ? $t_frame['line'] : '-') . '</td><td>' . $t_frame['function'] . '</td>';
            $t_args = array();
            if (isset($t_frame['args'])) {
                foreach ($t_frame['args'] as $t_value) {
                    $t_args[] = error_build_parameter_string($t_value);
                }
            }
            print '<td>( ' . string_html_entities(implode($t_args, ', ')) . ' )</td></tr>';
        }
        print '</table></center>';
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:45,代码来源:error_api.php


示例14: show_revision

function show_revision($t_revision)
{
    static $s_can_drop = null;
    static $s_drop_token = null;
    static $s_user_access = null;
    if (is_null($s_can_drop)) {
        $s_can_drop = access_has_bug_level(config_get('bug_revision_drop_threshold'), $t_revision['bug_id']);
        $s_drop_token = form_security_param('bug_revision_drop');
    }
    switch ($t_revision['type']) {
        case REV_DESCRIPTION:
            $t_label = lang_get('description');
            break;
        case REV_STEPS_TO_REPRODUCE:
            $t_label = lang_get('steps_to_reproduce');
            break;
        case REV_ADDITIONAL_INFO:
            $t_label = lang_get('additional_information');
            break;
        case REV_BUGNOTE:
            if (is_null($s_user_access)) {
                $s_user_access = access_has_bug_level(config_get('private_bugnote_threshold'), $t_revision['bug_id']);
            }
            if (!$s_user_access) {
                return null;
            }
            $t_label = lang_get('bugnote');
            break;
        default:
            $t_label = '';
    }
    $t_by_string = sprintf(lang_get('revision_by'), string_display_line(date(config_get('normal_date_format'), $t_revision['timestamp'])), string_display_line(user_get_name($t_revision['user_id'])));
    ?>
<tr class="spacer"><td><a id="revision-<?php 
    echo $t_revision['id'];
    ?>
"></a></td></tr>

<tr <?php 
    echo helper_alternate_class();
    ?>
>
<th class="category"><?php 
    echo lang_get('revision');
    ?>
</th>
<td colspan="2"><?php 
    echo $t_by_string;
    ?>
</td>
<td class="center" width="5%">
<?php 
    if ($s_can_drop) {
        print_bracket_link('bug_revision_drop.php?id=' . $t_revision['id'] . $s_drop_token, lang_get('revision_drop'));
    }
    ?>
</tr>

<tr <?php 
    echo helper_alternate_class();
    ?>
>
<th class="category"><?php 
    echo $t_label;
    ?>
</th>
<td colspan="3"><?php 
    echo string_display_links($t_revision['value']);
    ?>
</td>
</tr>

	<?php 
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:74,代码来源:bug_revision_view_page.php


示例15: update_repo_form

    public function update_repo_form($p_repo)
    {
        $t_bit_basic_login = null;
        $t_bit_basic_pwd = null;
        $t_bit_username = null;
        $t_bit_reponame = null;
        if (isset($p_repo->info['bit_basic_login'])) {
            $t_bit_basic_login = $p_repo->info['bit_basic_login'];
        }
        if (isset($p_repo->info['bit_basic_pwd'])) {
            $t_bit_basic_pwd = $p_repo->info['bit_basic_pwd'];
        }
        if (isset($p_repo->info['bit_username'])) {
            $t_bit_username = $p_repo->info['bit_username'];
        }
        if (isset($p_repo->info['bit_reponame'])) {
            $t_bit_reponame = $p_repo->info['bit_reponame'];
        }
        if (isset($p_repo->info['master_branch'])) {
            $t_master_branch = $p_repo->info['master_branch'];
        } else {
            $t_master_branch = 'master';
        }
        ?>
		<tr <?php 
        echo helper_alternate_class();
        ?>
>
			<td class="category"><?php 
        echo plugin_lang_get('bit_basic_login');
        ?>
</td>
			<td><input name="bit_basic_login" maxlength="250" size="40"
					   value="<?php 
        echo string_attribute($t_bit_basic_login);
        ?>
"/></td>
		</tr>
		<tr <?php 
        echo helper_alternate_class();
        ?>
>
			<td class="category"><?php 
        echo plugin_lang_get('bit_basic_pwd');
        ?>
</td>
			<td><input type="password" name="bit_basic_pwd" maxlength="250" size="40"
					   value="<?php 
        echo string_attribute($t_bit_basic_pwd);
        ?>
"/></td>
		</tr>
		<tr <?php 
        echo helper_alternate_class();
        ?>
>
			<td class="category"><?php 
        echo plugin_lang_get('bit_username');
        ?>
</td>
			<td><input name="bit_username" maxlength="250" size="40"
					   value="<?php 
        echo string_attribute($t_bit_username);
        ?>
"/></td>
		</tr>
		<tr <?php 
        echo helper_alternate_class();
        ?>
>
			<td class="category"><?php 
        echo plugin_lang_get('bit_reponame');
        ?>
</td>
			<td><input name="bit_reponame" maxlength="250" size="40"
					   value="<?php 
        echo string_attribute($t_bit_reponame);
        ?>
"/></td>
		</tr>
		<tr>
			<td class="spacer"></td>
		</tr>
		<tr <?php 
        echo helper_alternate_class();
        ?>
>
			<td class="category"><?php 
        echo plugin_lang_get('master_branch');
        ?>
</td>
			<td><input name="master_branch" maxlength="250" size="40"
					   value="<?php 
        echo string_attribute($t_master_branch);
        ?>
"/></td>
		</tr>
	<?php 
    }
开发者ID:Sansumaki,项目名称:source-integration,代码行数:99,代码来源:SourceBitBucket.php


示例16: custom_field_get_definition

    $t_custom_fields_found = true;
    $t_def = custom_field_get_definition($t_id);
    echo '<tr ', helper_alternate_class(), '>';
    echo '<th class="bug-custom-field category">', string_display(lang_get_defaulted($t_def['name'])), '</th>';
    echo '<td class="bug-custom-field" colspan="5">';
    print_custom_field_value($t_def, $t_id, $f_bug_id);
    echo '</td></tr>';
}
if ($t_custom_fields_found) {
    # spacer
    echo '<tr class="spacer"><td colspan="6"></td></tr>';
}
# custom fields found
# Attachments
if ($tpl_show_attachments) {
    echo '<tr id="attachments" ', helper_alternate_class(), '>';
    echo '<th class="bug-attachments category">', lang_get('attached_files'), '</th>';
    echo '<td class="bug-attachments" colspan="5">';
    print_bug_attachments_list($tpl_bug_id);
    echo '</td></tr>';
}
echo '</tbody></table>';
# User list sponsoring the bug
if ($tpl_show_sponsorships_box) {
    define('BUG_SPONSORSHIP_LIST_VIEW_INC_ALLOW', true);
    include $tpl_mantis_dir . 'bug_sponsorship_list_view_inc.php';
}
# Bug Relationships
if ($tpl_show_relationships_box) {
    relationship_view_box($tpl_bug->id);
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:31,代码来源:bug_view_inc.php


示例17: summary_print_reporter_effectiveness

function summary_print_reporter_effectiveness($p_severity_enum_string, $p_resolution_enum_string)
{
    $t_mantis_bug_table = db_get_table('mantis_bug_table');
    $t_mantis_user_table = db_get_table('mantis_user_table');
    $t_reporter_summary_limit = config_get('reporter_summary_limit');
    $t_project_id = helper_get_current_project();
    $t_user_id = auth_get_current_user_id();
    $t_severity_multipliers = config_get('severity_multipliers');
    $t_resolution_multipliers = config_get('resolution_multipliers');
    # Get the severity values to use
    $c_sev_s = MantisEnum::getValues($p_severity_enum_string);
    $enum_sev_count = count($c_sev_s);
    # Get the resolution values to use
    $c_res_s = MantisEnum::getValues($p_resolution_enum_string);
    $enum_res_count = count($c_res_s);
    # Checking if it's a per project statistic or all projects
    $specific_where = helper_project_specific_where($t_project_id);
    if (' 1<>1' == $specific_where) {
        return;
    }
    # Get all of the bugs and split them up into an array
    $query = "SELECT COUNT(id) as bugcount, reporter_id, resolution, severity\n\t\t\t\tFROM {$t_mantis_bug_table}\n\t\t\t\tWHERE {$specific_where}\n\t\t\t\tGROUP BY reporter_id, resolution, severity";
    $result = db_query_bound($query);
    $t_reporter_ressev_arr = array();
    $t_reporter_bugcount_arr = array();
    $t_arr = db_fetch_array($result);
    while ($t_arr) {
        if (!isset($t_reporter_ressev_arr[$t_arr['reporter_id']])) {
            $t_reporter_ressev_arr[$t_arr['reporter_id']] = array();
            $t_reporter_bugcount_arr[$t_arr['reporter_id']] = 0;
        }
        if (!isset($t_reporter_ressev_arr[$t_arr['reporter_id']][$t_arr['severity']])) {
            $t_reporter_ressev_arr[$t_arr['reporter_id']][$t_arr['severity']] = array();
            $t_reporter_ressev_arr[$t_arr['reporter_id']][$t_arr['severity']]['total'] = 0;
        }
        if (!isset($t_reporter_ressev_arr[$t_arr['reporter_id']][$t_arr['severity']][$t_arr['resolution']])) {
            $t_reporter_ressev_arr[$t_arr['reporter_id']][$t_arr['severity']][$t_arr['resolution']] = 0;
        }
        $t_reporter_ressev_arr[$t_arr['reporter_id']][$t_arr['severity']][$t_arr['resolution']] += $t_arr['bugcount'];
        $t_reporter_ressev_arr[$t_arr['reporter_id']][$t_arr['severity']]['total'] += $t_arr['bugcount'];
        $t_reporter_bugcount_arr[$t_arr['reporter_id']] += $t_arr['bugcount'];
        $t_arr = db_fetch_array($result);
    }
    # Sort our total bug count array so that the reporters with the highest number of bugs are listed first,
    arsort($t_reporter_bugcount_arr);
    $t_row_count = 0;
    # We now have a multi dimensional array of users, resolutions and severities, with the
    # value of each resolution and severity for each user
    foreach ($t_reporter_bugcount_arr as $t_reporter_id => $t_total_user_bugs) {
        # Limit the number of reporters listed
        if ($t_row_count > $t_reporter_summary_limit) {
            break;
        }
        # Only print reporters who have reported at least one bug. This helps
        # prevent divide by zeroes, showing reporters not on this project, and showing
        # users that aren't actually reporters...
        if ($t_total_user_bugs > 0) {
            $t_arr2 = $t_reporter_ressev_arr[$t_reporter_id];
            echo '<tr ' . helper_alternate_class($t_row_count) . '>';
            $t_row_count++;
            echo '<td>';
            echo string_display_line(user_get_name($t_reporter_id));
            echo '</td>';
            $t_total_severity = 0;
            $t_total_errors = 0;
            for ($j = 0; $j < $enum_sev_count; $j++) {
                if (!isset($t_arr2[$c_sev_s[$j]])) {
                    continue;
                }
                $sev_bug_count = $t_arr2[$c_sev_s[$j]]['total'];
                $t_sev_mult = 1;
                if ($t_severity_multipliers[$c_sev_s[$j]]) {
                    $t_sev_mult = $t_severity_multipliers[$c_sev_s[$j]];
                }
                if ($sev_bug_count > 0) {
                    $t_total_severity += $sev_bug_count * $t_sev_mult;
                }
                foreach ($t_resolution_multipliers as $t_res => $t_res_mult) {
                    if (isset($t_arr2[$c_sev_s[$j]][$t_res])) {
                        $t_total_errors += $t_sev_mult * $t_res_mult;
                    }
                }
            }
            echo '<td>';
            echo $t_total_severity;
            echo '</td>';
            echo '<td>';
            echo $t_total_errors;
            echo '</td>';
            echo '<td>';
            print $t_total_severity - $t_total_errors;
            echo '</td>';
            echo '</tr>';
        }
    }
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:96,代码来源:summary_api.php


示例18: printTableRow

 public static function printTableRow()
 {
     if (substr(MANTIS_VERSION, 0, 4) == '1.2.') {
         echo '<tr ' . helper_alternate_class() . '>';
     } else {
         echo '<tr>';
     }
 }
开发者ID:Cre-ator,项目名称:Whiteboard.Menu-Plugin,代码行数:8,代码来源:wmApi.php


示例19: update_repo_form

    public function update_repo_form($p_repo)
    {
        $t_url = $this->get_viewvc_url($p_repo);
        $t_name = $this->get_viewvc_name($p_repo);
        $t_use_checkout = $this->get_viewvc_use_checkout($p_repo);
        $t_root_as_url = $this->get_viewvc_root_as_url($p_repo);
        ?>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo lang_get('plugin_SourceViewVC_viewvc_url');
        ?>
</td>
<td><input name="viewvc_url" maxlength="250" size="40" value="<?php 
        echo string_attribute($t_url);
        ?>
"/></td>
</tr>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo lang_get('plugin_SourceViewVC_viewvc_name');
        ?>
</td>
<td><input name="viewvc_name" maxlength="250" size="40" value="<?php 
        echo string_attribute($t_name);
        ?>
"/></td>
</tr>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo lang_get('plugin_SourceViewVC_viewvc_root_as_url');
        ?>
</td>
<td><input name="viewvc_root_as_url" type="checkbox" <?php 
        echo $t_root_as_url ? 'checked="checked"' : '';
        ?>
/></td>
</tr>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo lang_get('plugin_SourceViewVC_viewvc_use_checkout');
        ?>
</td>
<td><input name="viewvc_use_checkout" type="checkbox" <?php 
        echo $t_use_checkout ? 'checked="checked"' : '';
        ?>
/></td>
</tr>
<?php 
        return parent::update_repo_form($p_repo);
    }
开发者ID:Sansumaki,项目名称:source-integration,代码行数:62,代码来源:SourceViewVC.php


示例20: upgrade_move_att2disk

function upgrade_move_att2disk( $p_source ) {

	# $p_source is the string "attachment" or "project"
	if( $p_source == 'attachment' ) {
		$t_file_table = db_get_table( 'bug_file' );
		$t_bug_label = "Bug";
	}
	if( $p_source == 'project' ) {
		$t_file_table = db_get_table( 'project_file' );
		$t_bug_label = "Project";
	}

	# check that the source was valid
	if( !isset( $t_file_table ) ) {
		echo 'Failure: Internal Error: File source not set';
		return;
	}

	# check that the destination is set up properly
	$t_upload_method = config_get_global( 'file_upload_method' );
	if( $t_upload_method <> DISK ) {
		echo 'Failure: Upload Method is not DISK';
		return;
	}

	$query = 'SELECT * FROM ' . $t_file_table . ' WHERE content <> \'\'';

	$result = @db_query_bound( $query );

	if( false == $result ) {
		echo '<p>No attachments need to be moved.</p>';
		return;
	}

	$count = db_num_rows( $result );
	echo '<p>Found ' . $count . ' attachments to be moved.</p>';
	$t_failures = 0;

	if( $count > 0 ) {
		echo '<table width="80%" bgcolor="#222222" cellpadding="10" cellspacing="1">';

		# Headings
		echo '<tr bgcolor="#ffffff"><th width="10%">' . $t_bug_label . '</th><th width="20%">Attachment</th><th width="70%">Status</th></tr>';
	}

	for( $i = 0;$i < $count;$i++ ) {
		$t_row = db_fetch_array( $result );

		// trace bug id back to project to determine the proper file path
		if( $p_source == 'attachment' ) {
			$t_project_id = bug_get_field( $t_row['bug_id'], 'project_id' );
			$t_bug_id = $t_row['bug_id'];
		} else {
			$t_project_id = (int) $t_row['project_id'];
			$t_bug_id = $t_project_id;
		}

		$t_file_path = project_get_field( $t_project_id, 'file_path' );
		$prefix = get_prefix( $t_file_path );
		$t_real_file_path = $prefix . $t_file_path;
		$c_filename = file_clean_name( $t_row['filename'] );

		printf( "\n<tr %s><td>%8d</td><td>%s</td><td>", helper_alternate_class(), $t_bug_id, $t_row['filename'] );

		if( is_blank( $t_real_file_path ) || !file_exists( $t_real_file_path ) || !is_dir( $t_real_file_path ) || !is_writable( $t_real_file_path ) ) {
			echo 'Destination ' . $t_real_file_path . ' not writable';
			$t_failures++;
		} else {
			$t_file_name = $t_real_file_path . $c_filename;

			// write file to disk store after adjusting the path
			if( file_put_contents( $t_file_name, $t_row['content'] ) ) {
				// successful, update database
				/** @todo do we want to check the size of data transfer matches here? */
				$c_new_file_name = $t_file_path . $c_filename;
				$query2 = "UPDATE $t_file_table SET diskfile = " . db_param() . ",
						folder = " . db_param() . ", content = '' WHERE id = " . db_param();
				$update = @db_query_bound( $query2, Array( $c_new_file_name, $t_file_path, $t_row['id'] ) );
				if( !$update ) {
					echo 'database update failed';
					$t_failures++;
				} else {
					echo 'moved to ' . $t_file_name;
				}
			} else {
				echo 'copy to ' . $t_file_name . ' failed';
				$t_failures++;
			}
		}

		echo '</td></tr>';
	}

	echo '</table><br />' . $count . ' attachments processed, ' . $t_failures . ' failures';
}
开发者ID:rombert,项目名称:mantisbt,代码行数:95,代码来源:move_db2disk.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP helper_alternate_class_no_attribute函数代码示例发布时间:2022-05-15
下一篇:
PHP helper函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap