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

Source for file display_errors.php

Documentation is available at display_errors.php

  1. <?php 
  2. @include '../../include_path.php';
  3. /**
  4.  * Natural Horizontal ProgressBar example with blue skin.
  5.  * Display errors only on browser screen with full context
  6.  * 
  7.  * @version    $Id: display_errors.php,v 1.1 2004/04/18 13:25:43 farell Exp $
  8.  * @author     Laurent Laville <pear@laurent-laville.org>
  9.  * @package    HTML_Progress
  10.  */
  11.  
  12. require_once 'HTML/Progress.php';
  13.  
  14. $logger = array();
  15. $logger['handler']['display'= array(
  16.     'conf' => array(
  17.                  'printf' => '<b>%s</b>: %s <br/>'
  18.                              . '<font color="blue">'
  19.                              . '[class="%s" method="%s" file="%s" line="%s"]'
  20.                              . '</font>',
  21.                  'ereg' => 'in (.*)::(.*) \(file (.*) at line (.*)\)'
  22.                    )
  23. );
  24.  
  25. $bar = new HTML_Progress($logger);
  26. $bar->setAnimSpeed('100');
  27. ?>
  28. <html>
  29. <head>
  30. <title>FileLogger Progress example</title>
  31. <style type="text/css">
  32. <!--
  33. <?php echo $bar->getStyle()?>
  34.  
  35. body {
  36.     background-color: #EEEEEE;
  37.     color: #000000;
  38.     font-family: Verdana, Arial;
  39. }
  40.  
  41. a:visited, a:active, a:link {
  42.     color: navy;
  43. }
  44. // -->
  45. </style>
  46. <script type="text/javascript">
  47. <!--
  48. <?php echo $bar->getScript()?>
  49. //-->
  50. </script>
  51. </head>
  52. <body>
  53. <h1><?php echo basename(__FILE__)?></h1>
  54.  
  55. <?php 
  56. echo $bar->toHtml()
  57.  
  58. do {
  59.     $bar->display();
  60.     if ($bar->getPercentComplete(== 1{
  61.         break;   // the progress bar has reached 100%
  62.     }
  63.     $bar->incValue();
  64. while(1);
  65. ?>
  66.  
  67. <p>&lt;&lt; <a href="index.html">Back examples TOC</a></p>
  68.  
  69. </body>
  70. </html>

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