_key=uniqid('P');
}
function setButton($label,$url,$target='_self') {
$this->_button=$label;
$this->_button_url=$url;
$this->_button_target=$target;
}
function setWidth($width) {
$this->_width=$width;
}
function setPosition($left=NULL,$top=NULL) {
if (isset($top)) $this->_top=$top;
if (isset($left)) $this->_left=$left;
}
function setLabel($label) {
if ($label!=$this->_label) {
if ($this->_drawn) {
$l=$this->_jss_single(htmlentities($label));
echo "";
flush();
}
$this->_label=$label;
}
}
function setBarColor($color) {
if ($color!=$this->_barcolor) {
if ($this->_drawn) {
echo "";
flush();
}
$this->_barcolor=$color;
}
}
function setPercent($percent) {
if ($percent!=$this->_percent) {
if ($this->_drawn) {
echo "";
flush();
}
$this->_percent=$percent;
}
}
function setPerX($some,$all) {
$this->setPercent(round($some*100/$all));
}
function make($show=true) {
/*if ($this->_wrong_browser())
return false;
*/
require(dirname(__FILE__).'/js.inc.php');
$this->_drawn=TRUE;
return true;
}
function hide() {
if ($this->_drawn) {
echo "";
flush();
}
}
function show() {
if ($this->_drawn) {
echo "";
flush();
}
}
function _jss_single($html) {
$html=str_replace("\\","\\\\",$html);
$html=str_replace("\n",'',$html);
$html=str_replace("\r",'',$html);
$html=str_replace("'",'\\\'',$html);
return $html;
}
/* function _wrong_browser() {
$browser=get_browser() OR die("ProgressClass: No browscap.ini installed - see www.php.net for help. A browscap.ini file is included in the ProgressClass package.");
return (($browser->browser=='Netscape' && $browser->majorver<6) ||
($browser->browser=='IE' && $browser->majorver<5) ||
(!$browser->javascript));
}
*/
}
?>