Action Tags

Functions


appendtable

Append Table

Type: procedure

Description: Append the second table on to the first.

Usage:
 appendtable ( <file name> [ , <string> ] )


colname

Column Name

Type: function

Returns: string

Description: The column name is returned for the record set and column number.

Usage:
 colname ( <record set name> , <column number> )


colnum

Column Number

Type: function

Returns: integer

Description: The column number is returned for the record set and column name.

Usage:
 colnum ( <record set name> , <column name> )


count

Count Substrings

Type: function

Returns: integer

Description: The number of substrings in the string is counted and the non-negative integer is returned. See an example of how it is used with the For Loop Example.

Usage:
 count ( <string> , <substring> )

Example 1:

Displayed Text:
The string 'red#orange#yellow#green#blue#purple' has 5 '#' symbols in it.

Action Tag:
The string 'red#orange#yellow#green#blue#purple' has {% count('red#orange#yellow#green#blue#purple','#')} '#' symbols in it.


ct

Calendar Time

Type: function

Returns: 14-digit integer

Description: Unix time is converted into calendar time and the 14-digit integer is returned. Unix time is the number of seconds since 12:00 AM January 1, 1970 GMT (the epoch). Calendar time is a 14 digit integer consisting of the four digit year followed by the 2 digit month, then 2 digit day of the month then the 2 digit hour of the day, 2 digit minutes and 2 digit seconds. If the Unix time is not specified the current time and day are used.

Usage:
 ct ( [ <unix time> ] )

Example 1:

Displayed Text:
Right now is 20171024001607

Action Tag:
Right now is {% ct ( ) }

Example 2:

Displayed Text:
The Unix epoch was 19691231140000 seconds ago.

Action Tag:
The Unix epoch was {% ct ( 0 ) } seconds ago.


date

Date Format

Type: function

Returns: string

Description: The date and/or time specified in either Unix or Calendar time is formatted as specified in the Format field and returned. For a complete list of the date formats go to dateFormats.shtml.

Usage:
 date ( <format> [ , <unix time> ] [ , <calendar time> ] )

Example 1:

Displayed Text:
Christmas in 1985 was on a Wednesday.

Action Tag:
Christmas in 1985 was on a {% date ( 'l' , , 19851225 ) }.

Example 2:

Displayed Text:
There are 86,400 seconds in a day so one day following the epoch was Thu Jan 1 1970 2:00:00 PM HST.

Action Tag:
There are 86,400 seconds in a day so one day following the epoch was {% date ( 'D M j Y g:i:s A T' , 86400 ) }.


delete

Delete Files

Type: procedure

Description: Deletes the list of files

Usage:
 delete ( <file name> )


escape

Escape String

Type: function

Returns: string

Description: The escape function encodes special characters in the specified string and returns the new string. It encodes spaces, punctuation, and any other character that is not an ASCII alphanumeric character, with the exception of these characters:  * @ - _ + . / .

Usage:
 escape ( <string> )

Example 1:

Displayed Text:
Characters%20%21%23%24%20translate%20but%20*@/%20doesn%27t.

Action Tag:
{% escape ( "Characters !#$ translate but *@/ doesn't." ) }

Example 2:

Displayed Text:
# translates to %23, & translates to %26 and = translates to %3d

Action Tag:
# translates to {% escape ( '#' ) }, & translates to {% escape ( '&' ) } and = translates to {% escape ( '=' ) }


exists

Variable Type

Type: function

Returns: integer

Description: Returns the variable type (1 or 2) if it exists.

Usage:
 exists ( [ <> ] )


filelist

File List

Type: procedure

Description: A record set is created containing files in the specified path. For an example, see /examples/interpret.shtml.

Usage:
 filelist ( <path> , <record set name> [ , <record set key> ] )


getcookie

Get Cookie

Type: function

Returns: string

Description: Get the cookie value for the specified name.

Usage:
 getcookie ( <name> )


htpasswd

Generate .htpasswd password

Type: function

Returns: string

Description: Generate .htpasswd.

Usage:
 htpasswd ( <password> )

Example 1:

Displayed Text:
joe:QL5GXH69kMGbA

Action Tag:
joe:{% htpasswd('joesPassword')}


httpget

HTTP GET

Type: function

Returns: string

Description: Hit the URL and return what is returned.

Usage:
 httpget ( [ <> ] )


httppost

HTTP POST

Type: function

Returns: string

Description: Post to the URL

Usage:
 httppost ( [ <> ] )


index

Index Position of Substring

Type: function

Returns: integer

Description: Find the position of the substring within string starting at start index.

Usage:
 index ( <string> , <substring> [ , <start index> ] )

Example 1:

Displayed Text:
The position of the first 'x' in the string 'abcxyzqwx3x' is 3

Action Tag:
The position of the first 'x' in the string 'abcxyzqwx3x' is {% index('abcxyzqwx3x','x')}


int

Integer Convert

Type: function

Returns: integer

Description: Convert the real number to an integer.

Usage:
 int ( <number> )


interpret

Interpret Macro

Type: function

Returns: string

Description: Interpret the specified macro. See Var-Macro-Interpret example.

Usage:
 interpret ( <string> )


lc

Lower Case

Type: function

Returns: string

Description: Convert to lower case

Usage:
 lc ( <string> )

Example 1:

Displayed Text:
Lower case of: 'aBcDeFg' is abcdefg.

Action Tag:
Lower case of: 'aBcDeFg' is {% lc('aBcDeFg') }.


length

Length of String

Type: function

Returns: integer

Description: Return the length of the string

Usage:
 length ( <string> )

Example 1:

Displayed Text:
The length of 'aBcDeFg' is 7.

Action Tag:
The length of 'aBcDeFg' is {% length('aBcDeFg') }.


macro

Macro Define

Type: function

Returns: string

Description: Specify a macro that can be interpreted (executed) using the interpret function. See Var-Macro-Interpret example.

Usage:
 macro ( <tag> )


myd

MySQL Date Format

Type: function

Returns: string

Description: MySQL DATE Format

Usage:
 myd ( [ <unix time> ] [ , <calendar time> ] )

Example 1:

Displayed Text:
The date is 2017-10-24

Action Tag:
The date is {% myd()}


mydt

MySQL Date/Time Format

Type: function

Returns: string

Description: MySQL DATETIME Format

Usage:
 mydt ( [ <unix time> ] [ , <calendar time> ] )

Example 1:

Displayed Text:
The date and time is 2017-10-24 00:16:07

Action Tag:
The date and time is {% mydt()}


myt

MySQL Time Format

Type: function

Returns: string

Description: MySQL TIME Format

Usage:
 myt ( [ <unix time> ] [ , <calendar time> ] )

Example 1:

Displayed Text:
The time is 00:16:07

Action Tag:
The time is {% myt()}


ncf

Number Comma Format Convert

Type: function

Returns: string

Description: Put commas between the thousands places in a number.

Usage:
 ncf ( <number> )

Example 1:

Displayed Text:
There are 1,048,576 bytes in 1 MB.

Action Tag:
There are {% ncf(1024*1024)} bytes in 1 MB.


newrecset

Define New Record Set

Type: procedure

Description: Define the columns (fields) of a record set.

Usage:
 newrecset ( <record set name> )


print

Print File

Type: procedure

Description: Prints the string to the file.

Usage:
 print ( <file name> , <string> )


quotemeta

Quote Meta Convert

Type: function

Returns: string

Description: Back slashes everything but a letter, number and underscore.

Usage:
 quotemeta ( <string> )

Example 1:

Displayed Text:
See\ which\ are\ metacharacters\:\ \~\`\!\@\#\$\%\^\&\*\(\)\-\+\=\{\}\[\]\\\|\'\?\/\.\,\<\>\"\:\;_12345

Action Tag:
{% quotemeta('See which are metacharacters: ~`!@#$%^&*()-+={}[]\|\'?/.,<>":;_12345' ) }


rand

Random Number

Type: function

Returns: integer

Description: Find a random number between zero and the specified number.

Usage:
 rand ( <number> )

Example 1:

Displayed Text:
A random number between 0 and 1000: 530.226387820346

Action Tag:
A random number between 0 and 1000: {% rand(1000)}


read

Read File

Type: function

Returns: string

Description: Read the file and return the contents.

Usage:
 read ( <file name> )


recindex

Record Index of Key

Type: function

Returns: integer

Description: Returns the record index for the record whose key value is equal to the argument. A key index must be specified for the record set.

Usage:
 recindex ( [ <> ] )


recset

Record Set Declaration

Type: procedure

Description: Declares the name of record sets.

Usage:
 recset ( <identifier list> )


rept

Repeat String

Type: function

Returns: string

Description: Repeat the string the specified number of times.

Usage:
 rept ( <string> , <number of times> )

Example 1:

Displayed Text:
Display 15 periods: ...............

Action Tag:
Display 15 periods: {% rept('.',15) }


resequence

Resequence Array

Type: procedure

Description: Resequence an array according to the permutation sequence code

Usage:
 resequence ( [ <string> ] )


rindex

Right Index Position of Substring

Type: function

Returns: integer

Description: Find the rightmost substring in the string starting at start index.

Usage:
 rindex ( <string> , <substring> [ , <start index> ] )

Example 1:

Displayed Text:
The position of the last 'x' in the string 'abcxyzqwx3x' is 10

Action Tag:
The position of the last 'x' in the string 'abcxyzqwx3x' is {% rindex('abcxyzqwx3x','x')}


rmdir

Remove Directory

Type: procedure

Description: Deletes the list of directories

Usage:
 rmdir ( <directory name> )


setcol

Set Column Name and Number

Type: procedure

Description: Equates a column name to a column number for the record set

Usage:
 setcol ( <record set name> , <column name> , <column number> )


setcookie

Set Cookie

Type: procedure

Description: Sets up a name value pair to be returned as a cookie

Usage:
 setcookie ( <name> , <value> [ , <path> ] [ , <expiration date> ] )


sort

Sort Record Set

Type: procedure

Description: Sort the record set.

Usage:
 sort ( <record set name> , <key> [ , <type> ] [ , <direction> ] )


sprintf

String Print Format

Type: function

Returns: string

Description: Format the string or number using the specified format.

Usage:
 sprintf ( <format> , <format string> )


sql

SQL Command

Type: procedure

Description: Execute the SQL command. If a record set it returned and record set name must appear.

Usage:
 sql ( <command string> [ , <record set name> ] [ , <key> ] )


sqlf

SQL String Format

Type: function

Returns: string

Description: Make two ' characters out of one.

Usage:
 sqlf ( <string> )

Example 1:

Displayed Text:
{ sqlf("It's fun where we're going.") }

Action Tag:
{ sqlf("It's fun where we're going.") }


stat

Statistics of File

Type: function

Returns: string

Description: Return the statistics of a file. For an example, see /examples/interpret.shtml.

Usage:
 stat ( <file name> )


subfield

Subfield of String Array

Type: function

Returns: string

Description: Find the index subfield of a string where subfields are separated by the substring. . See an example of how it is used with the For Loop Example.

Usage:
 subfield ( <string> , <substring> , <index> )


substitute

String Substitute

Type: function

Returns: string

Description: Replace all the occurances of substring in string with replace string. Two parameter version uses Perl ~s on string where substring begins with ~s.

Usage:
 substitute ( <string> , <substring> [ , <replace string> ] [ , <number of times> ] )

Example 1:

Displayed Text:
red, green, blue

Action Tag:
{% s='red#green#blue' ; substitute(s,'#',', ') }

Example 2:

Displayed Text:
Large - $54.00 and Medium - $51.25.

Action Tag:
{% s='Large - $54.00 and Medium - $51.25.' ; substitute(s,'~s/(\$\d*\.\d*)/<font color=red>$1<\/font>/g') }


substr

Substring

Type: function

Returns: string

Description: Return the length character substring of string that begins with index.

Usage:
 substr ( <string> , <index> [ , <length> ] )


ta

Time Alias

Type: function

Returns: string

Description: Return a 7 character seemingly random string derived from the system time that us suitable to use as an email alias.

Usage:
 ta ( [ <calendar time> ] [ , <unix time> ] )

Example 1:

Displayed Text:
All the characters of ge8s0p7 changes with each passing second.

Action Tag:
All the characters of {% ta() } changes with each passing second.

Example 2:

Displayed Text:
When deriving an alias from a fixed date (e.g., Jan 1, 2000) only the first character changes while the remaining 6 (which are derived from the date) stay the same: rtprb1

Action Tag:
When deriving an alias from a fixed date (e.g., Jan 1, 2000) only the first character changes while the remaining 6 (which are derived from the date) stay the same: {% ta(20000101) }


tabletotext

Table to Text

Type: function

Returns: string

Description: Convert the record set to a text file using delimiter to separate the fields of the record. Used to make tab delimited or comma separated values text files.

Usage:
 tabletotext ( <record set name> , <delimiter> )


tabtext

Tab Delimited Text File Read

Type: procedure

Description: deprecated

Usage:
 tabtext ( <file name> , <record set name> [ , <key> ] )


texttotable

Text to Table

Type: procedure

Description: Convert the text file to a record set where the delimiter specifeds the separation of fields in a record.

Usage:
 texttotable ( <text> , <delimiter> , <record set name> [ , <record set key> ] )


trim

Trim

Type: function

Returns: string

Description: Trim the white space (spaces, returns, tabs) off the front and back of the string.

Usage:
 trim ( <string> )


uc

Upper Case

Type: function

Returns: string

Description: Return the string all upper case.

Usage:
 uc ( <string> )

Example 1:

Displayed Text:
Upper case of: 'aBcDeFg' is ABCDEFG.

Action Tag:
Upper case of: 'aBcDeFg' is {% uc('aBcDeFg') }.


unescape

Unescape

Type: function

Returns: string

Description: Unescape the string. Same as JavaScript.

Usage:
 unescape ( <escaped string> )


unlink

Delete Files

Type: procedure

Description: Deletes the list of files

Usage:
 unlink ( <file name> )


ut

Unix Time

Type: function

Returns: integer

Description: Convert the Calendar time to Unix time

Usage:
 ut ( [ <calendar time> ] )

Example 1:

Displayed Text:
1508840167 and 946764000

Action Tag:
{% ut() } and {% ut(20000101) }


var

Variable Declaration

Type: procedure

Description: Declares a scaler variable

Usage:
 var ( <identifier list> )


wtabtext

Write Tab File

Type: procedure

Description: Prints a record set as a tab delimited text file. Depreciated.

Usage:
 wtabtext ( <identifier list> )


 

 

| Home |


November 20, 2003

System resources to generate this page:
1: READ FILE A: /home/action/public_html/_global.shtml (0s)
19: READ FILE A: /home/action/adocs/docs/functions.shtml (0s)
6: READ FILE FAILED: /home/action/public_html/docs/functions.txt (0s)
84: READ FILE A: /home/action/adocs/docs/inc_header.html (0s)
94: SQL SELECT (FNC): DBI:mysql:action_database:localhost (0s)
110: READ FILE A: /home/action/adocs/docs/inc_trailer.html (0s)