fckphp_config=$fckphp_config;
$this->type=$type;
$this->raw_cwd=$cwd;
$this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd));
$this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd));
$this->uploadID=$_GET['uploadID'];
$this->refreshURL=$_GET['refreshURL'];
}
function run() {
if (isset($this->refreshURL)&&($this->refreshURL!="")) {
//Continue monitoring
$uploadProgress=file($this->refreshURL);
$url=$this->refreshURL;
} else {
//New download
$uploadProgressHandler=$this->fckphp_config['uploadProgressHandler'];
if ($uploadProgressHandler=='') {
//Progresshandler not specified, return generic response
?>
uploadID."&dtnow=".time()."&dtstart=".time();
$_SESSION[$this->uploadID]=$url;
$uploadProgress=file($url);
}
$uploadProgress2=implode("\n",$uploadProgress);
$parser = xml_parser_create();
xml_parse_into_struct($parser, $uploadProgress2, $vals, $index);
$refreshURL=isset($vals[$index['REFRESHURL'][0]]['value'])?$vals[$index['REFRESHURL'][0]]['value']:"";
$totalBytes=isset($vals[$index['TOTALBYTES'][0]]['value'])?$vals[$index['TOTALBYTES'][0]]['value']:0;
$readBytes=isset($vals[$index['READBYTES'][0]]['value'])?$vals[$index['READBYTES'][0]]['value']:0;
$status=isset($vals[$index['STATUS'][0]]['value'])?$vals[$index['STATUS'][0]]['value']:1;
header ("content-type: text/xml");
echo "\n";
?>