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(); }
$ui->setTab(' '); $ui->setCellAttributes(array('active-color' => '#000084', 'inactive-color' => '#3A6EA5', 'width' => 25, 'spacing' => 0, 'background-image' => 'download.gif')); $ui->setBorderAttributes('width=1 style=inset color=white'); $ui->setStringAttributes(array('width' => 60, 'font-size' => 10, 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'left')); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>BgImages Progress example</title> <style type="text/css"> <!-- <?php 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"> <!--
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FTP/Progress Observer example</title> <style type="text/css"> <!-- body { background-color: #CCCC99; color: #996; font-family: Verdana, Arial; } <?php echo $meter->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $meter->getScript(); ?> //--> </script> </head> <body> <?php echo $meter->toHtml();
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <style type="text/css"> <!-- body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } <?php echo $progress->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $progress->getScript(); ?> //--> </script> </head> <body> <?php echo $progress->toHtml();
$ui2->setCellAttributes('active-color=#3874B4 inactive-color=#FFDDAA width=50 height=13'); $ui2->setBorderAttributes('width=1 style=dashed color=#000000'); $ui2->setStringAttributes(array('font-size' => 8, 'color' => 'navy', 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'bottom')); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Multiple Vertical ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar1->getStyle(); echo $bar2->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } table.container { border: 1; border-color: navy;
$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