User Manager/Character constants

From MikroTik Wiki
< User Manager
Revision as of 15:24, 20 February 2007 by Girts (talk | contribs) (Voucher template constants)
Jump to: navigation, 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

The following constants of voucher template will be replaced with actual user attribute values (each constant must be included in percent signs):

  • u_username - Username (login);
  • u_password - Password;
  • u_fname - First name;
  • l_name - Last name;
  • u_phone - Phone number;
  • u_locat - Location;
  • u_email - Email address;
  • u_ip - IP address;
  • u_pool - Pool name;
  • u_group - Group;
  • u_limit_download - Download limit;
  • u_limit_upload - Upload limit;
  • u_limit_uptime - Uptime limit;
  • u_used_download - Used download;
  • u_used_upload - Used upload;
  • u_used_uptime - Used uptime;
  • u_prep_time - Prepaid time - time constant or the word unlimited;
  • u_tot_price - Total price, including currency