Source for file liteall.php
Documentation is available at liteall.php
Demonstration of all the features of Progress2_Lite
version of Progress2 without any dependencies
@version $Id: liteall.php,v 1.1 2005/06/12 21:05:18 farell Exp $
@author Laurent Laville <pear@laurent-laville.org>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<title>Progress2 Lite - Full features </title>
require_once 'HTML/Progress2_Lite.php';
* NOTE: The function {@link http://www.php.net/manual/en/function.usleep.php}
* did not work on Windows systems until PHP 5.0.0
if ((substr(PHP_OS , 0 , 3 ) == 'WIN') && (substr(PHP_VERSION ,0 ,1 ) < '5') ){
for ($i=0; $i< $usecs; $i++ ) { }
$opt1 = array ('left' => 50 , 'top' => 50 , 'width' => 40 , 'height' => 270 ,
$pbl1->addLabel ('percent','pct1');
$pct1 = array ('left' => 50 , 'top', 35 , 'width' => 40 );
$pbl1->setLabelAttributes ('pct1', $pct1);
$pbl1->setDirection ('down');
$opt2 = array ('left' => 120 , 'top' => 50 , 'height' => 40 );
$pbl2->setBarAttributes (array (
'border-color' => '#660066',
'background-color' => '#000000'
$pbl2->addLabel ('crossbar','crt1');
$crt1 = array ('left' => 120 , 'top' => 30 );
$pbl2->setLabelAttributes ('crt1', $crt1);
$opt3 = array ('left' => 120 , 'top' => 120 , 'width' => 400 , 'height' => 70 );
$pbl3->setBarAttributes (array (
'background-color' => 'yellow'
$pbl3->setDirection ('left');
$pbl3->addLabel ('text','txt1');
$pbl3->setLabelAttributes ('txt1', array ('color' => 'orange'));
$opt4 = array ('left' => 120 , 'top' => 220 , 'width' => 600 , 'height' => 100 ,
$pbl4->setBarAttributes (array (
'background-color' => '#66CCFF'
$pbl4->addLabel ('percent','pct1');
$pct1 = array ('left' => 120 , 'top' => 220 , 'width' => 600 , 'height' => 100 ,
$pbl4->setLabelAttributes ('pct1', $pct1);
for($i=1; $i<=220; $i++ ) {
if ($i==50 ) {$pbl2->hide (); }
if ($i==100 ) {$pbl3->hide (); }
if ($i==200 ) {$pbl4->hide (); }
$pbl1->setDirection ('up');
for($i=1; $i<=100; $i++ ) {
$crt1 = array ('left' => ($i * 3 ) + 120 , 'top' => 30 ,
'width' => 10 , 'height' => 0 ,
$pbl2->setLabelAttributes ('crt1', $crt1);
$pbl2->setBarAttributes (array (
$pbl2->setLabelAttributes ('crt1', array ('value' => ''));
$pbl3->setLabelAttributes ('txt1', array ('value' => 'searching ...'));
for($i=1; $i<=100; $i++ ) {
$pbl3->setLabelAttributes ('txt1', array ('value' => 'loading ...'));
$pbl3->setLabelAttributes ('txt1', array ('value' => 'writing ...'));
$pbl3->setLabelAttributes ('txt1', array ('value' => 'complete'));
for($i=50; $i<=150; $i+=5 ) {
Documentation generated on Mon, 11 Mar 2019 14:16:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|