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

Source for file circleback.php

Documentation is available at circleback.php

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

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