Ejemplo n.º 1
0
<?php 
echo $bar1->toHTML();
?>
    </td>
    <td width="50%" align="center">
<?php 
echo $bar2->toHTML();
?>
    </td>
</tr>
</table>

<?php 
do {
    $bar1->display();
    $bar2->display();
    if ($bar2->getPercentComplete() == 1) {
        break;
        // the progress bar has reached 100%
    }
    if ($bar1->getPercentComplete() < 1) {
        $bar1->process();
        $bar1->incValue();
    }
    $bar2->process();
    $bar2->incValue();
} while (1);
?>

</body>
</html>
Ejemplo n.º 2
0
<?php 
echo $bar1->toHTML();
?>
    </td>
    <td width="25%" align="center">
<?php 
echo $bar2->toHTML();
?>
    </td>
</tr>
</table>

<?php 
do {
    $bar1->display();
    $bar1->process();
    // warning: don't forget it (even for a demo)
    if ($bar1->getPercentComplete() == 1) {
        $bar1->setValue(0);
        // the 1st progress bar has reached 100%, do a new loop
    } else {
        $bar1->incValue();
        // updates 1st progress bar
    }
} while ($bar2->getPercentComplete() < 1);
?>

<p>&lt;&lt; <a href="../index.html">Back examples TOC</a></p>

</body>
</html>