echo $bar->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <?php echo $bar->toHtml(); $bar->run(); ?> </body> </html>
function InitProgressBar($increment = 1) { global $progress_bar; $progress_bar = new HTML_Progress(); $progress_bar->setAnimSpeed(100); //$progress_bar->setIncrement( (int)$increment ); //$progress_bar->setIndeterminate(true); $progress_bar->setBorderPainted(true); $ui =& $progress_bar->getUI(); $ui->setCellAttributes('active-color=#3874B4 inactive-color=#CCCCCC width=10'); $ui->setBorderAttributes('width=1 color=navy'); $ui->setStringAttributes('width=60 font-size=14 background-color=#FFFFFF align=center'); ?> <html> <head> <style type="text/css"> <!-- <?php echo $progress_bar->getStyle(); ?> body { background-color: #FFFFFF; color: #FFFFFF; font-family: Verdana, freesans; } a:visited, a:active, a:link { color: yellow; } // --> </style> <script type="text/javascript"> <!-- <?php echo $progress_bar->getScript(); ?> //--> </script> </head> <body> <div align="center"> <?php echo $progress_bar->toHtml(); }
echo $meter->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $meter->getScript(); ?> //--> </script> </head> <body> <?php echo $meter->toHtml(); @set_time_limit(0); // unlimited time operation (removed 30s default restriction) $f = new Net_FTP(); // // 3. connect to the FTP server // $ret = $f->connect($ftp['host'], $ftp['port']); if (PEAR::isError($ret)) { die($ret->getMessage()); } printf('connected at <b>%s</b><br />', $ftp['host']); // // 4. login to the FTP server as a well-known user // $ret = $f->login($ftp['user'], $ftp['pass']);
echo $progress->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $progress->getScript(); ?> //--> </script> </head> <body> <?php echo $progress->toHtml(); if (isset($_GET['ID'])) { if ($version > 1.1) { $progress->run(); // run method is born on version 1.2.0RC3 } else { // do the same as run() method do { $progress->display(); myFunctionHandler($progress->getValue(), $progress); if ($progress->getPercentComplete() == 1) { if ($progress->isIndeterminate()) { $progress->setValue(0); } else { break; }
?> //--> </script> </head> <body> <table class="container"> <tr> <td width="25%" align="center"> <?php echo $bar1->toHtml(); ?> </td> <td width="25%" align="center"> <?php echo $bar2->toHtml(); ?> </td> </tr> </table> <?php do { $bar1->display(); $bar1->process(); // warning: don't forget it (even for a demo) if ($bar1->getPercentComplete() == 1) { $bar1->setValue(0); // the 1st progress bar has reached 100%, do a new loop } else { $bar1->incValue();
$arr = $form->getElementValue('border'); $border = $arr[0]; $arr = $form->getElementValue('color'); $color = $arr[0]; } else { $border = $defaultValues['border']; $color = $defaultValues['color']; } $bar = new HTML_Progress(); $bar->setAnimSpeed(200); $bar->setIncrement(10); $bar->setBorderPainted(true); $bar->setStringPainted(true); // get space for the string $bar->setString(''); // but don't paint it $bar->setProgressHandler('myFunctionHandler'); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#7B7B88 inactive-color=#D0D0D0 width=10'); $ui->setBorderAttributes(array('width' => 2, 'color' => $color, 'style' => $border)); $ui->setStringAttributes(array('width' => 320, 'font-size' => 10, 'align' => 'left', 'valign' => 'bottom', 'background-color' => '#D0D0D0')); $ui->setProgressAttributes('width=320'); $tpl->setVariable("L_STYLESHEET", $bar->getStyle()); $tpl->setVariable("L_JAVASCRIPT", $ui->getScript()); $tpl->setVariable("L_PROGRESS_BAR", $bar->toHtml()); $renderer = new HTML_QuickForm_Renderer_ITStatic($tpl); $form->accept($renderer); $tpl->show(); $bar->run(); $bar->display(); // to display the last custom string