cvs: pear /HTML_Progress/examples/horizontal ancestor.html ancestor.php bgimages.html bgimages.php bluesand.html bluesand.php bluesandplus.html
bluesandplus.php bullit.html bullit.php download.gif javadanse.html javadanse.php model.html model.php nostring.html nostring.php progress_number.js
redsandback.html redsandback.php smallest.html smallest.php string.html string.php
| From: | Laurent Laville | Date: | Mon, 05 Jul 2004 21:32:09 +0000 |
| Subject: | cvs: pear /HTML_Progress/examples/horizontal ancestor.html ancestor.php bgimages.html bgimages.php bluesand.html bluesand.php bluesandplus.html bluesandplus.php bullit.html bullit.php download.gif javadanse.html javadanse.php model.html model.php nostring.html nostring.php progress_number.js redsandback.html redsandback.php smallest.html smallest.php string.html string.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21547@lists.php.net to get a copy of this message | ||
farell Mon Jul 5 17:32:09 2004 EDT
Added files:
/pear/HTML_Progress/examples/horizontal ancestor.html ancestor.php
bgimages.html bgimages.php
bluesand.html bluesand.php
bluesandplus.html
bluesandplus.php
bullit.html bullit.php
download.gif javadanse.html
javadanse.php model.html
model.php nostring.html
nostring.php
progress_number.js
redsandback.html
redsandback.php
smallest.html smallest.php
string.html string.php
Log:
HTML_Progress examples reorganized by category
http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/ancestor.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/ancestor.html +++ pear/HTML_Progress/examples/horizontal/ancestor.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="basic horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Ancestor</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Ancestor </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a basic horizontal ProgressBar v0.5 style.</b></p> <p>There are 10 cells with default values: <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>cell width = 15px <li>cell height = 20px <li>cell spacing = 2px </ul> Percent text info is centered on a white background area of 60 pixels width.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> width = 60 font-size = 14 align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/ancestor.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/ancestor.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="ancestor.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/ancestor.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/ancestor.php +++ pear/HTML_Progress/examples/horizontal/ancestor.php <?php @include '../include_path.php'; /** * Basic Horizontal ProgressBar v0.5 style example. * See also ProgressMaker usage with pre-set UI model 'Ancestor'. * * @version $Id: ancestor.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('width=60 font-size=14 align=center'); ?> <html> <head> <title>Ancestor Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #444444; color: #EEEEEE; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: yellow; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bgimages.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bgimages.html +++ pear/HTML_Progress/examples/horizontal/bgimages.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="horizontal progress meter with background images" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Background Images</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Background Images </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a natural horizontal ProgressBar and show you how to use a picture instead of simple color for active cells.</b></p> <p>Percent text info is centered on a 60 pixels width area, on left side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #000084 inactive-color = #3A6EA5 width = 25 spacing = 0 background-image = download.gif </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 style = inset color = white </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 60 font-size = 10 background-color = #C3C6C3 align = center valign = left </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bgimages.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bgimages.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bgimages.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bgimages.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bgimages.php +++ pear/HTML_Progress/examples/horizontal/bgimages.php <?php @include '../include_path.php'; /** * Natural Horizontal with background images ProgressBar example. * See also ProgressMaker usage with pre-set UI model 'BgImages'. * * @version $Id: bgimages.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes(array( 'active-color' => '#000084', 'inactive-color' => '#3A6EA5', 'width' => 25, 'spacing' => 0, 'background-image' => 'download.gif' )); $ui->setBorderAttributes('width=1 style=inset color=white'); $ui->setStringAttributes(array( 'width' => 60, 'font-size' => 10, 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'left' )); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>BgImages Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesand.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesand.html +++ pear/HTML_Progress/examples/horizontal/bluesand.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="basic horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Blue Sand</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Blue Sand </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a natural horizontal ProgressBar with blue skin. It will also show you how to simulate percent text info outside the progress bar cell group, delimited by a thin border.</b></p> <p>Percent text info is centered on a 60 pixels width area, on right side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #3874B4 inactive-color = #EEEECC width = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = navy </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 60 font-size = 14 background-color = #EEEEEE align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bluesand.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bluesand.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bluesand.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesand.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesand.php +++ pear/HTML_Progress/examples/horizontal/bluesand.php <?php @include '../include_path.php'; /** * Natural Horizontal ProgressBar example with blue skin. * See also ProgressMaker usage with pre-set UI model 'BlueSand'. * * @version $Id: bluesand.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10'); $ui->setBorderAttributes('width=1 color=navy'); $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE align=center'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>BlueSand Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #EEEEEE; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesandplus.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesandplus.html +++ pear/HTML_Progress/examples/horizontal/bluesandplus.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="horizontal progress meter with javascript customization " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Blue Sand Plus</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Blue Sand Plus </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a natural horizontal ProgressBar with blue skin. It will also show you how to print something inside cells with an external javascript (replaced internal code).</b></p> <p>Percent text info is centered on a 60 pixels width area, on right side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #3874B4 inactive-color = #EEEECC width = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = navy </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 60 font-size = 14 background-color = #EEEEEE align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here is the external javascript source-code which replace internal code : <pre> var isDom = document.getElementById?true:false; var isIE = document.all?true:false; var isNS4 = document.layers?true:false; var cellCount = 10; function setprogress(pIdent, pValue, pString, pDeterminate) { if (isDom) prog = document.getElementById(pIdent+'installationProgress'); if (isIE) prog = document.all[pIdent+'installationProgress']; if (isNS4) prog = document.layers[pIdent+'installationProgress']; if (prog != null) prog.innerHTML = pString; if (pValue == pDeterminate) { for (i=0; i < cellCount; i++) { showCell(i, pIdent, "hidden"); } } if ((pDeterminate > 0) && (pValue > 0)) { i = (pValue-1) % cellCount; showCell(i, pIdent, "visible"); } else { for (i=pValue-1; i >=0; i--) { showCell(i, pIdent, "visible"); if (isDom) document.getElementById(pIdent+'progressCell'+i+'A').innerHTML = i; if (isIE) document.all[pIdent+'progressCell'+i+'A'].innerHTML = i; if (isNS4) document.layers[pIdent+'progressCell'+i+'A'].innerHTML = i; } } } function showCell(pCell, pIdent, pVisibility) { if (isDom) document.getElementById(pIdent+'progressCell'+pCell+'A').style.visibility = pVisibility; if (isIE) document.all[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; if (isNS4) document.layers[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; } </pre> <div class="fig">href: ./progress_number.js</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bluesandplus.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bluesandplus.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bluesandplus.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesandplus.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesandplus.php +++ pear/HTML_Progress/examples/horizontal/bluesandplus.php <?php @include '../include_path.php'; /** * Natural Horizontal ProgressBar example with JavaScript customization. * See also ProgressMaker usage with pre-set UI model 'BlueSandPlus'. * * @version $Id: bluesandplus.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10'); $ui->setBorderAttributes('width=1 color=navy'); $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE align=center'); $ui->setScript('progress_number.js'); foreach (range(0,2) as $index) { $ui->setCellAttributes('color=silver', $index); } foreach (range(3,6) as $index) { $ui->setCellAttributes('color=yellow', $index); } foreach (range(7,9) as $index) { $ui->setCellAttributes('color=orange', $index); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>BlueSandPlus Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #EEEEEE; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript" src="<?php echo $bar->getScript(); ?>"></script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bullit.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bullit.html +++ pear/HTML_Progress/examples/horizontal/bullit.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="basic horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: BullIt</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">BullIt </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a plain horizontal ProgressBar.</b></p> <br />Have a look on cell spacing attribute (important): <ul> <li>greater than zero, make a cell group look and feel <li>equal zero, make a plain bar </ul> <p>Percent text info is right aligned on top side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #000084 inactive-color = #3A6EA5 width = 20 spacing = 0 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 style = inset color = white </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 200 height = 20 font-size = 14 background-color = #C3C6C3 valign = top </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bullit.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bullit.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bullit.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bullit.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bullit.php +++ pear/HTML_Progress/examples/horizontal/bullit.php <?php @include '../include_path.php'; /** * Natural Horizontal plain ProgressBar example. * See also ProgressMaker usage with pre-set UI model 'Bullit'. * * @version $Id: bullit.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#000084 inactive-color=#3A6EA5 width=20 spacing=0'); $ui->setBorderAttributes('width=1 style=inset color=white'); $ui->setStringAttributes(array( 'width' => 200, 'height' => 20, 'font-size' => 14, 'background-color' => '#C3C6C3', 'valign' => 'top' )); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Bullit Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/javadanse.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/javadanse.html +++ pear/HTML_Progress/examples/horizontal/javadanse.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="an horizontal progress meter with more than 10 default cells" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: JavaDanse</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">JavaDanse </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a reverse horizontal ProgressBar with javascript cell customization, as <i>bluesandplus.php</i>. It also show how to increase cell number (default is 10).</b></p> <p>Percent text info is center aligned on bottom side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #970038 inactive-color = #FFDDAA width = 20 height = 20 color = red (cells: 0,1,2) color = yellow (cells: 3,4,5,6) color = white (cells: 7,8,9) color = black (default) (cells: 10 to 19) </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = #000000 </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 440 font-size = 14 color = #FF0000 align = center valign = bottom </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/javadanse.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/javadanse.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="javadanse.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/javadanse.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/javadanse.php +++ pear/HTML_Progress/examples/horizontal/javadanse.php <?php @include '../include_path.php'; /** * 20 cells Reverse Horizontal ProgressBar example with JavaScript customization. * * @version $Id: javadanse.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(5); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setFillWay('reverse'); $ui->setCellCount(20); $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=20 height=20'); $ui->setBorderAttributes('width=1 color=#000000'); $ui->setStringAttributes('width=440 font-size=14 color=#FF0000 align=center valign=bottom'); $ui->setScript('progress_number.js'); foreach (range(0,2) as $index) { $ui->setCellAttributes('color=red', $index); } foreach (range(3,6) as $index) { $ui->setCellAttributes('color=yellow', $index); } foreach (range(7,9) as $index) { $ui->setCellAttributes('color=white ', $index); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>JavaDanse Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript" src="<?php echo $bar->getScript(); ?>"></script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/model.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/model.html +++ pear/HTML_Progress/examples/horizontal/model.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, data model, progress meter" /> <meta name="description" content="how to use the data model class " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Model</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Model </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a horizontal ProgressBar, with limits (min = 0, max = 60) and increment set to 5 in the mathematical model <b>TimerProgress</b>.</b></p> <p>The custom string is center aligned at bottom side of the progress bar. Cells have default size and colors.</p> <p>First introduction of progress handler (user-callback). Function is defined on lines 21 thru 38, and attached on progress bar at line 45.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> width = 170 height = 20 valign = bottom align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/model.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/model.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="model.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/model.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/model.php +++ pear/HTML_Progress/examples/horizontal/model.php <?php @include '../include_path.php'; /** * ProgressBar model example. * * @version $Id: model.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; class TimerProgress extends HTML_Progress_DM { function TimerProgress() { $this->HTML_Progress_DM(0,60,5); } } function myFunctionHandler($progressValue, &$obj) { if ($obj->getPercentComplete() == 0.25) { $obj->setString('Fourth part way done!'); } if ($obj->getPercentComplete() == 0.5) { $obj->setString('Half way done!'); } if ($obj->getPercentComplete() == 0.75) { $obj->setString('Three quarters way done!'); } if ($obj->getPercentComplete() == 1) { $obj->setString('All done!'); $obj->display(); } else { $obj->sleep(); } } $timer = new TimerProgress(); $bar = new HTML_Progress($timer); $bar->setAnimSpeed(100); $bar->setStringPainted(true); // get space for the string $bar->setString(''); // but don't paint it $bar->setProgressHandler('myFunctionHandler'); $ui =& $bar->getUI(); $ui->setStringAttributes('width=170 height=20 valign=bottom align=center'); ?> <html> <head> <title>ProgressBar model example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/nostring.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/nostring.html +++ pear/HTML_Progress/examples/horizontal/nostring.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="how to hide percent information string " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: NoString</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">NoString </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a basic horizontal ProgressBar, but without percent text info.</b></p> <p>There are 10 cells with default values: <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>cell width = 15px <li>cell height = 20px <li>cell spacing = 2px </ul> Percent text info is hidden (see lines 16 and 17).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> None. Used all default values. <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/nostring.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/nostring.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="nostring.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/nostring.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/nostring.php +++ pear/HTML_Progress/examples/horizontal/nostring.php <?php @include '../include_path.php'; /** * Horizontal no String ProgressBar example. * * @version $Id: nostring.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setStringPainted(true); // get space for the string $bar->setString(''); // but don't paint it ?> <html> <head> <title>Horizontal no String ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/progress_number.js?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/progress_number.js +++ pear/HTML_Progress/examples/horizontal/progress_number.js var isDom = document.getElementById?true:false; var isIE = document.all?true:false; var isNS4 = document.layers?true:false; var cellCount = 10; function setprogress(pIdent, pValue, pString, pDeterminate) { if (isDom) prog = document.getElementById(pIdent+'installationProgress'); if (isIE) prog = document.all[pIdent+'installationProgress']; if (isNS4) prog = document.layers[pIdent+'installationProgress']; if (prog != null) prog.innerHTML = pString; if (pValue == pDeterminate) { for (i=0; i < cellCount; i++) { showCell(i, pIdent, "hidden"); } } if ((pDeterminate > 0) && (pValue > 0)) { i = (pValue-1) % cellCount; showCell(i, pIdent, "visible"); } else { for (i=pValue-1; i >=0; i--) { showCell(i, pIdent, "visible"); if (isDom) document.getElementById(pIdent+'progressCell'+i+'A').innerHTML = i; if (isIE) document.all[pIdent+'progressCell'+i+'A'].innerHTML = i; if (isNS4) document.layers[pIdent+'progressCell'+i+'A'].innerHTML = i; } } } function showCell(pCell, pIdent, pVisibility) { if (isDom) document.getElementById(pIdent+'progressCell'+pCell+'A').style.visibility = pVisibility; if (isIE) document.all[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; if (isNS4) document.layers[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; } http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/redsandback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/redsandback.html +++ pear/HTML_Progress/examples/horizontal/redsandback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="an horizontal progress meter with less than 10 default cells" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Red Sand Back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Red Sand Back </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a reverse horizontal ProgressBar, as <i>javadanse.php</i>. It also show how to decrease cell number (default is 10).</b></p> <p>Percent text info is center aligned on bottom side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #970038 inactive-color = #FFDDAA width = 20 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = #000000 </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> font-size = 14 color = #FF0000 align = left valign = bottom </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/redsandback.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/redsandback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="redsandback.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/redsandback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/redsandback.php +++ pear/HTML_Progress/examples/horizontal/redsandback.php <?php @include '../include_path.php'; /** * 5 cells Reverse Horizontal ProgressBar example with red skin. * See also ProgressMaker usage with pre-set UI model 'RedSandBack'. * * @version $Id: redsandback.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setFillWay('reverse'); $ui->setCellCount(5); $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=20'); $ui->setBorderAttributes('width=1 color=#000000'); $ui->setStringAttributes('font-size=14 color=#FF0000 align=left valign=bottom'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>RedSandBack Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/smallest.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/smallest.html +++ pear/HTML_Progress/examples/horizontal/smallest.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="the smallest horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Smallest</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Smallest </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run the smallest ProgressBar, you can build.</b></p> <p>Percent text info is right aligned on 50 pixels width area at right side of the progress bar (default).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #970038 inactive-color = #FFDDAA width = 7 height = 12 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> font-size = 10 background-color = #C3C6C3 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/smallest.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/smallest.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="smallest.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/smallest.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/smallest.php +++ pear/HTML_Progress/examples/horizontal/smallest.php <?php @include '../include_path.php'; /** * Natural Horizontal smallest ProgressBar example. * See also ProgressMaker usage with pre-set UI model 'Smallest'. * * @version $Id: smallest.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=7 height=12'); $ui->setBorderAttributes('width=1'); $ui->setStringAttributes(array( 'font-size' => 10, 'background-color' => '#C3C6C3' )); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Smallest Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/string.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/string.html +++ pear/HTML_Progress/examples/horizontal/string.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="how to customize percent information string " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Custom String</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Custom String </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a horizontal ProgressBar with custom string.</b></p> <p>There are 10 cells with default values: <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>cell width = 15px <li>cell height = 20px <li>cell spacing = 2px </ul> Percent text info is left aligned on a white background area of 350 pixels width.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> width = 350 align = left </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/string.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/string.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="string.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/string.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/string.php +++ pear/HTML_Progress/examples/horizontal/string.php <?php @include '../include_path.php'; /** * Horizontal String ProgressBar example. * * @version $Id: string.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $pkg = array('PEAR', 'Archive_Tar', 'Config', 'HTML_QuickForm', 'HTML_CSS', 'HTML_Page', 'HTML_Template_Sigma', 'Log', 'MDB', 'PHPUnit'); function myFunctionHandler($progressValue, &$obj) { global $pkg; $obj->sleep(); $i = floor($progressValue / 10); if ($progressValue == 100) { $msg = ''; } else { $msg = " installing package ($progressValue %) ... : ".$pkg[$i]; } $obj->setString($msg); } $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(5); $bar->setStringPainted(true); // get space for the string $bar->setString(''); // but don't paint it $bar->setProgressHandler('myFunctionHandler'); $ui =& $bar->getUI(); $ui->setStringAttributes('width=350 align=left'); ?> <html> <head> <title>Horizontal String ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); $bar->display(); // to display the last custom string (blank) ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html>
http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/ancestor.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/ancestor.html +++ pear/HTML_Progress/examples/horizontal/ancestor.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="basic horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Ancestor</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Ancestor </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a basic horizontal ProgressBar v0.5 style.</b></p> <p>There are 10 cells with default values: <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>cell width = 15px <li>cell height = 20px <li>cell spacing = 2px </ul> Percent text info is centered on a white background area of 60 pixels width.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> width = 60 font-size = 14 align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/ancestor.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/ancestor.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="ancestor.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/ancestor.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/ancestor.php +++ pear/HTML_Progress/examples/horizontal/ancestor.php <?php @include '../include_path.php'; /** * Basic Horizontal ProgressBar v0.5 style example. * See also ProgressMaker usage with pre-set UI model 'Ancestor'. * * @version $Id: ancestor.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('width=60 font-size=14 align=center'); ?> <html> <head> <title>Ancestor Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #444444; color: #EEEEEE; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: yellow; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bgimages.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bgimages.html +++ pear/HTML_Progress/examples/horizontal/bgimages.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="horizontal progress meter with background images" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Background Images</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Background Images </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a natural horizontal ProgressBar and show you how to use a picture instead of simple color for active cells.</b></p> <p>Percent text info is centered on a 60 pixels width area, on left side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #000084 inactive-color = #3A6EA5 width = 25 spacing = 0 background-image = download.gif </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 style = inset color = white </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 60 font-size = 10 background-color = #C3C6C3 align = center valign = left </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bgimages.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bgimages.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bgimages.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bgimages.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bgimages.php +++ pear/HTML_Progress/examples/horizontal/bgimages.php <?php @include '../include_path.php'; /** * Natural Horizontal with background images ProgressBar example. * See also ProgressMaker usage with pre-set UI model 'BgImages'. * * @version $Id: bgimages.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes(array( 'active-color' => '#000084', 'inactive-color' => '#3A6EA5', 'width' => 25, 'spacing' => 0, 'background-image' => 'download.gif' )); $ui->setBorderAttributes('width=1 style=inset color=white'); $ui->setStringAttributes(array( 'width' => 60, 'font-size' => 10, 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'left' )); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>BgImages Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesand.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesand.html +++ pear/HTML_Progress/examples/horizontal/bluesand.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="basic horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Blue Sand</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Blue Sand </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a natural horizontal ProgressBar with blue skin. It will also show you how to simulate percent text info outside the progress bar cell group, delimited by a thin border.</b></p> <p>Percent text info is centered on a 60 pixels width area, on right side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #3874B4 inactive-color = #EEEECC width = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = navy </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 60 font-size = 14 background-color = #EEEEEE align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bluesand.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bluesand.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bluesand.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesand.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesand.php +++ pear/HTML_Progress/examples/horizontal/bluesand.php <?php @include '../include_path.php'; /** * Natural Horizontal ProgressBar example with blue skin. * See also ProgressMaker usage with pre-set UI model 'BlueSand'. * * @version $Id: bluesand.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10'); $ui->setBorderAttributes('width=1 color=navy'); $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE align=center'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>BlueSand Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #EEEEEE; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesandplus.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesandplus.html +++ pear/HTML_Progress/examples/horizontal/bluesandplus.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="horizontal progress meter with javascript customization " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Blue Sand Plus</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Blue Sand Plus </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a natural horizontal ProgressBar with blue skin. It will also show you how to print something inside cells with an external javascript (replaced internal code).</b></p> <p>Percent text info is centered on a 60 pixels width area, on right side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #3874B4 inactive-color = #EEEECC width = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = navy </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 60 font-size = 14 background-color = #EEEEEE align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here is the external javascript source-code which replace internal code : <pre> var isDom = document.getElementById?true:false; var isIE = document.all?true:false; var isNS4 = document.layers?true:false; var cellCount = 10; function setprogress(pIdent, pValue, pString, pDeterminate) { if (isDom) prog = document.getElementById(pIdent+'installationProgress'); if (isIE) prog = document.all[pIdent+'installationProgress']; if (isNS4) prog = document.layers[pIdent+'installationProgress']; if (prog != null) prog.innerHTML = pString; if (pValue == pDeterminate) { for (i=0; i < cellCount; i++) { showCell(i, pIdent, "hidden"); } } if ((pDeterminate > 0) && (pValue > 0)) { i = (pValue-1) % cellCount; showCell(i, pIdent, "visible"); } else { for (i=pValue-1; i >=0; i--) { showCell(i, pIdent, "visible"); if (isDom) document.getElementById(pIdent+'progressCell'+i+'A').innerHTML = i; if (isIE) document.all[pIdent+'progressCell'+i+'A'].innerHTML = i; if (isNS4) document.layers[pIdent+'progressCell'+i+'A'].innerHTML = i; } } } function showCell(pCell, pIdent, pVisibility) { if (isDom) document.getElementById(pIdent+'progressCell'+pCell+'A').style.visibility = pVisibility; if (isIE) document.all[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; if (isNS4) document.layers[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; } </pre> <div class="fig">href: ./progress_number.js</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bluesandplus.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bluesandplus.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bluesandplus.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bluesandplus.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bluesandplus.php +++ pear/HTML_Progress/examples/horizontal/bluesandplus.php <?php @include '../include_path.php'; /** * Natural Horizontal ProgressBar example with JavaScript customization. * See also ProgressMaker usage with pre-set UI model 'BlueSandPlus'. * * @version $Id: bluesandplus.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10'); $ui->setBorderAttributes('width=1 color=navy'); $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE align=center'); $ui->setScript('progress_number.js'); foreach (range(0,2) as $index) { $ui->setCellAttributes('color=silver', $index); } foreach (range(3,6) as $index) { $ui->setCellAttributes('color=yellow', $index); } foreach (range(7,9) as $index) { $ui->setCellAttributes('color=orange', $index); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>BlueSandPlus Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #EEEEEE; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript" src="<?php echo $bar->getScript(); ?>"></script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bullit.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bullit.html +++ pear/HTML_Progress/examples/horizontal/bullit.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="basic horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: BullIt</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">BullIt </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a plain horizontal ProgressBar.</b></p> <br />Have a look on cell spacing attribute (important): <ul> <li>greater than zero, make a cell group look and feel <li>equal zero, make a plain bar </ul> <p>Percent text info is right aligned on top side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #000084 inactive-color = #3A6EA5 width = 20 spacing = 0 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 style = inset color = white </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 200 height = 20 font-size = 14 background-color = #C3C6C3 valign = top </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/bullit.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/bullit.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="bullit.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/bullit.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/bullit.php +++ pear/HTML_Progress/examples/horizontal/bullit.php <?php @include '../include_path.php'; /** * Natural Horizontal plain ProgressBar example. * See also ProgressMaker usage with pre-set UI model 'Bullit'. * * @version $Id: bullit.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#000084 inactive-color=#3A6EA5 width=20 spacing=0'); $ui->setBorderAttributes('width=1 style=inset color=white'); $ui->setStringAttributes(array( 'width' => 200, 'height' => 20, 'font-size' => 14, 'background-color' => '#C3C6C3', 'valign' => 'top' )); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Bullit Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/javadanse.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/javadanse.html +++ pear/HTML_Progress/examples/horizontal/javadanse.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="an horizontal progress meter with more than 10 default cells" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: JavaDanse</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">JavaDanse </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a reverse horizontal ProgressBar with javascript cell customization, as <i>bluesandplus.php</i>. It also show how to increase cell number (default is 10).</b></p> <p>Percent text info is center aligned on bottom side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #970038 inactive-color = #FFDDAA width = 20 height = 20 color = red (cells: 0,1,2) color = yellow (cells: 3,4,5,6) color = white (cells: 7,8,9) color = black (default) (cells: 10 to 19) </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = #000000 </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> width = 440 font-size = 14 color = #FF0000 align = center valign = bottom </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/javadanse.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/javadanse.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="javadanse.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/javadanse.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/javadanse.php +++ pear/HTML_Progress/examples/horizontal/javadanse.php <?php @include '../include_path.php'; /** * 20 cells Reverse Horizontal ProgressBar example with JavaScript customization. * * @version $Id: javadanse.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(5); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setFillWay('reverse'); $ui->setCellCount(20); $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=20 height=20'); $ui->setBorderAttributes('width=1 color=#000000'); $ui->setStringAttributes('width=440 font-size=14 color=#FF0000 align=center valign=bottom'); $ui->setScript('progress_number.js'); foreach (range(0,2) as $index) { $ui->setCellAttributes('color=red', $index); } foreach (range(3,6) as $index) { $ui->setCellAttributes('color=yellow', $index); } foreach (range(7,9) as $index) { $ui->setCellAttributes('color=white ', $index); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>JavaDanse Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript" src="<?php echo $bar->getScript(); ?>"></script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/model.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/model.html +++ pear/HTML_Progress/examples/horizontal/model.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, data model, progress meter" /> <meta name="description" content="how to use the data model class " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Model</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Model </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a horizontal ProgressBar, with limits (min = 0, max = 60) and increment set to 5 in the mathematical model <b>TimerProgress</b>.</b></p> <p>The custom string is center aligned at bottom side of the progress bar. Cells have default size and colors.</p> <p>First introduction of progress handler (user-callback). Function is defined on lines 21 thru 38, and attached on progress bar at line 45.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> width = 170 height = 20 valign = bottom align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/model.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/model.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="model.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/model.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/model.php +++ pear/HTML_Progress/examples/horizontal/model.php <?php @include '../include_path.php'; /** * ProgressBar model example. * * @version $Id: model.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; class TimerProgress extends HTML_Progress_DM { function TimerProgress() { $this->HTML_Progress_DM(0,60,5); } } function myFunctionHandler($progressValue, &$obj) { if ($obj->getPercentComplete() == 0.25) { $obj->setString('Fourth part way done!'); } if ($obj->getPercentComplete() == 0.5) { $obj->setString('Half way done!'); } if ($obj->getPercentComplete() == 0.75) { $obj->setString('Three quarters way done!'); } if ($obj->getPercentComplete() == 1) { $obj->setString('All done!'); $obj->display(); } else { $obj->sleep(); } } $timer = new TimerProgress(); $bar = new HTML_Progress($timer); $bar->setAnimSpeed(100); $bar->setStringPainted(true); // get space for the string $bar->setString(''); // but don't paint it $bar->setProgressHandler('myFunctionHandler'); $ui =& $bar->getUI(); $ui->setStringAttributes('width=170 height=20 valign=bottom align=center'); ?> <html> <head> <title>ProgressBar model example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/nostring.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/nostring.html +++ pear/HTML_Progress/examples/horizontal/nostring.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="how to hide percent information string " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: NoString</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">NoString </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a basic horizontal ProgressBar, but without percent text info.</b></p> <p>There are 10 cells with default values: <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>cell width = 15px <li>cell height = 20px <li>cell spacing = 2px </ul> Percent text info is hidden (see lines 16 and 17).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> None. Used all default values. <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/nostring.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/nostring.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="nostring.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/nostring.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/nostring.php +++ pear/HTML_Progress/examples/horizontal/nostring.php <?php @include '../include_path.php'; /** * Horizontal no String ProgressBar example. * * @version $Id: nostring.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setStringPainted(true); // get space for the string $bar->setString(''); // but don't paint it ?> <html> <head> <title>Horizontal no String ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/progress_number.js?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/progress_number.js +++ pear/HTML_Progress/examples/horizontal/progress_number.js var isDom = document.getElementById?true:false; var isIE = document.all?true:false; var isNS4 = document.layers?true:false; var cellCount = 10; function setprogress(pIdent, pValue, pString, pDeterminate) { if (isDom) prog = document.getElementById(pIdent+'installationProgress'); if (isIE) prog = document.all[pIdent+'installationProgress']; if (isNS4) prog = document.layers[pIdent+'installationProgress']; if (prog != null) prog.innerHTML = pString; if (pValue == pDeterminate) { for (i=0; i < cellCount; i++) { showCell(i, pIdent, "hidden"); } } if ((pDeterminate > 0) && (pValue > 0)) { i = (pValue-1) % cellCount; showCell(i, pIdent, "visible"); } else { for (i=pValue-1; i >=0; i--) { showCell(i, pIdent, "visible"); if (isDom) document.getElementById(pIdent+'progressCell'+i+'A').innerHTML = i; if (isIE) document.all[pIdent+'progressCell'+i+'A'].innerHTML = i; if (isNS4) document.layers[pIdent+'progressCell'+i+'A'].innerHTML = i; } } } function showCell(pCell, pIdent, pVisibility) { if (isDom) document.getElementById(pIdent+'progressCell'+pCell+'A').style.visibility = pVisibility; if (isIE) document.all[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; if (isNS4) document.layers[pIdent+'progressCell'+pCell+'A'].style.visibility = pVisibility; } http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/redsandback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/redsandback.html +++ pear/HTML_Progress/examples/horizontal/redsandback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="an horizontal progress meter with less than 10 default cells" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Red Sand Back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Red Sand Back </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a reverse horizontal ProgressBar, as <i>javadanse.php</i>. It also show how to decrease cell number (default is 10).</b></p> <p>Percent text info is center aligned on bottom side of the progress bar.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #970038 inactive-color = #FFDDAA width = 20 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 color = #000000 </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> font-size = 14 color = #FF0000 align = left valign = bottom </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/redsandback.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/redsandback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="redsandback.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/redsandback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/redsandback.php +++ pear/HTML_Progress/examples/horizontal/redsandback.php <?php @include '../include_path.php'; /** * 5 cells Reverse Horizontal ProgressBar example with red skin. * See also ProgressMaker usage with pre-set UI model 'RedSandBack'. * * @version $Id: redsandback.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setFillWay('reverse'); $ui->setCellCount(5); $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=20'); $ui->setBorderAttributes('width=1 color=#000000'); $ui->setStringAttributes('font-size=14 color=#FF0000 align=left valign=bottom'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>RedSandBack Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/smallest.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/smallest.html +++ pear/HTML_Progress/examples/horizontal/smallest.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="the smallest horizontal progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Smallest</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Smallest </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run the smallest ProgressBar, you can build.</b></p> <p>Percent text info is right aligned on 50 pixels width area at right side of the progress bar (default).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = #970038 inactive-color = #FFDDAA width = 7 height = 12 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to build the progress bar border : <pre> width = 1 </pre> <div class="fig">HTML_Progress_UI::setBorderAttributes()</div> Here are options to build the progress bar string (percent text info): <pre> font-size = 10 background-color = #C3C6C3 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/smallest.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/smallest.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="smallest.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/smallest.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/smallest.php +++ pear/HTML_Progress/examples/horizontal/smallest.php <?php @include '../include_path.php'; /** * Natural Horizontal smallest ProgressBar example. * See also ProgressMaker usage with pre-set UI model 'Smallest'. * * @version $Id: smallest.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $bar->setBorderPainted(true); $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=7 height=12'); $ui->setBorderAttributes('width=1'); $ui->setStringAttributes(array( 'font-size' => 10, 'background-color' => '#C3C6C3' )); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Smallest Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #C3C6C3; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/string.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/string.html +++ pear/HTML_Progress/examples/horizontal/string.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, progress meter" /> <meta name="description" content="how to customize percent information string " /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Custom String</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Custom String </span></h1> <p align="right">$Date: 2004/07/05 21:32:09 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <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.</li> </ul> </p> <hr/> <p><b>This example will run a horizontal ProgressBar with custom string.</b></p> <p>There are 10 cells with default values: <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>cell width = 15px <li>cell height = 20px <li>cell spacing = 2px </ul> Percent text info is left aligned on a white background area of 350 pixels width.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> width = 350 align = left </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/string.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=horizontal/string.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="string.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/horizontal/string.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/horizontal/string.php +++ pear/HTML_Progress/examples/horizontal/string.php <?php @include '../include_path.php'; /** * Horizontal String ProgressBar example. * * @version $Id: string.php,v 1.1 2004/07/05 21:32:09 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $pkg = array('PEAR', 'Archive_Tar', 'Config', 'HTML_QuickForm', 'HTML_CSS', 'HTML_Page', 'HTML_Template_Sigma', 'Log', 'MDB', 'PHPUnit'); function myFunctionHandler($progressValue, &$obj) { global $pkg; $obj->sleep(); $i = floor($progressValue / 10); if ($progressValue == 100) { $msg = ''; } else { $msg = " installing package ($progressValue %) ... : ".$pkg[$i]; } $obj->setString($msg); } $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(5); $bar->setStringPainted(true); // get space for the string $bar->setString(''); // but don't paint it $bar->setProgressHandler('myFunctionHandler'); $ui =& $bar->getUI(); $ui->setStringAttributes('width=350 align=left'); ?> <html> <head> <title>Horizontal String ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $bar->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); $bar->display(); // to display the last custom string (blank) ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html>