Added progress bar class
This commit is contained in:
parent
a988babb77
commit
629114bac5
9 changed files with 114 additions and 110 deletions
23
test/phpprogressbar.php
Normal file
23
test/phpprogressbar.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
require_once("../class/PHPProgressBar.php");
|
||||
// Example of use
|
||||
echo"<html><body><center>";
|
||||
$p1 = new PHPProgressBar(550, 16, "../img/bar-grey.gif", "../img/bar-life.gif");
|
||||
$p2 = new PHPProgressBar(550, 16, "../img/bar-grey.gif", "../img/bar-mana.gif");
|
||||
$p3 = new PHPProgressBar(550, 16, "../img/bar-grey.gif", "../img/bar-life.gif");
|
||||
$p4 = new PHPProgressBar(550, 16, "../img/bar-grey.gif", "../img/bar-mana.gif");
|
||||
for($i=0;$i<=100;$i+=2){
|
||||
sleep(1);
|
||||
$p1->setValue($i);
|
||||
$p1->setText($i."%");
|
||||
$p2->setValue($i/2,1);
|
||||
$p2->setText(($i/2)."%",1);
|
||||
$p3->setValue($i/4,2);
|
||||
$p3->setText(($i/4)."%",2);
|
||||
$p4->setValue($i/3,3);
|
||||
$p4->setText(($i/3)."%",3);
|
||||
//echo $i."% > ";
|
||||
}
|
||||
echo"</center></body></html>";
|
||||
$p1->redirect("http://google.com");
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue