fid;
}
public function show()
{
global $PERMSTORE, $current_user, $users;
echo "
\n";
if($current_user->uid == 0) {
echo "
fid . "\">Delete\n";
}
echo "
fid . "\"
\n";
echo "
\n";
echo "
Uploaded by: " . $users->getUser($this->uid)->name . "
\n";
echo "
" . date("c", $this->date) . "
\n";
echo "
Size: " . ceil(filesize($PERMSTORE . "/" . $this->fid) / 1024) . "kb
\n";
echo "
Use this command to insert the file: {{" . $this->fid . "}}
\n";
echo "
\n";
}
public function File($fid, $uid, $name, $date, $mimetype)
{
$this->fid = $fid;
$this->uid = $uid;
$this->name = $name;
$this->date = $date;
$this->mimetype = $mimetype;
}
}
class Files {
private $file;
public $files = array();
public function add($file) {
$key = $file->fid;
$this->files[$key] = $file;
}
public function write()
{
$fp = fopen($this->file, "w");
$block = TRUE;
flock($fp, LOCK_EX, $block); // do an exclusive lock
fwrite($fp, "\n");
fwrite($fp, "