cvs: pear /HTML_Progress/examples/observer complex.html complex.php default.html default.php simple.html simple.php
| From: | Laurent Laville | Date: | Mon, 25 Jul 2005 12:27:29 +0000 |
| Subject: | cvs: pear /HTML_Progress/examples/observer complex.html complex.php default.html default.php simple.html simple.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33302@lists.php.net to get a copy of this message | ||
farell Mon Jul 25 08:27:29 2005 EDT
Modified files:
/pear/HTML_Progress/examples/observer complex.html complex.php
default.html default.php
simple.html simple.php
Log:
Prepare examples to be removed from main package and moved into the optional package
http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/complex.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/observer/complex.html diff -u pear/HTML_Progress/examples/observer/complex.html:1.2 pear/HTML_Progress/examples/observer/complex.html:1.3 --- pear/HTML_Progress/examples/observer/complex.html:1.2 Sat Sep 25 08:56:37 2004 +++ pear/HTML_Progress/examples/observer/complex.html Mon Jul 25 08:27:28 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Complex ProgressBar Observer </span></h1> -<p align="right">$Date: 2004/09/25 12:56:37 $</p> +<p align="right">$Date: 2005/07/25 12:27:28 $</p> <div class="toc"> Table of contents </div> <ul> @@ -32,22 +32,22 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at lines 12, 13).</li> +<li>PEAR::HTML_Progress 1.2.2 or better (see source at lines 12, 13).</li> </ul> </p> <hr/> -<p><b>This example will run a complex observer mechanism which run two progress bar. +<p><b>This example will run a complex observer mechanism which run two progress bar. At each full loop of first bar, second bar is increment until this last one reach 100%.</b></p> -<p>All explains are in source code comments. Just a big warning: NEVER forget the line 145.</p> - +<p>All explains are in source code comments. Just a big warning: NEVER forget the line 144.</p> + <p>[<a href="#top">Top</a>]</p> - + <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> @@ -100,7 +100,7 @@ <p><img src="../screenshots/observer_complex.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> @@ -115,4 +115,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/complex.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/observer/complex.php diff -u pear/HTML_Progress/examples/observer/complex.php:1.1 pear/HTML_Progress/examples/observer/complex.php:1.2 --- pear/HTML_Progress/examples/observer/complex.php:1.1 Sun Jun 27 09:08:28 2004 +++ pear/HTML_Progress/examples/observer/complex.php Mon Jul 25 08:27:28 2005 @@ -1,12 +1,12 @@ -<?php -@include '../include_path.php'; +<?php /** * Observer ProgressBar example. Uses a custom observer class * that handled progress of the second bar. - * - * @version $Id: complex.php,v 1.1 2004/06/27 13:08:28 farell Exp $ + * + * @version $Id: complex.php,v 1.2 2005/07/25 12:27:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress.php'; @@ -23,7 +23,7 @@ function notify($event) { global $bar2; - + if (is_array($event)) { $log = isset($event['log']) ? $event['log'] : "undefined event id."; $val = isset($event['value']) ? $event['value'] : "unknown value"; @@ -69,32 +69,32 @@ $ui1->setComment('Complex Observer ProgressBar example'); $ui1->setTabOffset(1); $ui1->setProgressAttributes(array( - 'background-color' => '#e0e0e0' - )); + 'background-color' => '#e0e0e0' +)); $ui1->setStringAttributes(array( - 'valign' => 'left', - 'color' => 'red', - 'background-color' => 'lightblue' - )); + 'valign' => 'left', + 'color' => 'red', + 'background-color' => 'lightblue' +)); $ui2 =& $bar2->getUI(); $ui2->setTabOffset(1); $ui2->setBorderAttributes(array( - 'width' => 1, - 'style' => 'solid', - 'color' => 'navy' - )); + 'width' => 1, + 'style' => 'solid', + 'color' => 'navy' +)); $ui2->setCellAttributes(array( - 'active-color' => '#3874B4', - 'inactive-color' => '#EEEECC' - )); + 'active-color' => '#3874B4', + 'inactive-color' => '#EEEECC' +)); $ui2->setStringAttributes(array( - 'width' => '100', - 'align' => 'center', - 'valign' => 'right', - 'color' => 'yellow', - 'background-color' => 'lightblue' - )); + 'width' => '100', + 'align' => 'center', + 'valign' => 'right', + 'color' => 'yellow', + 'background-color' => 'lightblue' +)); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" @@ -126,15 +126,14 @@ </script> </head> <body> -<h1><?php echo basename(__FILE__); ?></h1> <table class="container"> <tr> <td width="25%" align="center"> -<?php echo $bar1->toHTML(); ?> +<?php echo $bar1->toHtml(); ?> </td> <td width="25%" align="center"> -<?php echo $bar2->toHTML(); ?> +<?php echo $bar2->toHtml(); ?> </td> </tr> </table> @@ -151,7 +150,5 @@ } while($bar2->getPercentComplete() < 1); ?> -<p><< <a href="../index.html">Back examples TOC</a></p> - </body> </html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/default.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/observer/default.html diff -u pear/HTML_Progress/examples/observer/default.html:1.2 pear/HTML_Progress/examples/observer/default.html:1.3 --- pear/HTML_Progress/examples/observer/default.html:1.2 Sat Sep 25 08:56:37 2004 +++ pear/HTML_Progress/examples/observer/default.html Mon Jul 25 08:27:28 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Default ProgressBar Observer </span></h1> -<p align="right">$Date: 2004/09/25 12:56:37 $</p> +<p align="right">$Date: 2005/07/25 12:27:28 $</p> <div class="toc"> Table of contents </div> <ul> @@ -32,34 +32,34 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at lines 11, 12).</li> +<li>PEAR::HTML_Progress 1.2.2 or better (see source at lines 11, 12).</li> </ul> </p> -<hr/> +<hr /> <p><b>This example will run a ProgressBar in determinate mode that will log into a flat file ('progress_observer.log') each changes.</b></p> <p>Here are the contents of that file : <form> <textarea readOnly="true" rows="12" cols="80" wrap="virtual"> -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} </textarea> </form> - -<p>A default progress bar observer is created at line 21, and attached at line 23 + +<p>A default progress bar observer is created at line 21, and attached at line 23 <p>[<a href="#top">Top</a>]</p> @@ -67,7 +67,7 @@ <h2><img src="../images/config.gif"/> Render options </h2> <pre> -speed = 100 is set at line 16 +speed = 100 is set at line 16 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <pre> @@ -75,7 +75,7 @@ </pre> <div class="fig">HTML_Progress::setIncrement()</div> <pre> -border painted with all default options at line 17 (color=black, shape=solid). +border painted with all default options at line 17 (color=black, shape=solid). Set size to 2 pixels at line 30. </pre> <div class="fig">HTML_Progress::setBorderPainted()</div> @@ -90,7 +90,7 @@ <p><img src="../screenshots/observer_standard.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> @@ -105,4 +105,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/default.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/observer/default.php diff -u pear/HTML_Progress/examples/observer/default.php:1.1 pear/HTML_Progress/examples/observer/default.php:1.2 --- pear/HTML_Progress/examples/observer/default.php:1.1 Sun Jun 27 09:08:28 2004 +++ pear/HTML_Progress/examples/observer/default.php Mon Jul 25 08:27:28 2005 @@ -1,11 +1,11 @@ -<?php -@include '../include_path.php'; +<?php /** * Observer ProgressBar example. Uses the default observer class. - * - * @version $Id: default.php,v 1.1 2004/06/27 13:08:28 farell Exp $ + * + * @version $Id: default.php,v 1.2 2005/07/25 12:27:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress.php'; @@ -17,7 +17,7 @@ $bar->setBorderPainted(true); $bar->setIncrement(10); -// 2. Creates and attach a listener +// 2. Creates and attach a listener $observer = new HTML_Progress_Observer(); $ok = $bar->addListener($observer); @@ -42,13 +42,13 @@ <?php echo $bar->getStyle(); ?> body { - background-color: #FFFFFF; - color: #000000; - font-family: Verdana, Arial; + background-color: #FFFFFF; + color: #000000; + font-family: Verdana, Arial; } a:visited, a:active, a:link { - color: navy; + color: navy; } // --> </style> @@ -59,30 +59,27 @@ </script> </head> <body> -<h1><?php echo basename(__FILE__); ?></h1> -<?php -echo $bar->toHTML(); +<?php +echo $bar->toHTML(); $bar->run(); ?> <form> Contents of file 'progress_observer.log' generated by HTML_Progress_Observer class <textarea readOnly="true" rows="12" cols="80" wrap="virtual"> -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} </textarea> </form> -<p><< <a href="../index.html">Back examples TOC</a></p> - </body> </html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/simple.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/observer/simple.html diff -u pear/HTML_Progress/examples/observer/simple.html:1.2 pear/HTML_Progress/examples/observer/simple.html:1.3 --- pear/HTML_Progress/examples/observer/simple.html:1.2 Sat Sep 25 08:56:37 2004 +++ pear/HTML_Progress/examples/observer/simple.html Mon Jul 25 08:27:28 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Simple ProgressBar Observer </span></h1> -<p align="right">$Date: 2004/09/25 12:56:37 $</p> +<p align="right">$Date: 2005/07/25 12:27:28 $</p> <div class="toc"> Table of contents </div> <ul> @@ -32,43 +32,43 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at lines 11, 12).</li> +<li>PEAR::HTML_Progress 1.2.2 or better (see source at lines 11, 12).</li> </ul> </p> <hr/> -<p><b>This example will run a ProgressBar with a custom class observer mechanism. +<p><b>This example will run a ProgressBar with a custom class observer mechanism. Output could be send to screen or on flat file 'observer_complex.log'.</b></p> <p>Here are the contents of that file : <form> <textarea readOnly="true" rows="21" cols="50" wrap="virtual"> -incValue = 5 -incValue = 10 -incValue = 15 -incValue = 20 -incValue = 25 -incValue = 30 -incValue = 35 -incValue = 40 -incValue = 45 -incValue = 50 -incValue = 55 -incValue = 60 -incValue = 65 -incValue = 70 -incValue = 75 -incValue = 80 -incValue = 85 -incValue = 90 -incValue = 95 -incValue = 100 +incValue = 5 +incValue = 10 +incValue = 15 +incValue = 20 +incValue = 25 +incValue = 30 +incValue = 35 +incValue = 40 +incValue = 45 +incValue = 50 +incValue = 55 +incValue = 60 +incValue = 65 +incValue = 70 +incValue = 75 +incValue = 80 +incValue = 85 +incValue = 90 +incValue = 95 +incValue = 100 </textarea> </form> - + <p>[<a href="#top">Top</a>]</p> @@ -76,7 +76,7 @@ <h2><img src="../images/config.gif"/> Render options </h2> <pre> -speed = 50 is set at line 46 +speed = 50 is set at line 46 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <pre> @@ -93,7 +93,7 @@ <p><img src="../screenshots/observer_simple.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> @@ -109,4 +109,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/simple.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/observer/simple.php diff -u pear/HTML_Progress/examples/observer/simple.php:1.1 pear/HTML_Progress/examples/observer/simple.php:1.2 --- pear/HTML_Progress/examples/observer/simple.php:1.1 Sun Jun 27 09:08:28 2004 +++ pear/HTML_Progress/examples/observer/simple.php Mon Jul 25 08:27:28 2005 @@ -1,11 +1,11 @@ -<?php -@include '../include_path.php'; +<?php /** * Observer ProgressBar example. Uses a custom observer class. - * - * @version $Id: simple.php,v 1.1 2004/06/27 13:08:28 farell Exp $ + * + * @version $Id: simple.php,v 1.2 2005/07/25 12:27:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress.php'; @@ -16,7 +16,7 @@ { var $_console; var $_out; - + function MyObserver($out) { $this->_console = '.' . DIRECTORY_SEPARATOR . 'observer_complex.log'; @@ -37,7 +37,7 @@ error_log("$msg \n", 3, $this->_console); } else { print ("$msg <br />\n"); - } + } } } @@ -46,7 +46,7 @@ $bar->setAnimSpeed(50); $bar->setIncrement(5); -// 3. Creates and attach a listener +// 3. Creates and attach a listener $observer = new MyObserver($_GET['out']); $ok = $bar->addListener($observer); @@ -73,14 +73,11 @@ </script> </head> <body> -<h1><?php echo basename(__FILE__); ?></h1> -<?php -echo $bar->toHTML(); +<?php +echo $bar->toHtml(); $bar->run(); ?> -<p><< <a href="../index.html">Back examples TOC</a></p> - </body> </html> \ No newline at end of file
http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/complex.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/observer/complex.html diff -u pear/HTML_Progress/examples/observer/complex.html:1.2 pear/HTML_Progress/examples/observer/complex.html:1.3 --- pear/HTML_Progress/examples/observer/complex.html:1.2 Sat Sep 25 08:56:37 2004 +++ pear/HTML_Progress/examples/observer/complex.html Mon Jul 25 08:27:28 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Complex ProgressBar Observer </span></h1> -<p align="right">$Date: 2004/09/25 12:56:37 $</p> +<p align="right">$Date: 2005/07/25 12:27:28 $</p> <div class="toc"> Table of contents </div> <ul> @@ -32,22 +32,22 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at lines 12, 13).</li> +<li>PEAR::HTML_Progress 1.2.2 or better (see source at lines 12, 13).</li> </ul> </p> <hr/> -<p><b>This example will run a complex observer mechanism which run two progress bar. +<p><b>This example will run a complex observer mechanism which run two progress bar. At each full loop of first bar, second bar is increment until this last one reach 100%.</b></p> -<p>All explains are in source code comments. Just a big warning: NEVER forget the line 145.</p> - +<p>All explains are in source code comments. Just a big warning: NEVER forget the line 144.</p> + <p>[<a href="#top">Top</a>]</p> - + <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> @@ -100,7 +100,7 @@ <p><img src="../screenshots/observer_complex.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> @@ -115,4 +115,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/complex.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/observer/complex.php diff -u pear/HTML_Progress/examples/observer/complex.php:1.1 pear/HTML_Progress/examples/observer/complex.php:1.2 --- pear/HTML_Progress/examples/observer/complex.php:1.1 Sun Jun 27 09:08:28 2004 +++ pear/HTML_Progress/examples/observer/complex.php Mon Jul 25 08:27:28 2005 @@ -1,12 +1,12 @@ -<?php -@include '../include_path.php'; +<?php /** * Observer ProgressBar example. Uses a custom observer class * that handled progress of the second bar. - * - * @version $Id: complex.php,v 1.1 2004/06/27 13:08:28 farell Exp $ + * + * @version $Id: complex.php,v 1.2 2005/07/25 12:27:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress.php'; @@ -23,7 +23,7 @@ function notify($event) { global $bar2; - + if (is_array($event)) { $log = isset($event['log']) ? $event['log'] : "undefined event id."; $val = isset($event['value']) ? $event['value'] : "unknown value"; @@ -69,32 +69,32 @@ $ui1->setComment('Complex Observer ProgressBar example'); $ui1->setTabOffset(1); $ui1->setProgressAttributes(array( - 'background-color' => '#e0e0e0' - )); + 'background-color' => '#e0e0e0' +)); $ui1->setStringAttributes(array( - 'valign' => 'left', - 'color' => 'red', - 'background-color' => 'lightblue' - )); + 'valign' => 'left', + 'color' => 'red', + 'background-color' => 'lightblue' +)); $ui2 =& $bar2->getUI(); $ui2->setTabOffset(1); $ui2->setBorderAttributes(array( - 'width' => 1, - 'style' => 'solid', - 'color' => 'navy' - )); + 'width' => 1, + 'style' => 'solid', + 'color' => 'navy' +)); $ui2->setCellAttributes(array( - 'active-color' => '#3874B4', - 'inactive-color' => '#EEEECC' - )); + 'active-color' => '#3874B4', + 'inactive-color' => '#EEEECC' +)); $ui2->setStringAttributes(array( - 'width' => '100', - 'align' => 'center', - 'valign' => 'right', - 'color' => 'yellow', - 'background-color' => 'lightblue' - )); + 'width' => '100', + 'align' => 'center', + 'valign' => 'right', + 'color' => 'yellow', + 'background-color' => 'lightblue' +)); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" @@ -126,15 +126,14 @@ </script> </head> <body> -<h1><?php echo basename(__FILE__); ?></h1> <table class="container"> <tr> <td width="25%" align="center"> -<?php echo $bar1->toHTML(); ?> +<?php echo $bar1->toHtml(); ?> </td> <td width="25%" align="center"> -<?php echo $bar2->toHTML(); ?> +<?php echo $bar2->toHtml(); ?> </td> </tr> </table> @@ -151,7 +150,5 @@ } while($bar2->getPercentComplete() < 1); ?> -<p><< <a href="../index.html">Back examples TOC</a></p> - </body> </html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/default.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/observer/default.html diff -u pear/HTML_Progress/examples/observer/default.html:1.2 pear/HTML_Progress/examples/observer/default.html:1.3 --- pear/HTML_Progress/examples/observer/default.html:1.2 Sat Sep 25 08:56:37 2004 +++ pear/HTML_Progress/examples/observer/default.html Mon Jul 25 08:27:28 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Default ProgressBar Observer </span></h1> -<p align="right">$Date: 2004/09/25 12:56:37 $</p> +<p align="right">$Date: 2005/07/25 12:27:28 $</p> <div class="toc"> Table of contents </div> <ul> @@ -32,34 +32,34 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at lines 11, 12).</li> +<li>PEAR::HTML_Progress 1.2.2 or better (see source at lines 11, 12).</li> </ul> </p> -<hr/> +<hr /> <p><b>This example will run a ProgressBar in determinate mode that will log into a flat file ('progress_observer.log') each changes.</b></p> <p>Here are the contents of that file : <form> <textarea readOnly="true" rows="12" cols="80" wrap="virtual"> -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} </textarea> </form> - -<p>A default progress bar observer is created at line 21, and attached at line 23 + +<p>A default progress bar observer is created at line 21, and attached at line 23 <p>[<a href="#top">Top</a>]</p> @@ -67,7 +67,7 @@ <h2><img src="../images/config.gif"/> Render options </h2> <pre> -speed = 100 is set at line 16 +speed = 100 is set at line 16 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <pre> @@ -75,7 +75,7 @@ </pre> <div class="fig">HTML_Progress::setIncrement()</div> <pre> -border painted with all default options at line 17 (color=black, shape=solid). +border painted with all default options at line 17 (color=black, shape=solid). Set size to 2 pixels at line 30. </pre> <div class="fig">HTML_Progress::setBorderPainted()</div> @@ -90,7 +90,7 @@ <p><img src="../screenshots/observer_standard.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> @@ -105,4 +105,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/default.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/observer/default.php diff -u pear/HTML_Progress/examples/observer/default.php:1.1 pear/HTML_Progress/examples/observer/default.php:1.2 --- pear/HTML_Progress/examples/observer/default.php:1.1 Sun Jun 27 09:08:28 2004 +++ pear/HTML_Progress/examples/observer/default.php Mon Jul 25 08:27:28 2005 @@ -1,11 +1,11 @@ -<?php -@include '../include_path.php'; +<?php /** * Observer ProgressBar example. Uses the default observer class. - * - * @version $Id: default.php,v 1.1 2004/06/27 13:08:28 farell Exp $ + * + * @version $Id: default.php,v 1.2 2005/07/25 12:27:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress.php'; @@ -17,7 +17,7 @@ $bar->setBorderPainted(true); $bar->setIncrement(10); -// 2. Creates and attach a listener +// 2. Creates and attach a listener $observer = new HTML_Progress_Observer(); $ok = $bar->addListener($observer); @@ -42,13 +42,13 @@ <?php echo $bar->getStyle(); ?> body { - background-color: #FFFFFF; - color: #000000; - font-family: Verdana, Arial; + background-color: #FFFFFF; + color: #000000; + font-family: Verdana, Arial; } a:visited, a:active, a:link { - color: navy; + color: navy; } // --> </style> @@ -59,30 +59,27 @@ </script> </head> <body> -<h1><?php echo basename(__FILE__); ?></h1> -<?php -echo $bar->toHTML(); +<?php +echo $bar->toHTML(); $bar->run(); ?> <form> Contents of file 'progress_observer.log' generated by HTML_Progress_Observer class <textarea readOnly="true" rows="12" cols="80" wrap="virtual"> -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} -a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:10;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:20;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:30;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:40;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:50;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:60;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:70;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:80;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:90;} +a:2:{s:3:"log";s:8:"incValue";s:5:"value";i:100;} </textarea> </form> -<p><< <a href="../index.html">Back examples TOC</a></p> - </body> </html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/simple.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/observer/simple.html diff -u pear/HTML_Progress/examples/observer/simple.html:1.2 pear/HTML_Progress/examples/observer/simple.html:1.3 --- pear/HTML_Progress/examples/observer/simple.html:1.2 Sat Sep 25 08:56:37 2004 +++ pear/HTML_Progress/examples/observer/simple.html Mon Jul 25 08:27:28 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Simple ProgressBar Observer </span></h1> -<p align="right">$Date: 2004/09/25 12:56:37 $</p> +<p align="right">$Date: 2005/07/25 12:27:28 $</p> <div class="toc"> Table of contents </div> <ul> @@ -32,43 +32,43 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at lines 11, 12).</li> +<li>PEAR::HTML_Progress 1.2.2 or better (see source at lines 11, 12).</li> </ul> </p> <hr/> -<p><b>This example will run a ProgressBar with a custom class observer mechanism. +<p><b>This example will run a ProgressBar with a custom class observer mechanism. Output could be send to screen or on flat file 'observer_complex.log'.</b></p> <p>Here are the contents of that file : <form> <textarea readOnly="true" rows="21" cols="50" wrap="virtual"> -incValue = 5 -incValue = 10 -incValue = 15 -incValue = 20 -incValue = 25 -incValue = 30 -incValue = 35 -incValue = 40 -incValue = 45 -incValue = 50 -incValue = 55 -incValue = 60 -incValue = 65 -incValue = 70 -incValue = 75 -incValue = 80 -incValue = 85 -incValue = 90 -incValue = 95 -incValue = 100 +incValue = 5 +incValue = 10 +incValue = 15 +incValue = 20 +incValue = 25 +incValue = 30 +incValue = 35 +incValue = 40 +incValue = 45 +incValue = 50 +incValue = 55 +incValue = 60 +incValue = 65 +incValue = 70 +incValue = 75 +incValue = 80 +incValue = 85 +incValue = 90 +incValue = 95 +incValue = 100 </textarea> </form> - + <p>[<a href="#top">Top</a>]</p> @@ -76,7 +76,7 @@ <h2><img src="../images/config.gif"/> Render options </h2> <pre> -speed = 50 is set at line 46 +speed = 50 is set at line 46 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <pre> @@ -93,7 +93,7 @@ <p><img src="../screenshots/observer_simple.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> @@ -109,4 +109,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/observer/simple.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/observer/simple.php diff -u pear/HTML_Progress/examples/observer/simple.php:1.1 pear/HTML_Progress/examples/observer/simple.php:1.2 --- pear/HTML_Progress/examples/observer/simple.php:1.1 Sun Jun 27 09:08:28 2004 +++ pear/HTML_Progress/examples/observer/simple.php Mon Jul 25 08:27:28 2005 @@ -1,11 +1,11 @@ -<?php -@include '../include_path.php'; +<?php /** * Observer ProgressBar example. Uses a custom observer class. - * - * @version $Id: simple.php,v 1.1 2004/06/27 13:08:28 farell Exp $ + * + * @version $Id: simple.php,v 1.2 2005/07/25 12:27:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress.php'; @@ -16,7 +16,7 @@ { var $_console; var $_out; - + function MyObserver($out) { $this->_console = '.' . DIRECTORY_SEPARATOR . 'observer_complex.log'; @@ -37,7 +37,7 @@ error_log("$msg \n", 3, $this->_console); } else { print ("$msg <br />\n"); - } + } } } @@ -46,7 +46,7 @@ $bar->setAnimSpeed(50); $bar->setIncrement(5); -// 3. Creates and attach a listener +// 3. Creates and attach a listener $observer = new MyObserver($_GET['out']); $ok = $bar->addListener($observer); @@ -73,14 +73,11 @@ </script> </head> <body> -<h1><?php echo basename(__FILE__); ?></h1> -<?php -echo $bar->toHTML(); +<?php +echo $bar->toHtml(); $bar->run(); ?> -<p><< <a href="../index.html">Back examples TOC</a></p> - </body> </html> \ No newline at end of file