The FileSerialize class allows data to be serialized and stored in a file, which can be read from in the same object-oriented manner. This makes creating caches very easy.
Creates a FileSerialize object using the specified filename. If base64 is true, the serialized data is base64 encoded.
This is described in depth in the module section of this guide.
This class is used to access dynamic modules, and uses FileSerialize to keep an up-to-date cache of meta-information, so that all of the modules do not have to be loaded to load a single module.
Creates a module_list object for the software package specified in package. options can be: 'directory' (specifies the modules directory), 'display_hidden' (forces hidden modules to be shown in display functions), 'suffix' (specifies a particular suffix for modules).
Determines if the specified directory has an up-to-date cache.
Returns an array of all of the categories of modules defined.
Determines if module_name is a module which exists on the system. It determines this by checking to see if any of the class names in the cache match module_name.
Determines if a specified category has no modules in it. It can optionally only check for modules with a CATEGORY_VERSION above minimum_version.
Executes module module's "execute" method, optionally with parameters and returns the result.
array module_list->generate_array(string category, string category_version, [string key_template], [string value_template], [string icon_template]);
The icon_template describes how the #icon# macro is expanded, and by default inserts an IMG HTML tag. The key_template and value_template are the templates used to form the keys and values of the associative array that is returned. They use the following macros, which expand:
This function behaves like the module_list->generate_list() method, except that it produces a single string instead of an array.
Returns the text name of a module (MODULE_NAME) from the module's class, which is passed as the module parameter.
Creates a notebook object. common_variables are variables that have to be passed with every page reload. options is a bit flag set, which can be composed of the options in the notebook class option flags table. These options are passed connected by bitwise or's (example: NOTEBOOK_COMMON_BAR | NOTEBOOK_STRETCH).
spill_at defines how many tabs should be displayed before a notebook "spills" to the next line of tabs. form optionally defines the name of the form that this notebook is using.
Returns true if this notebook has been previously loaded, or false if this was the first page load.
Returns an array of all variables used by the notebook. This is useful for embedding the notebook in other objects (like another notebook or a wizard).
Returns true if the last action was to cancel the notebook.
Adds a notebook "page" with title as the tab name, variables as the list of all variables that are passed by this page exclusively, and text containing the body of the notebook page. errors and warnings are part of the phpwebtools verification system, and function the same way that the wizard class verification routines function.
Sets the foreground color for this widget in #RRGGBB format.
Sets the background color for this widget in #RRGGBB format.
Sets the button color for this widget in #RRGGBB format.
Sets the line color for this widget in #RRGGBB format.
Sets the text for the Cancel button.
Sets the text for the Submit button.
Sets the text for the Refresh button.
Sets the text for the Revise button.
Sets the number of tabs to display before the notebook widget "spills" them onto the next row.
Sets the notebook to stretch to the screen size.
Sets the notebook to not stretch to the screen size.
This is called to create the sql object. Under normal circumstances, this would not have to be called, since lib/freemed.php (which is included by almost every part of FreeMED) creates the main sql object. database_type can be SQL_MYSQL, SQL_POSTGRES, SQL_ORACLE, or any of the types supported by phpwebtools.
options is an associative array, with the possible options listed in the sql class option table.
Returns an associative array of values from an SQL query. Uses same conventions as mysql_fetch_array().
Returns the id of the last record to be added to a table. It can optionally take the result of the last query and the name of the table, if the id to be retrieved was not the absolute last query performed.
Returns the number of rows in an sql result, or returns 0 if the result is invalid. Uses the same syntax as mysql_num_rows().
Executes an SQL query. Uses the same syntax as mysql_query().
Determines from an sql result whether any data was retrieved or not.
Generates an SQL table definition CREATE TABLE query from the table definition specified in values, which is an associative array with the keys being the column names and the values being their definitions which are specified by SQL__(something) macros.
Optionally, an array of keys can be provided, with the first value becoming the primary key. If keys are not specified, the table is created with the SQL_SERIAL column being the primary key.
Generates a DROP TABLE query for the specified table.
Generates an INSERT query for the specified table. values is an array which can have both associative values (where the key is the sql column name and the value is what is to be inserted), or simply normal array values (where the value is pulled from the global variable with the same name as the column specified). This method automatically sanitizes variables, so no addslashes() commands are needed.
Generates an UPDATE query for the specified table. Has the same syntax as $sql->insert_query(), except that where is used to determine which table is updated. An example of a where value could be array('id' => $id) or array('ptlname' => $last, 'ptfname' => $first).
Generates a SELECT query on the specified table. criteria is passed as a WHERE clause, and fields, if specified, is an array of the column names or column clauses that should be returned. If fields is not specified, all columns will be returned. This does not currently handle multiple table queries, joins, etc.
Returns an array of all distinct values of the specified field in the specified table.
Returns an associative array of values from the specified table, with the key being defined by key and the value being defined by value. These can be specified as either column names or as format strings, where the column names are encased by ##'s (for example: "##ptlname##, ##ptfname##"). Optionally, clause can be specified to further qualify or order the query (for example: "WHERE ptlname LIKE 'B%'' ORDER BY ptlname,ptfname").
Creates a wiard object. common_variables are variables that have to be passed with every page reload.
Returns true if this wizard has been previously loaded, or false if this was the first page load.
Returns an array of all variables used by the wizard. This is useful for embedding the wizard in other objects (like another wizard or a notebook).
Returns true if the last action was to cancel the wizard.
Adds a wizard "page" with title as the tab name, variables as the list of all variables that are passed by this page exclusively, and text containing the body of the wizard page. errors are part of the phpwebtools verification system, and function the same way that the notebook class verification routines function.
Sets the foreground color for this widget in #RRGGBB format.
Sets the background color for this widget in #RRGGBB format.
Sets the button color for this widget in #RRGGBB format.
Sets the line color for this widget in #RRGGBB format.
Sets the text for the Cancel button.
Sets the text for the Previous button.
Sets the text for the Finish button.
Sets the text for the Refresh button.
Sets the text for the Revise button.
Sets the width of the wizard (in percentage or pixel size).