Source for file vbar.php
Documentation is available at vbar.php
@include '../include_path.php';
* Progress meter is running in indeterminate mode while a file upload operation.
* This example may work with HTML_Progress 1.1
* but version 1.2.0 or better allows more easy facilities.
* @version $Id: vbar.php,v 1.1 2004/06/26 12:22:52 farell Exp $
* @author Laurent Laville <pear@laurent-laville.org>
require_once 'HTML/Progress.php';
if (substr(PHP_VERSION ,0 ,1 ) < '5') {
User callback called pending progress meter is running, comes with version 1.2.0RC3
$semaphore = './uploads/'. $_GET['ID'];
$obj->setIndeterminate (false );
for ($i=0; $i< ($obj->_anim_speed*1000 ); $i++ ) { }
Which version of html_progress: (stable)1.1 or (beta)1.2.0 RC1, RC2 or RC3
$progress->setIncrement (5 );
$progress->setAnimSpeed (100 );
$progress->setIndeterminate (true ); // progress bar run in indeterminate mode
$progress->setStringPainted (true ); // get space for the string
$progress->setString (""); // but don't paint it
// set a progress handler required at least version 1.2.0RC3
$progress->setProgressHandler ('myFunctionHandler');
$ui = & $progress->getUI ();
$ui->setBorderAttributes ('width=1 color=#000000');
$ui->setCellAttributes (array (
'active-color' => '#970038',
'inactive-color' => '#FFDDAA',
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">
font-family: Verdana, Arial;
<?php echo $progress->getStyle (); ?>
<script type="text/javascript">
<?php echo $progress->getScript (); ?>
echo $progress->toHtml ();
if (isset ($_GET['ID'])) {
$progress->run (); // run method is born on version 1.2.0RC3
// do the same as run() method
if ($progress->getPercentComplete () == 1 ) {
if ($progress->isIndeterminate ()) {
echo '<b>File was not uploaded !</b>';
echo '<b>Upload Complete...</b>';
Documentation generated on Mon, 11 Mar 2019 13:52:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|