[seti authorized] [userdb function=check_file_acl location="[scratch deliverable]" mode=expire ][/seti][perl products] my $auth = $Scratch->{authorized}; if($auth !~ /1/) { Log("Not authorized for $Scratch->{deliverable}, 403"); $Document->header('Status: 403 Not authorized'); $Document->hot(1); $Document->write(<{deliverable}. Buy it first, please. EOF return; } my $type = tag_data('products', 'dl_type', $Scratch->{deliverable}); my $location = tag_data('products', 'dl_location', $Scratch->{deliverable}); my $content = $Tag->file("$location"); my $len = length($content); if(! $len) { Log("Not found: $Scratch->{deliverable} type=$type at $location, 404"); $Document->header('Status: 404 not found'); $Document->hot(1); $Document->write(<{deliverable} not found. EOF return; } $Document->header("Content-Type: $type\nContent-Length: $len"); $Document->hot(1); $Document->write($content); return; [/perl]