home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / ancestor.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  1.4 KB  |  66 lines

  1. <?php 
  2. /**
  3.  * Basic Horizontal ProgressBar v0.5 style example.
  4.  * See also ProgressMaker usage with pre-set UI model 'Ancestor'.
  5.  * 
  6.  * @version    $Id: ancestor.php,v 1.1 2003/11/15 18:27:10 thesaur Exp $
  7.  * @author     Laurent Laville <pear@laurent-laville.org>
  8.  * @package    HTML_Progress
  9.  */
  10.  
  11. require_once ('HTML/Progress.php');
  12.  
  13. $bar = new HTML_Progress();
  14. $bar->setIncrement(10);
  15.  
  16. $ui =& $bar->getUI();
  17. $ui->setStringAttributes('width=60 font-size=14 align=center');
  18.  
  19. ?>
  20. <!DOCTYPE html
  21.     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  22.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  23.  
  24. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  25. <head>
  26. <title>Ancestor Progress example</title>
  27. <style type="text/css">
  28. <!--
  29. <?php echo $bar->getStyle(); ?>
  30.  
  31. body {
  32.     background-color: #444444;
  33.     color: #EEEEEE;
  34.     font-family: Verdana, Arial;
  35. }
  36.  
  37. a:visited, a:active, a:link {
  38.     color: yellow;
  39. }
  40. // -->
  41. </style>
  42. <script type="text/javascript">
  43. <!--
  44. <?php echo $bar->getScript(); ?>
  45. //-->
  46. </script>
  47. </head>
  48. <body>
  49. <h1><?php echo basename(__FILE__); ?></h1>
  50.  
  51. <?php 
  52. echo $bar->toHtml(); 
  53.  
  54. do {
  55.     $bar->display();
  56.     if ($bar->getPercentComplete() == 1) {
  57.         break;   // the progress bar has reached 100%
  58.     }
  59.     $bar->incValue();
  60. } while(1);
  61. ?>
  62.  
  63. <p><< <a href="index.html">Back examples TOC</a></p>
  64.  
  65. </body>
  66. </html>