本文整理汇总了PHP中HTML_Progress::toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Progress::toHtml方法的具体用法?PHP HTML_Progress::toHtml怎么用?PHP HTML_Progress::toHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_Progress
的用法示例。
在下文中一共展示了HTML_Progress::toHtml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
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>
<?php
echo $bar->toHtml();
$bar->run();
?>
</body>
</html>
示例2: InitProgressBar
function InitProgressBar($increment = 1)
{
global $progress_bar;
$progress_bar = new HTML_Progress();
$progress_bar->setAnimSpeed(100);
//$progress_bar->setIncrement( (int)$increment );
//$progress_bar->setIndeterminate(true);
$progress_bar->setBorderPainted(true);
$ui =& $progress_bar->getUI();
$ui->setCellAttributes('active-color=#3874B4 inactive-color=#CCCCCC width=10');
$ui->setBorderAttributes('width=1 color=navy');
$ui->setStringAttributes('width=60 font-size=14 background-color=#FFFFFF align=center');
?>
<html>
<head>
<style type="text/css">
<!--
<?php
echo $progress_bar->getStyle();
?>
body {
background-color: #FFFFFF;
color: #FFFFFF;
font-family: Verdana, freesans;
}
a:visited, a:active, a:link {
color: yellow;
}
// -->
</style>
<script type="text/javascript">
<!--
<?php
echo $progress_bar->getScript();
?>
//-->
</script>
</head>
<body>
<div align="center">
<?php
echo $progress_bar->toHtml();
}
示例3: die
echo $meter->getStyle();
?>
// -->
</style>
<script type="text/javascript">
<!--
<?php
echo $meter->getScript();
?>
//-->
</script>
</head>
<body>
<?php
echo $meter->toHtml();
@set_time_limit(0);
// unlimited time operation (removed 30s default restriction)
$f = new Net_FTP();
//
// 3. connect to the FTP server
//
$ret = $f->connect($ftp['host'], $ftp['port']);
if (PEAR::isError($ret)) {
die($ret->getMessage());
}
printf('connected at <b>%s</b><br />', $ftp['host']);
//
// 4. login to the FTP server as a well-known user
//
$ret = $f->login($ftp['user'], $ftp['pass']);
示例4: myFunctionHandler
echo $progress->getStyle();
?>
// -->
</style>
<script type="text/javascript">
<!--
<?php
echo $progress->getScript();
?>
//-->
</script>
</head>
<body>
<?php
echo $progress->toHtml();
if (isset($_GET['ID'])) {
if ($version > 1.1) {
$progress->run();
// run method is born on version 1.2.0RC3
} else {
// do the same as run() method
do {
$progress->display();
myFunctionHandler($progress->getValue(), $progress);
if ($progress->getPercentComplete() == 1) {
if ($progress->isIndeterminate()) {
$progress->setValue(0);
} else {
break;
}
示例5:
?>
//-->
</script>
</head>
<body>
<table class="container">
<tr>
<td width="25%" align="center">
<?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();
示例6:
$arr = $form->getElementValue('border');
$border = $arr[0];
$arr = $form->getElementValue('color');
$color = $arr[0];
} else {
$border = $defaultValues['border'];
$color = $defaultValues['color'];
}
$bar = new HTML_Progress();
$bar->setAnimSpeed(200);
$bar->setIncrement(10);
$bar->setBorderPainted(true);
$bar->setStringPainted(true);
// get space for the string
$bar->setString('');
// but don't paint it
$bar->setProgressHandler('myFunctionHandler');
$ui =& $bar->getUI();
$ui->setCellAttributes('active-color=#7B7B88 inactive-color=#D0D0D0 width=10');
$ui->setBorderAttributes(array('width' => 2, 'color' => $color, 'style' => $border));
$ui->setStringAttributes(array('width' => 320, 'font-size' => 10, 'align' => 'left', 'valign' => 'bottom', 'background-color' => '#D0D0D0'));
$ui->setProgressAttributes('width=320');
$tpl->setVariable("L_STYLESHEET", $bar->getStyle());
$tpl->setVariable("L_JAVASCRIPT", $ui->getScript());
$tpl->setVariable("L_PROGRESS_BAR", $bar->toHtml());
$renderer = new HTML_QuickForm_Renderer_ITStatic($tpl);
$form->accept($renderer);
$tpl->show();
$bar->run();
$bar->display();
// to display the last custom string