本文整理汇总了PHP中HTML_Progress类的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Progress类的具体用法?PHP HTML_Progress怎么用?PHP HTML_Progress使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTML_Progress类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: HTML_Progress_Model
/**
* The progress bar's UI extended model class constructor
*
* @param string $file file name of model properties
* @param string $type type of external ressource (phpArray, iniFile, XML ...)
*
* @since 1.0
* @access public
* @throws HTML_PROGRESS_ERROR_INVALID_INPUT
*/
function HTML_Progress_Model($file, $type)
{
$this->_package = 'HTML_Progress';
if (!file_exists($file)) {
return HTML_Progress::raiseError(HTML_PROGRESS_ERROR_INVALID_INPUT, 'error', array('var' => '$file', 'was' => $file, 'expected' => 'file exists', 'paramnum' => 1));
}
$conf = new Config();
if (!$conf->isConfigTypeRegistered($type)) {
return HTML_Progress::raiseError(HTML_PROGRESS_ERROR_INVALID_INPUT, 'error', array('var' => '$type', 'was' => $type, 'expected' => implode(" | ", array_keys($GLOBALS['CONFIG_TYPES'])), 'paramnum' => 2));
}
$data = $conf->parseConfig($file, $type);
$structure = $data->toArray(false);
$this->_progress =& $structure['root'];
if (is_array($this->_progress['cell']['font-family'])) {
$this->_progress['cell']['font-family'] = implode(",", $this->_progress['cell']['font-family']);
}
if (is_array($this->_progress['string']['font-family'])) {
$this->_progress['string']['font-family'] = implode(",", $this->_progress['string']['font-family']);
}
$this->_orientation = $this->_progress['orientation']['shape'];
$this->_fillWay = $this->_progress['orientation']['fillway'];
if (isset($this->_progress['script']['file'])) {
$this->_script = $this->_progress['script']['file'];
} else {
$this->_script = null;
}
if (isset($this->_progress['cell']['count'])) {
$this->_cellCount = $this->_progress['cell']['count'];
} else {
$this->_cellCount = 10;
}
$this->_updateProgressSize();
}
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:43,代码来源:model.php
示例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();
}
开发者ID:alachaum,项目名称:timetrex,代码行数:46,代码来源:ProgressBar.php
示例3: HTML_Progress
<?php
// listing-2.2.2.php
require_once 'HTML/Progress.php';
$progress = new HTML_Progress();
$ui =& $progress->getUI();
$ui->setCellCount(20);
$ui->setBorderAttributes('width=1 color=#000000');
$ui->setCellAttributes(array('active-color' => '#970038', 'inactive-color' => '#FFDDAA', 'width' => 20, 'height' => 20));
?>
<!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>
<style type="text/css">
<!--
<?php
echo $progress->getStyle();
?>
body {
background-color: #FFFFFF;
color: #000000;
font-family: Verdana, Arial;
}
// -->
</style>
<script type="text/javascript">
<!--
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:31,代码来源:listing-2.2.2.php
示例4: HTML_Progress
<?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
示例5: header
if (file_exists($filename)) {
// Send binary filetype HTTP header
header('Content-Type: application/octet-stream');
// Send content-length HTTP header
header('Content-Length: ' . filesize($filename));
// Send content-disposition with save file name HTTP header
header('Content-Disposition: attachment; filename="' . $saveasname . '"');
// Output file
readfile($filename);
// Done
exit;
}
/* END Archive Download */
}
// Set up progress bar
$bar = new HTML_Progress();
$bar->setAnimSpeed(100);
$bar->setIncrement(1);
$bar->setBorderPainted(true);
$ui =& $bar->getUI();
$ui->setCellAttributes('active-color=#000084 inactive-color=#3A6EA5 width=4 spacing=0');
$ui->setBorderAttributes('width=1 style=inset color=white');
$ui->setStringAttributes(array('width' => 200, 'height' => 20, 'font-size' => 14, 'valign' => 'top'));
$ui->setCellCount(100);
// Start building archive
require_once $php_root_path . "/includes/pear/Tar.php";
require_once $php_root_path . "/includes/pear/Zip.php";
//State the current part of zip file that is being extracted
if (empty($_POST["currentZipPart"])) {
$currentZipPart = 1;
}
开发者ID:alexzita,项目名称:alex_blog,代码行数:31,代码来源:process_build_cd_structure.php
示例6: disableButton
/**
* Disables certain buttons for a page.
*
* Buttons [ = events] : back, next, cancel, reset, apply, help
*
* @param object $page Page where you want to activate buttons
* @param array $events (optional) List of buttons
*
* @since 1.1
* @access public
* @throws HTML_PROGRESS_ERROR_INVALID_INPUT
* @see enableButton()
*/
function disableButton(&$page, $events = array())
{
if (!is_a($page, 'HTML_QuickForm_Page')) {
return HTML_Progress::raiseError(HTML_PROGRESS_ERROR_INVALID_INPUT, 'exception', array('var' => '$page', 'was' => gettype($page), 'expected' => 'HTML_QuickForm_Page object', 'paramnum' => 1));
} elseif (!is_array($events)) {
return HTML_Progress::raiseError(HTML_PROGRESS_ERROR_INVALID_INPUT, 'exception', array('var' => '$events', 'was' => gettype($events), 'expected' => 'array', 'paramnum' => 2));
}
static $all;
if (!isset($all)) {
$all = array('back', 'next', 'cancel', 'reset', 'apply', 'help');
}
$buttons = count($events) == 0 ? $all : $events;
foreach ($buttons as $event) {
$group = $page->getElement('buttons');
$elements = $group->getElements();
foreach (array_keys($elements) as $key) {
if ($group->getElementName($key) == $page->getButtonName($event)) {
$elements[$key]->updateAttributes(array('disabled' => 'true'));
}
}
}
}
开发者ID:alachaum,项目名称:timetrex,代码行数:35,代码来源:generator.php
示例7: HTML_Progress
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
printf('direct way: maximum = %d <br/>', $bar->getMaximum());
$dm =& $bar->getDM();
printf('another way: maximum = %d <br/>', $dm->getMaximum());
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:7,代码来源:getmaximum.php
示例8: HTML_Progress
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$ui =& $bar->getUI();
$css =& $ui->getStyle();
print '<pre>';
echo '<h1>object</h1>';
print_r($css);
echo '<h1>plain text</h1><br/>';
print_r($css->toString());
print '</pre>';
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:12,代码来源:getstyle.php
示例9: unlink
$obj->display();
unlink($semaphore);
}
// sleep a bit ...
if ($version > 1.1) {
$obj->sleep();
} else {
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
*/
$version = _methodExists('run') ? 1.2 : 1.1;
$progress = new HTML_Progress();
$observer = new logsUpload();
// prepare the progress meter to logs all upload operations
$progress->addListener($observer);
$progress->setIncrement(10);
$progress->setAnimSpeed(100);
$progress->setIndeterminate(true);
// progress bar run in indeterminate mode
$progress->setStringPainted(true);
// get space for the string
$progress->setBorderPainted(true);
$progress->setString("");
// but don't paint it
if ($version > 1.1) {
// set a progress handler required at least version 1.2.0RC3
$progress->setProgressHandler('myFunctionHandler');
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:31,代码来源:hbar.php
示例10: myFunctionHandler
*
* @version $Id: hidden.php,v 1.2 2005/07/25 11:23:37 farell Exp $
* @author Laurent Laville <[email protected]>
* @package HTML_Progress
* @subpackage Examples
*/
require_once 'HTML/Progress.php';
/*
user callback: job to do while the progress meter is visible
*/
function myFunctionHandler($progressValue, &$obj)
{
$obj->sleep();
// nothing to do here, except sleep a bit ...
}
$progress = new HTML_Progress();
$progress->setAnimSpeed(100);
$progress->setIncrement(10);
$progress->setProgressHandler('myFunctionHandler');
?>
<html>
<head>
<style type="text/css">
<!--
body {
background-color: #CCCC99;
color: #996;
font-family: Verdana, Arial;
}
a:visited, a:active, a:link {
开发者ID:Ogwang,项目名称:sainp,代码行数:31,代码来源:hidden.php
示例11: HTML_Progress
<?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 <[email protected]>
* @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;
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:31,代码来源:nostring.php
示例12: HTML_Progress
* @package HTML_Progress
* @subpackage Examples
*/
require_once 'HTML/Progress.php';
$bar1 = new HTML_Progress(HTML_PROGRESS_BAR_VERTICAL);
$bar1->setAnimSpeed(20);
$bar1->setIdent('PB1');
$bar1->setIncrement(10);
$bar1->setBorderPainted(true);
$ui1 =& $bar1->getUI();
$ui1->setFillWay('natural');
$ui1->setCellCount(15);
$ui1->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=50 height=13');
$ui1->setBorderAttributes('width=1 color=#000000');
$ui1->setStringAttributes(array('font-size' => 8, 'color' => '#FF0000', 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'bottom'));
$bar2 = new HTML_Progress(HTML_PROGRESS_BAR_VERTICAL);
$bar2->setAnimSpeed(20);
$bar2->setIdent('PB2');
$bar2->setIncrement(5);
$bar2->setBorderPainted(true);
$ui2 =& $bar2->getUI();
$ui2->setFillWay('reverse');
$ui2->setCellCount(15);
$ui2->setCellAttributes('active-color=#3874B4 inactive-color=#FFDDAA width=50 height=13');
$ui2->setBorderAttributes('width=1 style=dashed color=#000000');
$ui2->setStringAttributes(array('font-size' => 8, 'color' => 'navy', 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'bottom'));
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
开发者ID:Ogwang,项目名称:sainp,代码行数:30,代码来源:vertical.php
示例13: HTML_Progress
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$test = "\$res = \$bar->isIndeterminate() ? 'yes':'no';";
eval($test);
printf('try 1: progress bar in indeterminate mode ? %s <br/>', $res);
$bar->setIndeterminate(true);
eval($test);
printf('try 2: progress bar in indeterminate mode ? %s <br/>', $res);
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:10,代码来源:isindeterminate.php
示例14: myMethodHandler
/**
* @ignore
*/
class myClassHandler
{
function myMethodHandler($progressValue, &$bar)
{
if (fmod($progressValue, 10) == 0) {
echo "myMethodHandler -> progress value is = {$progressValue} <br/>\n";
}
$bar->sleep();
}
}
$obs = new myClassHandler();
$monitor = new HTML_Progress_Monitor('frmMonitor3', array('button' => array('style' => 'width:80px;')));
$progress = new HTML_Progress();
$progress->setUI('Progress_Default2');
// Attach a progress ui-model
$progress->setAnimSpeed(20);
$progress->setProgressHandler(array(&$obs, 'myMethodHandler'));
$monitor->setProgressElement($progress);
?>
<html>
<head>
<title>ProgressBar Monitor - Default renderer </title>
<style type="text/css">
<!--
.progressStatus {
color:#000000;
font-size:10px;
}
开发者ID:Ogwang,项目名称:sainp,代码行数:31,代码来源:method_callback.php
示例15: HTML_Progress
<?php
require_once 'HTML/Progress/monitor.php';
$bar = new HTML_Progress();
$mon = new HTML_Progress_Monitor();
$bar->addListener($mon);
$li = $bar->getListeners();
printf("%d listener(s) <br/>", count($li));
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:8,代码来源:getlisteners.php
示例16: array
*/
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->setTab(' ');
$ui->setStringAttributes('width=350 align=left');
?>
<html>
<head>
<title>Horizontal String ProgressBar example</title>
<style type="text/css">
开发者ID:Ogwang,项目名称:sainp,代码行数:31,代码来源:string.php
示例17: HTML_Progress
<?php
@(include '../include_path.php');
/**
* Reverse Rectangle Progress example.
*
* @version $Id: rectangleback.php,v 1.1 2004/06/29 20:48:52 farell Exp $
* @author Laurent Laville <[email protected]>
* @package HTML_Progress
*/
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$bar->setAnimSpeed(100);
$bar->setIncrement(10);
$ui =& $bar->getUI();
$ui->setFillWay('reverse');
$ui->setOrientation(HTML_PROGRESS_POLYGONAL);
$ui->setCellAttributes(array('width' => 10, 'height' => 10, 'active-color' => 'red', 'inactive-color' => 'orange'));
$ui->setCellCoordinates(15, 3);
// Rectangle 15x3
?>
<html>
<head>
<title>Reverse Rectangle ProgressBar example</title>
<style type="text/css">
<!--
<?php
echo $bar->getStyle();
?>
body {
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:31,代码来源:rectangleback.php
示例18: HTML_Progress
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
$bar->setIncrement(5);
$bar->incValue();
printf('value after 1st update = %d <br/>', $bar->getValue());
$dm =& $bar->getDM();
$dm->incValue();
printf('value after 2nd update = %d <br/>', $dm->getValue());
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:10,代码来源:incvalue.php
示例19: HTML_Progress
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
printf('direct way: increment = %d <br/>', $bar->getIncrement());
$dm =& $bar->getDM();
printf('another way: increment = %d <br/>', $dm->getIncrement());
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:7,代码来源:getincrement.php
示例20: HTML_Progress
<?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
注:本文中的HTML_Progress类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论