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

Source for file javadanse.php

Documentation is available at javadanse.php

  1. <?php 
  2. @include '../include_path.php';
  3. /**
  4.  * 20 cells Reverse Horizontal ProgressBar example with JavaScript customization.
  5.  * 
  6.  * @version    $Id: javadanse.php,v 1.1 2004/07/05 21:32:09 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(5);
  16. $bar->setBorderPainted(true);
  17.  
  18. $ui =$bar->getUI();
  19. $ui->setFillWay('reverse');
  20. $ui->setCellCount(20);
  21. $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=20 height=20');
  22. $ui->setBorderAttributes('width=1 color=#000000');
  23. $ui->setStringAttributes('width=440 font-size=14 color=#FF0000 align=center valign=bottom');
  24. $ui->setScript('progress_number.js');
  25.  
  26. foreach (range(0,2as $index{
  27.     $ui->setCellAttributes('color=red'$index);
  28. }
  29. foreach (range(3,6as $index{
  30.     $ui->setCellAttributes('color=yellow'$index);
  31. }
  32. foreach (range(7,9as $index{
  33.     $ui->setCellAttributes('color=white '$index);
  34. }
  35. ?>
  36. <!DOCTYPE html
  37.     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  38.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  39.  
  40. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  41. <head>
  42. <title>JavaDanse Progress example</title>
  43. <style type="text/css">
  44. <!--
  45. <?php echo $bar->getStyle()?>
  46.  
  47. body {
  48.     background-color: #FFFFFF;
  49.     color: #000000;
  50.     font-family: Verdana, Arial;
  51. }
  52.  
  53. a:visited, a:active, a:link {
  54.     color: navy;
  55. }
  56. // -->
  57. </style>
  58. <script type="text/javascript" src="<?php echo $bar->getScript()?>"></script>
  59. </head>
  60. <body>
  61. <h1><?php echo basename(__FILE__)?></h1>
  62.  
  63. <?php 
  64. echo $bar->toHtml()
  65. $bar->run();
  66. ?>
  67.  
  68. <p>&lt;&lt; <a href="../index.html">Back examples TOC</a></p>
  69.  
  70. </body>
  71. </html>

Documentation generated on Mon, 11 Mar 2019 13:52:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.