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

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