User Manager/Character constants

From MikroTik Wiki
< User Manager
Revision as of 06:44, 1 July 2011 by SergejsB (talk | contribs) (→‎Voucher template constants: Add New Vouchers)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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_fname% - First name;
  • %u_lname% - Last name;
  • %u_phone% - Phone number;
  • %u_locat% - Location;
  • %u_email% - Email address;
  • %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;