User Manager/Character constants: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
SergejsB (talk | contribs)
SergejsB (talk | contribs)
Line 33: Line 33:
* %u_lastName% - Last name;
* %u_lastName% - Last name;
* %u_phone% - Phone number;
* %u_phone% - Phone number;
* %u_locat% - Location;
* %u_location% - Location;
* %u_email% - Email address;
* %u_email% - Email address;
* %u_comment% - Comment;
* %u_ipAddr% - IP address;
* %u_ipAddr% - IP address;
* %u_pool% - Pool name;
* %u_pool% - Pool name;
Line 41: Line 42:
* %u_limit_upload_f% - Nicely formatted upload limit (introduced in v3.1);
* %u_limit_upload_f% - Nicely formatted upload limit (introduced in v3.1);
* %u_limit_transfer_f% - Nicely formatted transfer limit (introduced in v3.1);
* %u_limit_transfer_f% - Nicely formatted transfer limit (introduced in v3.1);
* %u_limitdownload% - Download limit (in bytes);
* %u_limitDownload% - Download limit (in bytes);
* %u_limitupload% - Upload limit (in bytes);
* %u_limitUpload% - Upload limit (in bytes);
* %u_limituptime% - Uptime limit (in bytes);
* %u_limitUptime% - Uptime limit (in bytes);
* %u_useddownload% - Used download;
* %u_usedDownload% - Used download;
* %u_usedupload% - Used upload;
* %u_usedUpload% - Used upload;
* %u_useduptime% - Used uptime;
* %u_usedUptime% - Used uptime;
* %u_prep_time% - Prepaid time - time constant or the word ''unlimited'';
* %u_prep_time% - Prepaid time - time constant or the word ''unlimited'';
* %u_tot_price% - Total price, including currency;
* %u_tot_price% - Total price, including currency;
* %u_callerId% - Caller-id information;
* %u_callerId% - Caller-id information;
* %u_shared_users% - Number of shared users;
* %u_shared_users% - Number of shared users;
* %u_wirelesspsk% - Wireless WPA/WPA2 pre-shared key;  
* %u_wirelessPsk% - Wireless WPA/WPA2 pre-shared key;  
* %u_wirelessenckey% - Wireless WEP key;  
* %u_wirelessEncKey% - Wireless WEP key;  
* %u_wirelessencalgo% - Wireless Encryption Algorithm;  
* %u_wirelessEncAlgo% - Wireless Encryption Algorithm;  
* %u_tilltime% - Time available for users (Profile Validity);
* %u_tillTime% - Time available for users (Profile Validity);
* %u_timeLeft% - Time left for user;
* %u_timeLeft% - Time left for user;
* %u_actualprofilename% - Profile Name;
* %u_actualProfileName% - Profile Name;
* %u_actualprofilestart% - Profile start date;
* %u_actualProfileStart% - Profile start date;
* %u_actualProfileEnd% - Profile end date;
* %u_actualProfileEnd% - Profile end date;
* %u_actualprofileleft% - Time left for profile validity;
* %u_actualProfileLeft% - Time left for profile validity;
* %u_actualRateLim% - Rate-Limit;
* %u_actualRateLim% - Rate-Limit;
* %u_moneypaid% - Money paid by user;
* %u_moneyPaid% - Money paid by user;
* %u_moneyUsed% - Money used by user;
* %u_moneyUsed% - Money used by user;
* %u_moneyleft% - Money left for user;
* %u_moneyleft% - Money left for user;

Revision as of 09:36, 4 August 2011

Time constants

Time constants can be divided in parts. Each part consists of integer followed by one of the following characters:

  • w - week (equals 7 days)
  • d - day (equals 24 hours)
  • h - hour (equals 60 minutes)
  • m - minute (equals 60 seconds)
  • s - second

Examples:

  • 4w2d - 30 days (4 weeks and 2 days).
  • 30d - 30 days. Equals 4w2d
  • 3h - 3 hours
  • 2d2h - 50 hours (2 days and 2 hours). Equals 50h
  • 2w30m - 2 weeks and 30 minutes. Equals 20190m.

Date constants

In date constant following characters will be replaced with proper values:

  • %Y - four digit year representation
  • %b - verbal (short) month representation
  • %m - two digit month representation
  • %d - two digit day-of-the-month representation

Examples (representing October 5, 2006):

  • %d/%m/%Y - 05/10/2006
  • %Y-%b-%d - 2006-Oct-05

Voucher template constants at v5.x

The following constants of voucher template will be replaced with actual user attribute values:

  • %u_username% - Username (login);
  • %u_password% - Password;
  • %u_owner% - User Manager customer;
  • %u_firstName% - First name;
  • %u_lastName% - Last name;
  • %u_phone% - Phone number;
  • %u_location% - Location;
  • %u_email% - Email address;
  • %u_comment% - Comment;
  • %u_ipAddr% - IP address;
  • %u_pool% - Pool name;
  • %u_group% - Group;
  • %u_limit_download_f% - Nicely formatted download limit (introduced in v3.1);
  • %u_limit_upload_f% - Nicely formatted upload limit (introduced in v3.1);
  • %u_limit_transfer_f% - Nicely formatted transfer limit (introduced in v3.1);
  • %u_limitDownload% - Download limit (in bytes);
  • %u_limitUpload% - Upload limit (in bytes);
  • %u_limitUptime% - Uptime limit (in bytes);
  • %u_usedDownload% - Used download;
  • %u_usedUpload% - Used upload;
  • %u_usedUptime% - Used uptime;
  • %u_prep_time% - Prepaid time - time constant or the word unlimited;
  • %u_tot_price% - Total price, including currency;
  • %u_callerId% - Caller-id information;
  • %u_shared_users% - Number of shared users;
  • %u_wirelessPsk% - Wireless WPA/WPA2 pre-shared key;
  • %u_wirelessEncKey% - Wireless WEP key;
  • %u_wirelessEncAlgo% - Wireless Encryption Algorithm;
  • %u_tillTime% - Time available for users (Profile Validity);
  • %u_timeLeft% - Time left for user;
  • %u_actualProfileName% - Profile Name;
  • %u_actualProfileStart% - Profile start date;
  • %u_actualProfileEnd% - Profile end date;
  • %u_actualProfileLeft% - Time left for profile validity;
  • %u_actualRateLim% - Rate-Limit;
  • %u_moneyPaid% - Money paid by user;
  • %u_moneyUsed% - Money used by user;
  • %u_moneyleft% - Money left for user;