本文整理汇总了PHP中update_progress_bar函数的典型用法代码示例。如果您正苦于以下问题:PHP update_progress_bar函数的具体用法?PHP update_progress_bar怎么用?PHP update_progress_bar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了update_progress_bar函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: replace_files
function replace_files ($dir, $pos=2,$fileitem,$environment,$namearray) {
$handle = @opendir($dir);
while ( $file = @readdir($handle) ) {
if ( preg_match("~^\.{1,2}$~u", $file) ) {
continue;
}
if ( is_dir($dir.$file) ) {
replace_files($dir.$file."/", $pos + 3,$fileitem,$environment,$namearray);
} else {
$extension = mb_strtolower(mb_substr(strrchr($dir.$file,"."),1), 'UTF-8');
if ( is_file($dir.$file) and ( $extension == "htm"
or $extension == "html"
or $extension == "js"
or $extension == "xml"
or $extension == "xslt"
or $extension == "xsd"
#or $extension == "css"
)
) {
$replacement = replacement($environment,$fileitem,$dir,$file,$namearray);
$open = fopen($dir.$file,'w');
fputs($open,$replacement);
fclose($open);
update_progress_bar(count_for_process($namearray));
}
}
}
@closedir($handle);
}
开发者ID:a2call,项目名称:commsy,代码行数:30,代码来源:html_upload.php
示例2: changeWikis2
function changeWikis2 ($directory,$count) {
$directory_handle = opendir($directory);
while ( false !== ($entry = readdir($directory_handle)) ) {
if ($entry != '.' and $entry != '..' and is_dir($directory.'/'.$entry)) {
changeWikis2($directory.'/'.$entry,$count);
} elseif (is_file($directory.'/'.$entry) and $entry == 'commsy_config.php') {
$str = file_get_contents($directory.'/'.$entry);
if ( mb_stristr($str,'$COMMSY_ROOM_ID') and !mb_stristr($str,'session_name') ) {
$str = str_replace(array("\r\n", "\r"), "\n", $str);
$str_array = explode("\n",$str);
$str_out = '';
foreach ( $str_array as $value ) {
$str_out .= $value.LF;
if ( mb_stristr($value, '$COMMSY_ROOM_ID = "') ) {
$str_out .= 'session_name(\'SESSID-\'.$COMMSY_ROOM_ID);'.LF;
}
}
if ( !empty($str_out) ) {
file_put_contents($directory.'/'.$entry,trim($str_out));
}
}
update_progress_bar($count);
}
}
}
开发者ID:a2call,项目名称:commsy,代码行数:25,代码来源:02_wiki_change_config.php
示例3: testupdate_progress_bar
public function testupdate_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();
update_progress_bar('test', 80, 100, false);
ob_end_clean();
$this->assertTrue(true);
} catch (Exception $e) {
$this->fail();
}
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:13,代码来源:progressBarUtilsTest.php
示例4: changeWikis
function changeWikis ($directory,$count) {
$directory_handle = opendir($directory);
while ( false !== ($entry = readdir($directory_handle)) ) {
if ($entry != '.' and $entry != '..' and is_dir($directory.'/'.$entry)) {
changeWikis($directory.'/'.$entry,$count);
} elseif (is_file($directory.'/'.$entry) and $entry == 'index.php') {
unlink($directory.'/'.$entry);
global $c_pmwiki_absolute_path_file;
$str = "<?php include('".$c_pmwiki_absolute_path_file."/pmwiki.php');?>";
file_put_contents($directory.'/'.$entry,$str);
update_progress_bar($count);
}
}
}
开发者ID:a2call,项目名称:commsy,代码行数:14,代码来源:04_wiki_change_index.php
示例5: changeWikis
function changeWikis ($directory,$count) {
$directory_handle = opendir($directory);
while ( false !== ($entry = readdir($directory_handle)) ) {
if ($entry != '.' and $entry != '..' and is_dir($directory.'/'.$entry)) {
changeWikis($directory.'/'.$entry,$count);
} elseif (is_file($directory.'/'.$entry) and $entry == 'commsy_config.php') {
$str = file_get_contents($directory.'/'.$entry);
if ( mb_stristr($str,'authuser.php') and !mb_stristr($str,'authusercommsy.php') ) {
$str = str_replace('include_once("$FarmD/scripts/authuser.php");','include_once("$FarmD/cookbook/authusercommsy.php");'.LF.'include_once("$FarmD/scripts/authuser.php");',$str);
file_put_contents($directory.'/'.$entry,$str);
}
update_progress_bar($count);
}
}
}
开发者ID:a2call,项目名称:commsy,代码行数:15,代码来源:03_wiki_change_config.php
示例6: check_syntax
function check_syntax ($file) {
global $c_commsy_path_file;
$retour = array();
$output = '';
$result = '';
$file_to_check = $c_commsy_path_file.'/'.$file;
$cmd = PHP_CMD . " -l ".$file_to_check;
exec($cmd,$output,$result);
$len = count($output);
if ( $len <= 0 ) {
echo "Sorry! internal error, no syntax check output :-(";
exit(1);
}
// finally parse output of syntax check
if ( mb_substr($output[0],0,mb_strlen(OK_LINE_START)) == OK_LINE_START ) {
$syntax_OK = true;
flush();
} else {
$error_array = array();
$syntax_OK = false;
$filtered_output = array();
if ( $len > 0 && rtrim($output[0]) == "<br />" ) {
array_shift($output);
$len--;
}
if ( $len > 0 && rtrim($output[$len-1]) == "Errors parsing " . $file ) {
$len--; // N.B. skip last line
}
for ( $i=0; $i < $len; $i++ ) {
$line = $output[$i];
$filtered_output[] = $line;
if ( preg_match(ON_LINE_PATTERN, $line, $matches) ) {
$error_array[] = $line;
}
}
$retour = $error_array;
}
global $count_files;
update_progress_bar($count_files);
return $retour;
}
开发者ID:a2call,项目名称:commsy,代码行数:46,代码来源:syntax_check.php
示例7: changeWikis
function changeWikis ($directory,$count) {
global $c_commsy_path_file;
if ( empty($c_commsy_path_file) ) {
@include_once('../../etc/cs_config.php');
}
$str2 = file_get_contents($c_commsy_path_file.'/etc/pmwiki/wiki_config.php');
$directory_handle = opendir($directory);
while ( false !== ($entry = readdir($directory_handle)) ) {
if ($entry != '.' and $entry != '..' and is_dir($directory.'/'.$entry)) {
changeWikis($directory.'/'.$entry,$count);
} elseif (is_file($directory.'/'.$entry) and $entry == 'config.php') {
$str = file_get_contents($directory.'/'.$entry);
if ( mb_stristr($str,"include_once('commsy_config.php');") and !empty($str2) ) {
file_put_contents($directory.'/'.$entry,trim($str2));
}
update_progress_bar($count);
}
}
}
开发者ID:a2call,项目名称:commsy,代码行数:19,代码来源:01_wiki_exchange_config.php
示例8: str_replace
if (mb_strpos($extra,'ontology_')!=false){
$home_conf_string = str_replace(',ontology_short','',$treffer[2]);
$home_conf_string = str_replace(',ontology_tiny','',$home_conf_string);
$home_conf_string = str_replace(',ontology_none','',$home_conf_string);
$home_conf_string = str_replace('ontology_short,','',$home_conf_string);
$home_conf_string = str_replace('ontology_tiny,','',$home_conf_string);
$home_conf_string = str_replace('ontology_none,','',$home_conf_string);
$extra = preg_replace('~(<HOMECONF>.+</HOMECONF>)~u', '<HOMECONF>'.$home_conf_string.'</HOMECONF>', $extra);
// save project
$insert_query = 'UPDATE room SET extras="'.addslashes($extra).'" WHERE item_id="'.$project_id.'"';
select($insert_query);
}
}
$row = mysql_fetch_row($result);
$project_id = $row[0];
$extra = $row[1];
update_progress_bar($count_project);
}
}
if ($success) {
echo('[ <font color="#00ff00">done</font> ]<br/>'."\n");
} else {
echo('[ <font color="#ff0000">failed</font> ]<br/>'."\n");
}
// end of execution time
$time_end = getmicrotime();
$time = round($time_end - $time_start,3);
echo "<br/>Execution time: ".mb_sprintf("%02d:%02d:%02d", (int)($time/3600), (int)(fmod($time,3600)/60), (int)fmod(fmod($time,3600), 60))."\n";
?>
开发者ID:a2call,项目名称:commsy,代码行数:31,代码来源:05_db_clean_homeconf_ontologies.php
示例9: 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");
}
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:55,代码来源:ModuleInstaller.php
示例10: 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 [email protected].
*
* 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');
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:ProgressBarTest.php
示例11: read_body_firmware
function read_body_firmware($ch, $string)
{
global $g, $fout, $file_size, $downloaded, $counter, $version, $latest_version;
$length = strlen($string);
$downloaded += intval($length);
$downloadProgress = round(100 * (1 - $downloaded / $file_size), 0);
$downloadProgress = 100 - $downloadProgress;
$a = $file_size;
$b = $downloaded;
$c = $downloadProgress;
$text = " " . gettext("Auto Update Download Status") . "\\n";
$text .= "----------------------------------------------------\\n";
$text .= " " . gettext("Current Version") . " : {$g['product_version']}\\n";
$text .= " " . gettext("Latest Version") . " : {$latest_version}\\n";
$text .= " " . gettext("File size") . " : {$a}\\n";
$text .= " " . gettext("Downloaded") . " : {$b}\\n";
$text .= " " . gettext("Percent") . " : {$c}%\\n";
$text .= "----------------------------------------------------\\n";
$counter++;
if ($counter > 150) {
update_output_window($text);
update_progress_bar($downloadProgress);
$counter = 0;
}
fwrite($fout, $string);
return $length;
}
开发者ID:rohankapoorcom,项目名称:pfsense,代码行数:27,代码来源:system_firmware_auto.php
示例12: 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");
}
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:46,代码来源:ModuleInstaller.php
示例13: array
$sql_array = array();
foreach ( $must_sort_father_array as $father_id ) {
$sql = 'SELECT * FROM tag WHERE item_id IN ('.implode(',',$children_array[$father_id]).') ORDER BY title';
$result = select($sql);
$new_place_array = array();
$place = 0;
while ( $row = mysql_fetch_assoc($result) ) {
$place++;
$new_place_array[$row['item_id']] = $place;
}
foreach ($children_array[$father_id] as $child_id) {
if ( !empty($new_place_array[$child_id]) ) {
$sql = 'UPDATE tag2tag SET sorting_place='.$new_place_array[$child_id].' WHERE from_item_id='.$father_id.' AND to_item_id='.$child_id.';';
$sql_array[] = $sql;
}
}
}
init_progress_bar(count(array_unique($sql_array)));
foreach ( array_unique($sql_array) as $sql ) {
$result = select($sql);
update_progress_bar(count(array_unique($sql_array)));
}
} else {
echo('<br/>nothing to do'."\n");
}
// end of execution time
$time_end = getmicrotime();
$time = round($time_end - $time_start,3);
echo "<br/>Execution time: ".mb_sprintf("%02d:%02d:%02d", (int)($time/3600), (int)(fmod($time,3600)/60), (int)fmod(fmod($time,3600), 60))."\n";
?>
开发者ID:a2call,项目名称:commsy,代码行数:31,代码来源:04_db_tag2tag_sorting_place.php
示例14: read_body
function read_body($ch, $string)
{
global $fout, $file_size, $downloaded, $counter, $version, $latest_version, $current_installed_pfsense_version;
$length = strlen($string);
$downloaded += intval($length);
$downloadProgress = round(100 * (1 - $downloaded / $file_size), 0);
$downloadProgress = 100 - $downloadProgress;
$a = $file_size;
$b = $downloaded;
$c = $downloadProgress;
$text = " Auto Update Download Status\\n";
$text .= "---------------------------------\\n";
$text .= " Latest Version : {$latest_version}\\n";
$text .= " Current Version : {$current_installed_pfsense_version}\\n";
$text .= " File size : {$a}\\n";
$text .= " Downloaded : {$b}\\n";
$text .= " Percent : {$c}%\\n";
$text .= "---------------------------------\\n";
$counter++;
if ($counter > 150) {
update_output_window($text);
update_progress_bar($downloadProgress);
$counter = 0;
}
fwrite($fout, $string);
return $length;
}
开发者ID:rootsghost,项目名称:5651-pfsense,代码行数:27,代码来源:system_firmware_auto.php
示例15: select
$success_array[] = select($sql,false,'utf8');
unset($sql);
$sql = getCreateTableSQL(str_replace('utf8_','',$table),$column_array,'utf8');
$success_array[] = select($sql,false,'utf8');
unset($sql);
$sql = 'INSERT INTO '.str_replace('utf8_','',$table).' SELECT * FROM '.$table.';';
$success_array[] = select($sql,false,'utf8');
unset($sql);
$sql = 'DROP TABLE '.$table.';';
$success_array[] = select($sql,false,'utf8');
unset($sql);
update_progress_bar(count($utf8_table_array));
}
echo(LINEBREAK);
flush();
// success
foreach ( $success_array as $success_item ) {
$success = $success && $success_item;
}
$success_array = array();
// delete old_tables
echo(LINEBREAK);
echo('STEP8: delete old tables');
echo(LINEBREAK);
flush();
开发者ID:a2call,项目名称:commsy,代码行数:31,代码来源:04_db_utf8.php
示例16: process_disambiguations
function process_disambiguations()
{
global $session_data;
set_progress_bar_title('Processing ambiguous entries');
if (!@$session_data['ambiguities']) {
return;
}
$i = 0;
foreach (array_keys($session_data['ambiguities']) as $id) {
$ambig_entry =& $session_data['ambiguities'][$id];
if (!$ambig_entry->getPotentialMatches()) {
$ambig_entry =& $ambig_entry->_ancestor;
}
if (!@$_REQUEST['ambig'][$id]) {
// user hasn't chosen an option, let them sit there and fester
$ambig_entry->_matches = array();
continue;
}
$ambig_bib_id = $_REQUEST['ambig'][$id];
if ($ambig_bib_id == -1) {
// user has selected NEW -- none of the presented options were correct
// move the hitherto potential matches to DEFINITE NON-MATCHES
$ambig_entry->eliminatePotentialMatches();
} else {
if (in_array($ambig_bib_id, $ambig_entry->getPotentialMatches())) {
setPermanentBiblioID($ambig_entry, $ambig_bib_id);
$ambig_entry->eliminatePotentialMatches();
} else {
// funny buggers
$ambig->_matches = array();
}
}
update_progress_bar(++$i / count($session_data['ambiguities']));
}
update_progress_bar(-1);
flush_fo_shizzle();
}
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:37,代码来源:importerFramework.php
示例17: add_to_msg
add_to_msg('Storing Sync Info', false);
write_array_to_file('sync_info', $sync_info, 'modules/Sync/config.php');
add_to_msg('<b>Sync Complete</b>', false);
$_REQUEST['do_action'] = 'execute';
$_REQUEST['repair_silent'] = true;
global $current_user;
$current_user->is_admin = '1';
require_once 'ModuleInstall/ModuleInstaller.php';
global $mod_strings, $current_language;
$mod_strings = return_module_language($current_language, 'Administration');
$mi = new ModuleInstaller();
$mi->rebuild_all();
$current_user->is_admin = '0';
echo '<script>document.getElementById("stop_sync_btn").value="Done"</script>';
echo '<script>opener.location.href = "index.php?module=Home&action=index";</script>';
update_progress_bar('Total', sizeof($sync_modules), sizeof($sync_modules));
//$current_user->setPreference('last_sync'. $sync_module, $start_time);
clear_sync_session();
unset($_SESSION['ACL']);
}
}
}
} else {
}
}
} else {
include_once 'syncconnect.php';
}
echo '</form>';
if ($sync_module_index > -1) {
echo '<br><br><form action="index.php" name="restart_sync" id="restart_sync"><input type="hidden" name="action" value="Popup"><input type="hidden" name="module" value="Sync"><input type="hidden" name="new_sync" value="new_sync"></form>';
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:Popup.php
示例18: link_items
$insert_query = 'INSERT INTO link_items ( item_id, context_id , creator_id , deleter_id ,
creation_date , modification_date , deletion_date , first_item_id ,
first_item_type , second_item_id , second_item_type )
VALUES ("'.$link_id.'", "'.$room_id.'", "'.$user_id.'", NULL , "'
.date("Y-m-d H:i:s").'", "'.date("Y-m-d H:i:s").'", NULL , "'.$user_id.'", '
.'"user", "'.$group_all_id.'", '
.'"group")';
mysql_query($insert_query);
if ($error = mysql_error()) {
echo '<br />'.$error." QUERY: ".$insert_query.'<br />'."\n";
$success = false;
}
}
// next user
$row2 = mysql_fetch_row($result2);
$user_id = $row2[0];
}
// next room
$row = mysql_fetch_row($result);
$room_id = $row[0];
$campus_id = $row[1];
update_progress_bar($count_rooms);
}
}
// end of execution time
echo(getProcessedTimeInHTML($time_start));
?>
开发者ID:a2call,项目名称:commsy,代码行数:30,代码来源:02_clean_links_to_group_all.php
示例19: while
while ($item_id) {
$filename_on_disc = '../../var/'.$portal_id.'/'.$context_id.'/cid'.$context_id.'_'.$item_id.'_'.$filename;
if (file_exists($filename_on_disc)) {
$size = filesize($filename_on_disc);
if ( !empty($size) ) {
$query = 'UPDATE files SET size="'.$size.'" WHERE files_id="'.$item_id.'";';
$succ = select($query);
$success = $success and $succ;
}
}
$row = mysql_fetch_row($result);
$item_id = $row[0];
$context_id = $row[1];
$filename = $row[2];
$portal_id = $row[3];
update_progress_bar($count);
}
}
if ($success) {
echo('[ <font color="#00ff00">done</font> ]<br/>'."\n");
} else {
echo('[ <font color="#ff0000">failed</font> ]<br/>'."\n");
}
// end of execution time
$time_end = getmicrotime();
$time = round($time_end - $time_start,3);
echo "<br/>Execution time: ".mb_sprintf("%02d:%02d:%02d", (int)($time/3600), (int)(fmod($time,3600)/60), (int)fmod(fmod($time,3600), 60))."\n";
?>
开发者ID:a2call,项目名称:commsy,代码行数:31,代码来源:03_db_files_insert_size.php
示例20: update_progress_bar
$ibfd->module = $module;
for ($i = $offset; $i < $total && $i < $offset + $recordsPerPage; $i++) {
$ibfd->count = $i;
/* Don't turbo Users or Teams */
if (!$_SESSION['turbo'] || $i == $offset || $module != 'Users' || $module != 'Teams') {
$ibfd->clean();
$ibfd->count = $i;
$ibfd->generateData();
}
$ibfd->generateId();
$ibfd->createInserts();
$ibfd->generateRelationships();
$_SESSION['processedRecords']++;
if ($i % 10 == 0) {
update_progress_bar('modules_progress', $_SESSION['processedRecords'], $_SESSION['totalRecords']);
update_progress_bar('module_progress', $i, $total);
}
//flush the relatedQueries every 2000, and at the end of each page.
if ($relQueryCount >= 2000 || $i == $total - 1 || $i == $offset + $recordsPerPage - 1) {
echo '.';
foreach ($GLOBALS['relatedQueries'] as $data) {
$head = $data['head'];
unset($data['head']);
processQueries($head, $data);
}
$GLOBALS['relatedQueries'] = array();
$relQueryCount = 0;
}
}
/* Use our query wrapper that makes things fast. */
processQueries($GLOBALS['queryHead'], $GLOBALS['queries']);
开发者ID:shep517,项目名称:Tidbit,代码行数:31,代码来源:install.php
注:本文中的update_progress_bar函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论