[utils] element index

Package indexes

All elements
a c d e f g h i k l m n o p q r s u v
a
top
Method additem
dat_keyvalues::additem() in data-defs.php
Adds a key=>value pair item into the collection.
Function add_http_prefix
add_http_prefix() in utils.php
Make sure there is an http:// on a URL. If already present then string is returned untouched.
Method add_querydata
Add query data
c
top
Variable $count
dat_keyvalues::$count in data-defs.php
The total data items in our array
Method clearitems
Clears all key=>value pair items from the collection.
Page constants.php
constants.php in constants.php
d
top
Variable $data
dat_keyvalues::$data in data-defs.php
The array containing data in key=>value pairs
Page data-defs.php
data-defs.php in data-defs.php
Class dat_keyvalues
dat_keyvalues in data-defs.php
Dat_keyvalues
Method dat_keyvalues
Constructor
Function defaulted
defaulted() in utils.php
Return a value which may be defaulted Returns the value of the variable, if it is valid, otherwise returns the specified default value.
e
top
Function errorcode_exit
errorcode_exit() in utils.php
Exit with HTTP error code Send a simple error code and then die.
Function error_exit
error_exit() in utils.php
Exit the application with error message Echo the message and leave. Intended to handle 'emergencies'.
f
top
Constant FIELD_DELIM
FIELD_DELIM in constants.php
Field delimiter used in record structures
Function format_name
format_name() in utils.php
Returns the name in the form SURNAME, Firstname.
g
top
Method getitem
dat_keyvalues::getitem() in data-defs.php
Return item value
Method getitemindex
Find ordinal array index Finds the ordinal array index of the element with key $key.
Constant GIGABYTE
GIGABYTE in constants.php
Gigabytes
h
top
Method hasdata
dat_keyvalues::hasdata() in data-defs.php
Returns status of data.
Function href_addparm
href_addparm() in utils.php
Add a parameter keyvalue pair to a URL. We check that it isn't already there, and use the right delimiter.
Function href_delparm
href_delparm() in utils.php
Remove a parameter keyvalue pair from a URL.
Function HTTPError
HTTPError() in utils.php
Return an HTTP error message
i
top
Function inline_script
inline_script() in utils.php
Function ip_format
ip_format() in utils.php
Format a string (dotted) form of an IP address. We make sure we have
Function is_ipaddress
is_ipaddress() in utils.php
Check string to see if it is in IPv4 format. This is pretty simplistic. It returns true if the string $ip is of the form 'n.n.n.n'.
k
top
Constant KILOBYTE
KILOBYTE in constants.php
Kilobytes
l
top
Function log_sys
log_sys() in utils.php
Send a message to the system logfile Send message to the syslog, prefixed with APP_NAME nicely. Saves having to prefix it each time.
m
top
Constant MEGABYTE
MEGABYTE in constants.php
Megabytes
n
top
Function next_sequencevalue
DEPRECATED: This global utility function is now deprecated since the
Function nicebytesize
nicebytesize() in utils.php
Returns a nicely formatted size string for displaying
Function nicetime
nicetime() in utils.php
Returns a nicely formatted time string in '3d 12h 14m 33s' format, given a number of seconds. Leading elements are suppressed if they are zero.
o
top
Variable $optcount
optlist::$optcount in optlist-defs.php
Number of options
Variable $opts
optlist::$opts in optlist-defs.php
Array of options
Class optlist
optlist in optlist-defs.php
A class to make handling command line options a bit easier and more consistent.
Method optlist
optlist::optlist() in optlist-defs.php
Instantiate the optlist object. This does all the work since we expect that this is being done to process command line arguments/options.
Page optlist-defs.php
optlist-defs.php in optlist-defs.php
Method opt_exists
optlist::opt_exists() in optlist-defs.php
Return status of the named option. Returns true if the option exists or false if it does not exist.
Method opt_value
optlist::opt_value() in optlist-defs.php
Return the value of the named option. Returns the string associated with this option, or false if it does not exist.
p
top
Variable $progname
optlist::$progname in optlist-defs.php
The current program name
q
top
Function quoted_valuestring
Returns a value inside quotes. The type of quotes (single or double) are determined from the value content. If the content already has a double quote in it, then single quotes are used, else (default) double quotes are used.
r
top
Constant RECORD_DELIM
RECORD_DELIM in constants.php
Record delimiter used in record lists
Method reset
dat_keyvalues::reset() in data-defs.php
Reset the data Resets the internal array to the start. This is used when you need to repeatedly traverse the data.
Function resolveFK
resolveFK() in utils.php
Resolve a foreign key value Resolve a simple single-level foreign key. The variable 'display_fields' can contain multiple fields separated by the "|" char. A literal is prefixed by "#".
s
top
Constant SCRIPT_APPEND
SCRIPT_APPEND in utils.php
Add script by keeping current content and appending to the end
Constant SCRIPT_PREFIX
SCRIPT_PREFIX in utils.php
Add script by keeping current content and prefixing to the beginning
Constant SCRIPT_REPLACE
SCRIPT_REPLACE in utils.php
Add script by replacing current content (default)
Constant SECS_1_DAY
SECS_1_DAY in constants.php
One day
Constant SECS_1_HOUR
SECS_1_HOUR in constants.php
1 hour
Constant SECS_1_MONTH
SECS_1_MONTH in constants.php
One month
Constant SECS_1_WEEK
SECS_1_WEEK in constants.php
One week
Constant SECS_1_YEAR
SECS_1_YEAR in constants.php
One year
Constant SECS_4_HOURS
SECS_4_HOURS in constants.php
4 hours
Constant SECS_8_HOURS
SECS_8_HOURS in constants.php
8 hours
Constant SECS_10_YEARS
SECS_10_YEARS in constants.php
Ten years - used as 'forever'
Constant SECS_12_HOURS
SECS_12_HOURS in constants.php
12 hours
Constant SECS_20_MINS
SECS_20_MINS in constants.php
20 minutes
Function strip_http_prefix
strip_http_prefix() in utils.php
Strip off any http:// from a URL
u
top
Page utils.php
utils.php in utils.php
v
top
Function vspace
vspace() in utils.php
Insert vertical space in table Insert some vertical whitespace into a table.
a c d e f g h i k l m n o p q r s u v