these additional functions are not part of any class, but can be used anywhere in the code.

pg_begin() // begins a transaction

pg_rollback() // rolls back a transaction

pg_commit() // commits a transaction

pg_squery($sql) // just return the result of a query on the database

pg_sfetch_all($sql or $query_result) // returns the result of a pg_fetch_all

pg_sfetch_row($sql or $query_result) // returns the first row from the result of a pg_fetch_all

pg_sfetch($sql or $query_result) // returns the first value from the first row of a pg_fetch_all

imageResize($abs_path, $web_path, $size, $target_h, $target_w, $alt, $align, $debug) // generates <img> tag with correctly sized widths and heights.
- size is the percentage of the original size. e.g. $size='30' would display the picture at 30% of its original size

formmod($string) // formats a string to place in <input value='$string'> - (runs through htmlspecialchars)

displaymod($string) // formats a string with <br> and &nbsp; for clean view on site

display_currency($string, $decimal_places = 2) // formats a number like 12345.6 as $12,345.60 - decimal places are an optional parameter

create_random_string($length = '15', $character_set = "abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ123456789") // generates a random string for passwords or confirmation codes