Cookies are special sequences in text files, replaced by values by server before sending replies.
Cookies are designed the same way as a programming language, so you can get simple loops and tests (but it is NOT a scripting language, if you want one just use perl etc.). Test if user has a flag:
%if(+G) This text is shown only for users with G flag (groupadmins) %endifHere is a loop on all users:
%for(allusers) user: %username %endforLoop on all connected users:
%for(allusersconnected) user: %username %endfor
Table 4-2. User Cookies
Cookie | Description |
%usercredits | Amount of credits |
%usercredits2 | Amount of credits, converted in units (MB,GB,etc) |
%userfiles_dl | Total number of files downloaded |
%userfiles_ul | Total number of files uploaded |
%userflags | Flags |
%usergroup | User MAIN group |
%userhome | User home directory |
%userip | Current ip |
%userip_allownum | Authorized ip num |
%userlastcmd | Last command received |
%userlast_login | Last time user logged in |
%userleechslots | Remaining leech slots (gadmin) |
%usermaxdl | Maximum download speed |
%usermaxidle | Idle time limit |
%usermaxul | Maximum upload speed |
%username | Login name |
%usernum_logins | Max simultaneous logins |
%userpath | User's path (absolute in filesystem) |
%userpid | User's connection PID (siteop) |
%userpwd | User's current path (relative to home dir) |
%userratio | User ratio, or unlimited |
%userslots | Remaining slots (gadmin) |
%userspeed | Current user speed (if transferring file) |
%usertag | User tagline, or **DELETED** |
%usertotal_dl | Total bytes downloaded |
%usertotal_dl2 | Total bytes downloaded, converted in units |
%usertotal_ul | Total bytes uploaded |
%usertotal_ul2 | Total bytes uploaded, converted in units |
Table 4-3. Group Cookies
Cookie | Description |
%grouphome | Default home directory for new members |
%groupip_allownum | Authorized ip num |
%groupmaxdl | Maximum (cumulated) download speed |
%groupmaxidle | Idle time limit |
%groupmaxul | Maximum (cumulated) upload speed |
%groupname | Group name |
%groupnum_logins | Max number of members connected at the same time |
%groupratio | Default ratio, or unlimited |
%grouptag | Group tagline |
%grouptotal_dl | Total bytes downloaded |
%grouptotal_dl2 | Total bytes downloaded, converted in units |
%grouptotal_ul | Total bytes uploaded |
%grouptotal_ul2 | Total bytes uploaded, converted in units |
Table 4-4. File Cookies
Cookie | Description |
%filepath | Full path to uploaded/downloaded file [a] |
%filecrc | CRC of uploaded/downloaded file |
%lastfilename | Full path to last uploaded/downloaded file [b] |
%lastfilesize | Last transfered file size |
%lastfilespeed | Last transfered file speed (bytes/sec) |
%lastfiletime | Last transfered file time (sec) |
Notes: a. available during an upload/download b. available after an upload/download |
Table 4-5. Other/General Cookies
Cookie | Description |
%sectionname | Name of current section |
%spacefree | Remaining space on device, converted in units |
%spacetotal | Total space on device, converted in units |
%include(filename) | Include another file, and parse its contents [a] |
Notes: a. You MUST take care to create no recursion in file inclusions |