Global Constants

The CYWare JS API provides global constant functions to improve code maintainability when changs ahve to be made.

Function Description
CYDIR () Returns a string containing the current web directory.
dbini () Returns a string containing the section name in the INI file that holds database connection settings. So dbini () might return the string "RETAIL". In the INI file, the RETAIL section would looks like the example below:
cyipaddr Returns a string containing the logged in user's current IP address.
cymacaddr Returns a string containing the logged in user's current MAC address.
Alphabetic Case:
nocase (), lowercase (), uppercase (), propercase ()
The alphabetic case functions returns a numeric representation of the case desired. These functions are used when creating HTML input elements.
Query Result Format:
dbcsv (), dbjson (), dbquery ()
These functions return a numeric representation of the format desired for SQL query results. dbcsv () indicates a comma delimitted string, dbjson () a JSON formatted string and dbquery () for a HTML parameter string.