SiteKiosk Documentation
One Step Back

Create Method




The Create method creates an account.


Syntax

    [long=] SiteCafe.Server.Accounts.Create(mode, expiryDate, vDuration,
            eDuration, amount, duration, paid, persistent)
    
Parameters
    modeLong value that specifies the payment mode.
    expiryDateLong value that specifies the expiry date (0 = never).
    vDurationLong value that specifies the number of seconds the account will be valid after the activation (first login).
    eDurationLong value that specifies the expiry duration. When the account is logged out for this contiguous period of time, it expires (0 = never).
    amountCurrency value that specifies the amount (mode 1).
    durationLong value that specifies the surftime (mode 3).
    paidBoolean value that specifies whether payment occurred.
    persistentLong value that specifies whether the account is persistent.
Return Value
    Returns a Long value containing the account index.
Remarks
    Dates are specified by the return value of the Date.getVarDate method divided by 1000.
    Durations are a number of seconds.

    Possible payment modes are:

    1 : decrease credit (prepaid)
    3 : decrease remaining time (prepaid)
    4 : increase time (payment after surfing)

    Use the CurrencyFormatter object for currency functionality.
Examples
    The following example creates a new persistent account that decreases credit and does not expire.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    accID = SiteCafe.Server.Accounts.Create(1, 0, 0, 0, 5, 0, true, true);
    </SCRIPT>
    

Applies to
    SiteKiosk v6.2 (and later versions).

Back to topBack to top

© 1997-2011 PROVISIO - Aventura, USA & Muenster, Germany -