";
echo str_repeat(' ',256);
progress_bar_flush();
start_flow_bar($name, $delay);
}
function start_flow_bar($name, $delay)
{
$delay *= 1000;
$timer_id = $name . '_id';
echo "
";
echo str_repeat(' ',256);
progress_bar_flush();
}
function destroy_flow_bar($name)
{
$timer_id = $name . '_id';
echo "";
echo str_repeat(' ',256);
progress_bar_flush();
}
function display_progress_bar($name,$current, $total)
{
$percent = $current/$total * 100;
$remain = 100 - $percent;
$status = floor($percent);
//scale to a larger size
$percent *= 2;
$remain *= 2;
if($remain == 0){
$remain = 1;
}
if($percent == 0){
$percent = 1;
}
echo "
";
if($status == 0){
echo "";
}
echo str_repeat(' ',256);
progress_bar_flush();
}
function update_progress_bar($name,$current, $total)
{
$percent = $current/$total * 100;
$remain = 100 - $percent;
$status = floor($percent);
//scale to a larger size
$percent *= 2;
$remain *= 2;
if($remain == 0){
$remain = 1;
}
if($status == 100){
echo "";
}
if($status == 0){
echo "";
echo "";
}
if($status > 0){
echo "";
}
if($percent == 0){
$percent = 1;
}
echo "";
progress_bar_flush();
}