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

Source for file circleplain.php

Documentation is available at circleplain.php

  1. <?php 
  2. @include '../include_path.php';
  3. /**
  4.  * plain Circle Progress example.
  5.  *
  6.  * @version    $Id: circleplain.php,v 1.1 2004/06/29 20:48:52 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->setStringAttributes('background-color=#eeeeee');
  19. $ui->setCellAttributes('width=50 height=50 spacing=0 background-color=#eeeeee');
  20.  
  21. if (file_exists('../temp/c0.png')) {
  22.     // uses cached files rather than create it again and again
  23.     foreach (range(0,10as $index{
  24.         $ui->setCellAttributes(array('background-image' => '../temp/c'.$index.'.png'),$index);
  25.     }
  26. else {
  27.     // creates circle segments pictures only once
  28.     $ui->drawCircleSegments('../temp''c%s.png');
  29. }
  30. ?>
  31. <html>
  32. <head>
  33. <title>Basic Circle ProgressBar example</title>
  34. <style type="text/css">
  35. <!--
  36. <?php echo $bar->getStyle()?>
  37.  
  38. body {
  39.     background-color: #EEEEEE;
  40.     color: #000000;
  41.     font-family: Verdana, Arial;
  42. }
  43.  
  44. a:visited, a:active, a:link {
  45.     color: navy;
  46. }
  47. // -->
  48. </style>
  49. <script type="text/javascript">
  50. <!--
  51. <?php echo $ui->getScript()?>
  52. //-->
  53. </script>
  54. </head>
  55. <body>
  56. <h1><?php echo basename(__FILE__)?></h1>
  57.  
  58. <?php 
  59. echo $bar->toHtml()
  60. $bar->run();
  61. ?>
  62.  
  63. <p>&lt;&lt; <a href="../index.html">Back examples TOC</a></p>
  64.  
  65. </body>
  66. </html>

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