本文整理汇总了PHP中display_progress_bar函数的典型用法代码示例。如果您正苦于以下问题:PHP display_progress_bar函数的具体用法?PHP display_progress_bar怎么用?PHP display_progress_bar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_progress_bar函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testdisplay_progress_bar
public function testdisplay_progress_bar()
{
//execute the method and test if it doesn't throw an exception.
//this method uses flush so we cannot get and verify content printed
try {
ob_start();
display_progress_bar('test', 80, 100, false);
ob_end_clean();
$this->assertTrue(true);
} catch (Exception $e) {
$this->fail();
}
}
示例2: prepareDiag
function prepareDiag()
{
global $getDumpsFrom;
global $cacheDir;
global $curdatetime;
global $progress_bar_percent;
global $skip_md5_diff;
global $sod_guid;
global $mod_strings;
echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>", translate('LBL_DIAGNOSTIC_TITLE')), false);
echo "<BR>";
echo $mod_strings['LBL_DIAGNOSTIC_EXECUTING'];
echo "<BR>";
//determine if files.md5 exists or not
if (file_exists('files.md5')) {
$skip_md5_diff = false;
} else {
$skip_md5_diff = true;
}
// array of all tables that we need to pull rows from below
$getDumpsFrom = array('config' => 'config', 'fields_meta_data' => 'fields_meta_data', 'upgrade_history' => 'upgrade_history', 'versions' => 'versions');
//Creates the diagnostic directory in the cache directory
$cacheDir = create_cache_directory("diagnostic/");
$cacheDir = create_cache_directory("diagnostic/" . $sod_guid);
$cacheDir = create_cache_directory("diagnostic/" . $sod_guid . "/diagnostic" . $curdatetime . "/");
display_progress_bar("diagnostic", $progress_bar_percent, 100);
ob_flush();
}
示例3: disable
function disable($base_dir)
{
global $app_strings;
$total_steps = 3;
//min steps with no tasks
$current_step = 0;
$this->base_dir = $base_dir;
$tasks = array('disable_copy', 'disable_dashlets', 'disable_relationships', 'disable_extensions', 'disable_global_search', 'disable_manifest_logichooks', 'reset_opcodes');
$total_steps += count($tasks);
//now the real number of steps
if (file_exists($this->base_dir . '/manifest.php')) {
if (!$this->silent) {
$current_step++;
display_progress_bar('install', $current_step, $total_steps);
echo '<div id ="displayLoglink" ><a href="#" onclick="toggleDisplay(\'displayLog\')">' . $app_strings['LBL_DISPLAY_LOG'] . '</a> </div><div id="displayLog" style="display:none">';
}
require_once $this->base_dir . '/manifest.php';
$this->installdefs = $installdefs;
$this->id_name = $this->installdefs['id'];
$installed_modules = array();
if (isset($this->installdefs['beans'])) {
foreach ($this->installdefs['beans'] as $bean) {
$installed_modules[] = $bean['module'];
}
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
foreach ($tasks as $task) {
$this->{$task}();
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
echo '</div>';
}
UpdateSystemTabs('Restore', $installed_modules);
} else {
die("No manifest.php Defined In {$this->base_dir}/manifest.php");
}
}
示例4: disable
function disable($base_dir)
{
global $app_strings;
$total_steps = 3;
//min steps with no tasks
$current_step = 0;
$this->base_dir = $base_dir;
$tasks = array('disable_copy', 'disable_menus', 'disable_dashlets', 'disable_userpage', 'disable_administration', 'disable_vardefs', 'disable_layoutdefs', 'disable_relationships', 'disable_languages', 'disable_logichooks', 'reset_opcodes');
$total_steps += count($tasks);
//now the real number of steps
if (file_exists($this->base_dir . '/manifest.php')) {
if (!$this->silent) {
$current_step++;
display_progress_bar('install', $current_step, $total_steps);
echo '<div id ="displayLoglink" ><a href="#" onclick="toggleDisplay(\'displayLog\')">' . $app_strings['LBL_DISPLAY_LOG'] . '</a> </div><div id="displayLog" style="display:none">';
}
require_once $this->base_dir . '/manifest.php';
$this->installdefs = $installdefs;
$this->id_name = $this->installdefs['id'];
$installed_modules = array();
if (isset($this->installdefs['beans'])) {
foreach ($this->installdefs['beans'] as $bean) {
$installed_modules[] = $bean['module'];
}
mkdir_recursive("custom/Extension/application/Ext/Include/" . DISABLED_PATH, true);
//Clear any older disabled version
if (file_exists("custom/Extension/application/Ext/Include/" . DISABLED_PATH . '/' . $this->id_name . '.php')) {
rmdir_recursive("custom/Extension/application/Ext/Include/" . DISABLED_PATH . '/' . $this->id_name . '.php');
}
if (file_exists("custom/Extension/application/Ext/Include/{$this->id_name}.php")) {
rename("custom/Extension/application/Ext/Include/{$this->id_name}.php", "custom/Extension/application/Ext/Include/" . DISABLED_PATH . '/' . $this->id_name . '.php');
}
$this->rebuild_modules();
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
foreach ($tasks as $task) {
$this->{$task}();
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
echo '</div>';
}
UpdateSystemTabs('Restore', $installed_modules);
} else {
die("No manifest.php Defined In {$this->base_dir}/manifest.php");
}
}
示例5: ob_start
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
********************************************************************************/
ob_start();
require_once '../include/utils/progress_bar_utils.php';
display_flow_bar('myflow', 1);
display_progress_bar('myprogress', 0, 10);
for ($i = 0; $i <= 10; $i++) {
update_progress_bar('myprogress', $i, 10);
sleep(1);
}
destroy_flow_bar('myflow');
示例6: microtime_diff
echo "Total Time: " . microtime_diff($_SESSION['startTime'], microtime()) . "<br />\n";
if ($page > count($module_keys)) {
echo "Core Records Inserted: " . $_SESSION['processedRecords'] . "<br />\n";
echo "Total Records Inserted: " . $_SESSION['allProcessedRecords'] . "<br />\n";
die('Done <a href="install.php">[More]</a>');
}
$module = $module_keys[$page - 1];
if (($module == 'Users' || $module == 'Teams') && $_SESSION['UseExistUsers']) {
/* If UseExistUsers is set, just move to the next module */
$page++;
echo "<script>document.location.href='install.php?page={$page}&offset=0';</script>";
}
$total = $modules[$module];
$max = min($recordsPerPage + $offset, $total);
echo $module . ' [' . $offset . '-' . $max . ' of ' . $total . ']';
display_progress_bar('module_progress', $offset, $total);
set_time_limit(3600);
require_once 'config.php';
require_once 'include/modules.php';
$GLOBALS['relatedQueries'] = array();
$GLOBALS['queries'] = array();
$GLOBALS['relatedQueriesCount'] = 0;
require_once 'include/database/DBManagerFactory.php';
require_once 'log4php/LoggerManager.php';
require_once 'Tidbit/Data/DefaultData.php';
require_once 'Tidbit/DataTool.php';
require_once 'Tidbit/install_functions.php';
require_once 'Tidbit/Data/contactSeedData.php';
$app_list_strings = return_app_list_strings_language('en_us');
$GLOBALS['log'] = LoggerManager::getLogger('Tidbit');
$GLOBALS['db'] = DBManagerFactory::getInstance();
示例7: display_progress_bar
if (isset($_REQUEST['offset'])) {
echo '<div id="records_progress_div" style="display:inline">';
echo 'Retrieving Records<br>';
display_progress_bar('records', $_REQUEST['offset'], $_REQUEST['count']);
} else {
if (isset($_REQUEST['sync_accept'])) {
echo '<div id="records_progress_div" style="display:inline">';
} else {
echo '<div id="records_progress_div" style="display:none">';
}
echo 'Retrieving Records<br>';
display_progress_bar('records', 0, 100);
}
echo '</div></td><td width=50% valign="top">';
echo get_form_header('Total', '', false);
display_progress_bar('Total', $sync_module_index, sizeof($sync_modules));
echo '<br><div id="current_substatus">' . $title . '</div>';
echo '<input type="button" name="stop_sync_btn" id="stop_sync_btn" class="button" value="Stop Sync" onclick="window.close();">';
echo '</td></tr></table>';
echo '<table width="100%"><tr><td colspan="2" id="current_msg" valign="top"><div id="show_conflict_div"> <div></td></tr>';
echo '<tr><td colspan="2" id="retrieve_msg" valign="top">';
if ($display_log == 0) {
echo '<div id="retrieve_msg_divlink" style="display:inline"><a href="#" onclick="document.getElementById(\'display_log\').value = 1; toggleDisplay(\'retrieve_msg_div\');">display log</a></div><div id="retrieve_msg_div" style="display:none">';
}
echo retrieve_msg();
if ($display_log == 0) {
echo '</div>';
}
echo "</td><td align='right'><A href='http://www.sugarcrm.com' target='_blank'><!--not_in_theme!--><img style='margin-top: 2px' border='0' width='120' height='34' src='" . getJSPath('include/images/poweredby_sugarcrm_65.png') . "' alt='" . $mod_strings['LBL_POWERED_BY_SUGAR'] . "'></a></td></tr></table></div><script>document.getElementById('sync_table').style.display='inline';</script>";
echo str_repeat(' ', 256);
flush();
示例8: get_form_header
* terms available at
* http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative, then do not
* install or use this SugarCRM file.
*
* Copyright (C) SugarCRM Inc. All rights reserved.
*/
global $soapclient, $soap_server;
if ($sync_module_index == -1) {
$current_step = 0;
$module_steps = 4;
global $timedate;
echo '<table width="100%" class="edit view"><tr><td width="50%" valign="top">';
echo get_form_header(translate('LBL_SYNC_SETUP', 'Sync'), '', false);
display_progress_bar('sync_setup', $current_step, $module_steps);
echo '<br>';
echo '<div id="records_progress_div" style="display:inline">';
display_flow_bar('file_update', 0.5);
echo '</div></td><td><div id = "current_substatus"> <div><br><input type="button" name="stop_sync_btn" id="stop_sync_btn" class="button" value="Stop Sync" onclick="window.close();"></td></tr></table>';
echo '<table width="100%"><tr><td colspan="2" id="current_msg" valign="top"><div id="show_conflict_div"> <div></td></tr></table>';
echo '<div id="current_status"> </div>';
}
if ($sync_module_index == -1) {
add_to_msg("Logging Into Server...");
}
$result = $soapclient->call('login', array('user_auth' => sync_get_user_auth_data(), 'application_name' => 'MobileClient'));
if (!has_error($result)) {
$session = $result['id'];
$_SESSION['sync_session'] = $session;
//ensure that this system has not been disabled
示例9: uninstall
function uninstall($base_dir)
{
$total_steps = 4;
//min steps with no tasks
$current_step = 0;
$this->base_dir = $base_dir;
$tasks = array('uninstall_mkdirs', 'uninstall_copy', 'uninstall_menus', 'uninstall_dashlets', 'uninstall_administration', 'uninstall_vardefs', 'uninstall_layoutdefs', 'uninstall_relationships', 'uninstall_languages');
$total_steps += count($tasks);
//now the real number of steps
if (file_exists($this->base_dir . '/manifest.php')) {
if (!$this->silent) {
$current_step++;
display_progress_bar('install', $current_step, $total_steps);
echo '<div id ="displayLoglink" ><a href="#" onclick="toggleDisplay(\'displayLog\')">Display Log</a> </div><div id="displayLog" style="display:none">';
}
require_once $this->base_dir . '/manifest.php';
$this->installdefs = $installdefs;
$this->id_name = $this->installdefs['id'];
$installed_modules = array();
if (isset($this->installdefs['beans'])) {
foreach ($this->installdefs['beans'] as $bean) {
$installed_modules[] = $bean['module'];
$this->uninstall_user_prefs($bean['module']);
}
$this->uninstall_beans($installed_modules);
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $total_steps, $total_steps);
}
rmdir_recursive("custom/Extension/application/Ext/Include/{$this->id_name}.php");
$this->merge_files('Ext/Include', 'modules.ext.php', '', true);
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
foreach ($tasks as $task) {
$this->{$task}();
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
}
}
if (isset($installdefs['custom_fields'])) {
$GLOBALS['log']->debug('Uninstalling Custom Fields...');
$this->uninstall_custom_fields($installdefs['custom_fields']);
}
if (!$this->silent) {
$current_step++;
update_progress_bar('install', $current_step, $total_steps);
echo '</div>';
}
$GLOBALS['log']->debug('Complete');
update_progress_bar('install', $total_steps, $total_steps);
} else {
die("No manifest.php Defined In {$this->base_dir}/manifest.php");
}
}