";
if (!isset($classparams['http_flist_file_between']))
$classparams['http_flist_file_between'] = " | ";
if (!isset($classparams['http_flist_file_after']))
$classparams['http_flist_file_after'] = " |
\n";
$this->appletparams = $appletparams;
$this->classparams = $classparams;
$this->page_start();
}
/**
* Return an array of uploaded files * The array contains: name, size, tmp_name, error,
* relativePath, md5sum, mimetype, fullName, path
*/
public function uploadedfiles() {
return $this->files;
}
/**
* Log a message on the current output, as a HTML comment.
*/
protected function logDebug($function, $msg, $htmlComment=true) {
$output = "[DEBUG] [$function] $msg";
if ($htmlComment) {
echo("\r\n");
} else {
echo("$output\r\n");
}
}
/**
* Log a message to the PHP log.
* Declared "protected" so it may be Extended if you require customised logging (e.g. particular log file location).
*/
protected function logPHPDebug($function, $msg) {
if ($this->classparams['debug_php'] === true) {
$output = "[DEBUG] [$function] ".$this->arrayexpand($msg);
error_log($output);
}
}
private function arrayexpand($array) {
$output = '';
if (is_array($array)) {
foreach ($array as $key => $value) {
$output .= "\n ".$key.' => '.$this->arrayexpand($value);
}
} else {
$output .= $array;
}
return $output;
}
/**
* Convert a value ending in 'G','M' or 'K' to bytes
*
*/
private function tobytes($val) {
$val = trim($val);
$last = fix_strtolower($val{strlen($val)-1});
switch($last) {
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}
/**
* Build a string, containing a javascript wrapper function
* for setting applet properties via JavaScript. This is necessary,
* because we use the "modern" method of including the applet (using
*