* @package HTML_Progress */ require_once ('HTML/Progress.php'); $bar = new HTML_Progress(); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10'); $ui->setBorderAttributes('width=1 color=navy'); $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE align=center'); $ui->setScript('progress_number.js'); foreach (range(0,2) as $index) { $ui->setCellAttributes('color=silver', $index); } foreach (range(3,6) as $index) { $ui->setCellAttributes('color=yellow', $index); } foreach (range(7,9) as $index) { $ui->setCellAttributes('color=orange', $index); } ?> BlueSandPlus Progress example

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

<< Back examples TOC