$fileInfo = get_latestFile($paperInfo->PaperID, &$err_message);
    $paperSize = $fileInfo->FileSize;
    $totalPaperSize += $paperSize;
    //Last element of $paperNotZippedArr is a comma and is not looped.
    for ($i = 0; $i < count($paperNotZippedArr) - 1; $i++) {
        if ($paperNotZippedArr[$i] == $paperInfo->PaperID) {
            //echo $paperInfo -> PaperID;
            $fileEnding = strstr($fileInfo->FileName, '.');
            $data = $fileInfo->File;
            $name = $paperInfo->PaperID . $fileEnding;
            $tarFile->AddString("papers/" . $name, $data);
        }
    }
}
// Tell progress bar to archive a paper for each 'tick'
$bar->setProgressHandler('archive_next_paper');
// Start building head info
ob_start();
?>

<style type="text/css">
<?php 
echo $bar->getStyle();
?>
</style>
<script type="text/javascript">
<?php 
echo $bar->getScript();
?>
</script>
Ejemplo n.º 2
0
{
    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;
}
<?php 
echo $monitor->getStyle();
?>
// -->
Ejemplo n.º 3
0
    $i = floor($progressValue / 10);
    if ($progressValue == 100) {
        $msg = '';
    } else {
        $msg = "&nbsp; 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">
<!--
<?php 
echo $bar->getStyle();
?>

body {
    background-color: #FFFFFF;
Ejemplo n.º 4
0
    }
}
$progress = new HTML_Progress();
$ui =& $progress->getUI();
$ui->setProgressAttributes(array('background-color' => '#e0e0e0'));
$ui->setStringAttributes(array('color' => '#996', 'background-color' => '#CCCC99'));
$ui->setCellAttributes(array('active-color' => '#996'));
$progress->setAnimSpeed(200);
$progress->setIncrement(10);
$progress->setStringPainted(true);
// get space for the string
$progress->setString("");
// but don't paint it
$progress->setIndeterminate(true);
// Progress start in indeterminate mode
$progress->setProgressHandler('myProgressHandler');
?>
<html>
<head>
<title>Basic Indeterminate Mode Progress example</title>
<style type="text/css">
<!--
body {
    background-color: #CCCC99;
    color: #996;
    font-family: Verdana, Arial;
}

a:visited, a:active, a:link {
    color: yellow;
}