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


PHP helper_begin_long_process函数代码示例

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


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

示例1: file_ftp_get

function file_ftp_get($p_conn_id, $p_local_filename, $p_remote_filename)
{
    helper_begin_long_process();
    $download = ftp_get($p_conn_id, $p_local_filename, $p_remote_filename, FTP_BINARY);
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:5,代码来源:file_api.php

示例2: require_api

require_api('category_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('custom_field_api.php');
require_api('event_api.php');
require_api('form_api.php');
require_api('gpc_api.php');
require_api('helper_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('string_api.php');
require_api('utility_api.php');
require_api('version_api.php');
auth_ensure_user_authenticated();
helper_begin_long_process();
$f_action = gpc_get_string('action');
$f_custom_field_id = gpc_get_int('custom_field_id', 0);
$f_bug_arr = gpc_get_int_array('bug_arr', array());
$f_bug_notetext = gpc_get_string('bugnote_text', '');
$f_bug_noteprivate = gpc_get_bool('private');
$t_form_name = 'bug_actiongroup_' . $f_action;
form_security_validate($t_form_name);
$t_custom_group_actions = config_get('custom_group_actions');
foreach ($t_custom_group_actions as $t_custom_group_action) {
    if ($f_action == $t_custom_group_action['action']) {
        require_once $t_custom_group_action['action_page'];
        exit;
    }
}
$t_failed_ids = array();
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:bug_actiongroup.php

示例3: run

 function run($p_execute, $p_limit, $p_advanced)
 {
     if (!php_version_at_least('4.1.0')) {
         global $_SERVER;
     }
     if ($p_execute) {
         # Mark this as a long process and ignore user aborts
         helper_begin_long_process(true);
         # Disable compression so we can stream
         compress_disable();
         # Flush the output buffer
         @ob_end_flush();
         echo '<b>Please be patient, this may take a while...</b>';
     }
     # Form
     echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
     # Execute All Button
     echo "<input type=\"submit\" name=\"{$this->upgrade_file}_execute_all\" value=\"Execute All\" />";
     # Print All Button
     echo "<input type=\"submit\" name=\"{$this->upgrade_file}_print_all\" value=\"Print All\" /><br /><br />";
     if ($p_advanced) {
         # Execute Selected Button
         echo "<input type=\"submit\" name=\"{$this->upgrade_file}_execute_selected\" value=\"Execute Selected\" />";
         # Print Selected Button
         echo "<input type=\"submit\" name=\"{$this->upgrade_file}_print_selected\" value=\"Print Selected\" />";
     }
     # Table
     echo '<table width="80%" bgcolor="#222222" border="0" cellpadding="10" cellspacing="1">';
     echo "<tr><td bgcolor=\"#e8e8e8\" colspan=\"3\"><span class=\"title\">{$this->upgrade_name}</span></td></tr>";
     # Headings
     echo '<tr bgcolor="#ffffff"><th width="70%">Description</th><th nowrap="nowrap">Upgrade ID</th><th width="30%">Status</th></tr>';
     $t_error = false;
     foreach ($this->item_array as $item) {
         $t_state = '';
         if ($item->is_applied()) {
             if (!$p_advanced) {
                 continue;
                 #next one
             }
             $t_state = 'disabled="disabled"';
             $t_color = '#00ff88';
             $t_message = 'Previously Applied';
         } else {
             if (null !== $p_limit && is_array($p_limit) && !in_array($item->id, $p_limit)) {
                 $t_color = '#ffff88';
                 $t_message = 'Skipped';
             } else {
                 if ($p_execute) {
                     if ($t_error) {
                         $t_state = 'checked="checked"';
                         $t_color = '#ff0088';
                         $t_message = 'Skipped due to previous error';
                         continue;
                         # next one
                     }
                     if ($item->execute()) {
                         $t_state = 'disabled="disabled"';
                         $t_color = '#00ff88';
                         $t_message = 'Applied';
                     } else {
                         $t_state = 'checked="checked"';
                         $t_color = '#ff0088';
                         $t_message = 'ERROR: ' . $item->error;
                         $t_error = true;
                     }
                 } else {
                     # not applied but not executing
                     $t_color = '#ff0088';
                     $t_message = 'Not Applied';
                     $t_state = 'checked="checked"';
                 }
             }
         }
         echo '<tr bgcolor="#ffffff"><td>';
         echo $item->description;
         # description
         echo '</td>';
         echo '<td nowrap="nowrap">';
         if ($p_advanced) {
             echo "<input type=\"checkbox\" name=\"{$this->upgrade_file}_execute_list[]\" value=\"{$item->id}\" {$t_state} /> ";
         }
         echo "{$item->id}</td>";
         echo "<td bgcolor=\"{$t_color}\">{$t_message}</td>";
         echo '</tr>';
     }
     echo '</table>';
     # Execute All Button
     echo "<br /><input type=\"submit\" name=\"{$this->upgrade_file}_execute_all\" value=\"Execute All\" />";
     # Print All Button
     echo "<input type=\"submit\" name=\"{$this->upgrade_file}_print_all\" value=\"Print All\" />";
     if ($p_advanced) {
         # Execute Selected Button
         echo "<input type=\"submit\" name=\"{$this->upgrade_file}_execute_selected\" value=\"Execute Selected\" />";
         # Print Selected Button
         echo "<input type=\"submit\" name=\"{$this->upgrade_file}_print_selected\" value=\"Print Selected\" />";
     }
 }
开发者ID:centaurustech,项目名称:BenFund,代码行数:97,代码来源:upgrade_inc.php


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