mod_config_sql_topups.pm

Responsible for handling configuration attributes for topups.

Sets a data topup value for a user. Must be inserted into the database as integer.

Sets a uptime topup value for a user. Must be inserted into the database as integer.

Insertion to the database as follows:

  • UserID - User ID
  • Type - 1 ⇒ Traffic, 2 ⇒ Uptime
  • ValidFrom - Valid date as described below
  • ValidTo - Valid date as described below
  • Value - Integer ⇒ Traffic is specified in megabytes, Uptime is specified in minutes.

ValidFrom and ValidTo

Both ValidFrom and ValidTo are added to the database in the format 'YYYY-MM-01 00:00:00'. The ValidTo date must be later than the ValidFrom date. Because of multiple timezones and internationalization dates are calculated using the time aswell.

2010-07-01 = 2010-07-01 00:00:00
2010-08-01 = 2010-08-01 00:00:00
2010-07-31 = 2010-07-31 00:00:00