当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML_Progress::setValue方法代码示例

本文整理汇总了PHP中HTML_Progress::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Progress::setValue方法的具体用法?PHP HTML_Progress::setValue怎么用?PHP HTML_Progress::setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_Progress的用法示例。


在下文中一共展示了HTML_Progress::setValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$bar->setValue(50);
$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>setStringAttributes example</title>
<style type="text/css">
<!--
<?php 
echo $bar->getStyle();
?>
// -->
</style>
<script type="text/javascript">
<!--
<?php 
echo $ui->getScript();
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:31,代码来源:setstringattributes.php

示例2:

<?php

require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$bar->setValue(45);
printf('direct way: value = %d <br/>', $bar->getValue());
$dm =& $bar->getDM();
$dm->setValue(45);
printf('another way: value = %d <br/>', $dm->getValue());
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:9,代码来源:setvalue.php

示例3:

<?php

require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$bar->setStringPainted(true);
$bar->setValue(25);
$ui =& $bar->getUI();
$ui->setStringAttributes('width=350 align=left');
?>
<html>
<head>
<title>setStringPainted example</title>
<style type="text/css">
<!--
<?php 
echo $bar->getStyle();
?>
// -->
</style>
<script type="text/javascript">
<!--
<?php 
echo $bar->getScript();
?>
//-->
</script>
</head>
<body>

<?php 
echo $bar->toHtml();
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:31,代码来源:setstringpainted.php

示例4: while

<?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>
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:31,代码来源:complex.php

示例5:

//-->
</script>
</head>
<body>

<?php 
echo $bar->toHtml();
$loop = 0;
do {
    $bar->display();
    $bar->sleep();
    // for purpose of demo only
    if ($bar->getPercentComplete() == 1) {
        $loop++;
        if ($bar->isIndeterminate()) {
            $bar->setValue(0);
        } else {
            break;
            // progress bar reached 100% in determinate mode
        }
    } else {
        $bar->incValue();
    }
    /** rule to decide when to switch back to determinate mode
     *  - after two full loops and half one
     */
    if ($bar->isIndeterminate()) {
        if ($loop == 2 && $bar->getValue() == 50) {
            $bar->setIndeterminate(false);
            $bar->setString(null);
            // display % string
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:31,代码来源:setindeterminate.php

示例6:

<?php

require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$bar->setValue(18);
printf('direct way: progress completed at %f <br/>', $bar->getPercentComplete());
$dm =& $bar->getDM();
printf('another way: progress completed at %f <br/>', $dm->getPercentComplete());
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:8,代码来源:getpercentcomplete.php

示例7:

<?php

@(include '../include_path.php');
/**
 * Basic Vertical ProgressBar example.
 * 
 * @version    $Id: basic.php,v 1.1 2004/07/05 21:32:31 farell Exp $
 * @author     Laurent Laville <pear@laurent-laville.org>
 * @package    HTML_Progress
 */
require_once 'HTML/Progress.php';
$bar = new HTML_Progress(HTML_PROGRESS_BAR_VERTICAL);
$bar->setAnimSpeed(100);
$bar->setValue(85);
?>
<html>
<head>
<title>Basic Vertical 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 {
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:31,代码来源:basic.php

示例8:

$ui->setOrientation(HTML_PROGRESS_BAR_VERTICAL);
$ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=65');
?>
<head>
<title>display example</title>
<style type="text/css">
<!--
<?php 
echo $bar->getStyle();
?>
// -->
</style>
<script type="text/javascript">
<!--
<?php 
echo $bar->getScript();
?>
//-->
</script>
</head>
<body>

<h1>Screenshot </h1>
<?php 
$bar->setValue(65);
echo $bar->toHtml();
$bar->display();
?>

</body>
</html>
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:31,代码来源:display.php


注:本文中的HTML_Progress::setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。