* @package HTML_Progress */ require_once ('HTML/Progress.php'); $bar = new HTML_Progress(); $bar->setIncrement(5); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setFillWay('reverse'); $ui->setCellCount(20); $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=20 height=20'); $ui->setBorderAttributes('width=1 color=#000000'); $ui->setStringAttributes('width=440 font-size=14 color=#FF0000 align=center valign=bottom'); $ui->setScript('progress_number.js'); foreach (range(0,2) as $index) { $ui->setCellAttributes('color=red', $index); } foreach (range(3,6) as $index) { $ui->setCellAttributes('color=yellow', $index); } foreach (range(7,9) as $index) { $ui->setCellAttributes('color=white ', $index); } ?> JavaDanse Progress example

toHtml(); do { $bar->display(); if ($bar->getPercentComplete() == 1) { break; // the progress bar has reached 100% } $bar->incValue(); } while(1); ?>

<< Back examples TOC