bobmanual
Also your requested feature is in some way in the todo-list, it will be rather complex to implement it without accounts. So i think you should have to wait for HFS Version 4 ....
but
with the macro 'load' feature and a small external program you could use a workaround that may be usable for you. Steps that you would need:
1. A small program that continuously reads your logfile, selecting the registers that contain 'Fully downloaded'. With the information in this line, you could count the downloads or the volume of data downloaded between an elapsed time (24 hours, 3 days ...) and create a table by IP's or username.
You could even complete this table with a whitelist of users or ip's that would have no restrictions..
Save this table as a file, named for example accctrl.dat in a hidden folder.
2.A) Set in your template a variable like 'dl_ok' to 1 that means download allowed.
B) Include in your template a section that loads the accctrl.dat file, search in this data for user or ip. If you find a match, compare if more download will be allowed or not and set dl_ok to 0 if not.
C) Establish the way how to restrict access: If the user has exceeded his download rights, you can
a) Display a different page instead of the filelist.
or:
b) modify the filelist section in your template so that the links '<a href....' are only generated when download allowed: '{.if |dl_ok| .... .. . . .}'
This is basically a way how you can do what you want.
However, to reduce the risk that a user uses a directlink to your file like '
http://yourdomain/files/manual.doc' instead of trying it using your page, you have to avoid that he can login, using the ip or a cookie with the username to check accesscontrol and avoid then the display of the 'login' button.
If that's not enough and somebody log's in using
http://yourdomain/~login' you would have to ban him manually.