home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / monitor_default2.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  1.5 KB  |  61 lines

  1. <?php
  2. /**
  3.  * Default Monitor ProgressBar example with logging events.
  4.  *
  5.  * @version    $Id: monitor_default2.php,v 1.1 2004/02/10 11:55:41 farell Exp $
  6.  * @author     Laurent Laville <pear@laurent-laville.org>
  7.  * @package    HTML_Progress
  8.  */
  9.  
  10. require_once 'HTML/Progress/monitor.php';
  11. require_once 'progressHandler.php';
  12.  
  13.  
  14. $monitor = new HTML_Progress_Monitor();
  15.  
  16. // As action (callback) defined, is not a huge task (and take few time)
  17. // then we must make animation slower to see something.
  18. $monitor->setAnimSpeed(100);
  19. $monitor->setProgressHandler('logger');
  20. ?>
  21. <!DOCTYPE html
  22.     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  23.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  24.  
  25. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  26. <head>
  27. <title>ProgressBar Monitor - Default renderer </title>
  28. <style type="text/css">
  29. <!--
  30. .progressStatus {
  31.     color:#000000; 
  32.     font-size:10px;
  33. }
  34. <?php echo $monitor->getStyle(); ?>
  35. // -->
  36. </style>
  37. <script type="text/javascript">
  38. <!--
  39. <?php echo $monitor->getScript(); ?>
  40. //-->
  41. </script>
  42. </head>
  43. <body>
  44.  
  45. <h1>Simple Monitor and user callback</h1>
  46. <p>Used default QuickForm renderer without any form template customizations. 
  47. User callback 'logger' will write into a file through PEAR::Log.</p>
  48.  
  49. <?php 
  50. // Display progress monitor dialog box
  51. echo $monitor->toHtml();
  52.  
  53.  
  54. $monitor->run();
  55. ?>
  56.  
  57. <p><< <a href="index.html">Back examples TOC</a></p>
  58. <p><b><i>href: examples/<?php echo basename(__FILE__); ?></i></b></p>
  59.  
  60. </body>
  61. </html>