HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]

Source for file rectangleback.php

Documentation is available at rectangleback.php

  1. <?php 
  2. @include '../../include_path.php';
  3. /**
  4.  * Reverse Rectangle Progress example.
  5.  * 
  6.  * @version    $Id: rectangleback.php,v 1.1 2004/04/18 13:25:44 farell 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->setAnimSpeed(100);
  15. $bar->setIncrement(10);
  16.  
  17. $ui =$bar->getUI();
  18. $ui->setFillWay('reverse');
  19. $ui->setOrientation(HTML_PROGRESS_POLYGONAL);
  20. $ui->setCellAttributes(array(
  21.         'width'  => 10,
  22.         'height' => 10,
  23.         'active-color'   => 'red',
  24.         'inactive-color' => 'orange',
  25.         )
  26. );
  27. $ui->setCellCoordinates(15,3);         // Rectangle 15x3
  28. ?>
  29. <html>
  30. <head>
  31. <title>Reverse Rectangle ProgressBar example</title>
  32. <style type="text/css">
  33. <!--
  34. <?php echo $bar->getStyle()?>
  35.  
  36. body {
  37.     background-color: #FFFFFF;
  38.     color: #000000;
  39.     font-family: Verdana, Arial;
  40. }
  41.  
  42. a:visited, a:active, a:link {
  43.     color: navy;
  44. }
  45. // -->
  46. </style>
  47. <script type="text/javascript">
  48. <!--
  49. <?php echo $ui->getScript()?>
  50. //-->
  51. </script>
  52. </head>
  53. <body>
  54. <h1><?php echo basename(__FILE__)?></h1>
  55.  
  56. <?php 
  57. echo $bar->toHtml()
  58.  
  59. do {
  60.     $bar->display();
  61.     if ($bar->getPercentComplete(== 1{
  62.         break;   // the progress bar has reached 100%
  63.     }
  64.     $bar->incValue();
  65. while(1);
  66.  
  67. ?>
  68.  
  69. <p>&lt;&lt; <a href="index.html">Back examples TOC</a></p>
  70.  
  71. </body>
  72. </html>

Documentation generated on Mon, 11 Mar 2019 10:15:09 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.