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

Source for file bgimages.php

Documentation is available at bgimages.php

  1. <?php 
  2. @include '../include_path.php';
  3. /**
  4.  * Natural Horizontal with background images ProgressBar example.
  5.  * See also ProgressMaker usage with pre-set UI model 'BgImages'.
  6.  * 
  7.  * @version    $Id: bgimages.php,v 1.1 2004/07/05 21:32:09 farell Exp $
  8.  * @author     Laurent Laville <pear@laurent-laville.org>
  9.  * @package    HTML_Progress
  10.  */
  11.  
  12. require_once 'HTML/Progress.php';
  13.  
  14. $bar = new HTML_Progress();
  15. $bar->setAnimSpeed(100);
  16. $bar->setIncrement(10);
  17. $bar->setBorderPainted(true);
  18.  
  19. $ui =$bar->getUI();
  20. $ui->setCellAttributes(array(
  21.     'active-color' => '#000084',
  22.     'inactive-color' => '#3A6EA5',
  23.     'width' => 25,
  24.     'spacing' => 0,
  25.     'background-image' => 'download.gif'
  26. ));
  27. $ui->setBorderAttributes('width=1 style=inset color=white');
  28. $ui->setStringAttributes(array(
  29.     'width' => 60,
  30.     'font-size' => 10,
  31.     'background-color' => '#C3C6C3',
  32.     'align' => 'center',
  33.     'valign' => 'left'
  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>BgImages Progress example</title>
  43. <style type="text/css">
  44. <!--
  45. <?php echo $bar->getStyle()?>
  46.  
  47. body {
  48.     background-color: #C3C6C3;
  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">
  59. <!--
  60. <?php echo $bar->getScript()?>
  61. //-->
  62. </script>
  63. </head>
  64. <body>
  65. <h1><?php echo basename(__FILE__)?></h1>
  66.  
  67. <?php 
  68. echo $bar->toHtml()
  69. $bar->run();
  70. ?>
  71.  
  72. <p>&lt;&lt; <a href="../index.html">Back examples TOC</a></p>
  73.  
  74. </body>
  75. </html>

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