<?php
include_once 'class.php';
/**
* eight steps, each sleeps for 1 sec
*/
$buff = new ScriptProgress(8, 1000000);
# put some styles and a div-tag ahead
$buff->set("<style>div{margin:2px;border:2px solid blue;background-color:blue;display:inline-block;width:10px;height:16px;}</style><div></div>");
# do some stuff here
$buff->next();
# second div
$buff->set("<div></div>");
# do some stuff here
$buff->next();
# third div
$buff->set("<div></div>");
# do some stuff here
$buff->next();
$buff->set("<div></div>");
# do some stuff here
$buff->next();
$buff->set("<div></div>");
# do some stuff here
$buff->next();
$buff->set("<div></div>");
# do some stuff here
$buff->next();
$buff->set("<div></div>");
# do some stuff here
$buff->next();
$buff->set("<div></div>");
# do some stuff here
$buff->next();
# end operation
$buff->set("<br>done");
# do some stuff here
$buff->next();
|