Procedural File: weblib.php
Source Location: /weblib.php
Page Details:
Extra support functions that make it a bit easier to handle various HTML/web operations and gives access to different page and/or script elements and variables.
full_me [line 127]
Get the complete URL of the current script including protocol and server name.
Tags:
get_referer [line 274]
Returns the HTTP_REFERER without the query parameters.
Tags:
me [line 81]
Get the current script URI, include the query.
Tags:
notify [line 115]
void notify(
$message, [ $color = "red"], [ $align = "center"])
|
|
Sends a notification message to the browser. Parameters: $message - The message. $color - The color. $align - An alignment setting.
Parameters
nvl [line 23]
any nvl(
&$var, [any $default = ""], any $var)
|
|
Returns the variable if defined, a default value if not.
Tags:
Parameters
any |
$var |
- Reference to the variable to test |
any |
$default |
- Value to return if the variable is not set |
|
&$var |
|
print_footer [line 223]
Ends the current page. First looks for a $CFG->footer.php
file and includes it if found, otherwise output a default set of closing tags.
print_header [line 161]
void print_header(
[string $title = ""], [string $heading = ""], [string $navigation = ""], [string $focus = ""], [string $meta = ""], [boolean $cache = true], [boolean $button = " "], [string $menu = ""])
|
|
Starts a new page. First looks for a file named
. If found, the function includes it. If not found, the function outputs a generic HTML header.
Parameters
string |
$title |
Title of the page. |
string |
$heading |
Optional heading for the page. |
string |
$navigation |
Optional navigation links/breadcrumb. |
string |
$focus |
Optional field to focus on (using JavaScript). |
string |
$meta |
Optional additional meta tags. |
boolean |
$cache |
Flag to enable/disable browser caching |
boolean |
$button |
Optional button to create. |
string |
$menu |
Optional menu (HTML) to add to page. |
redirect [line 245]
void redirect(
string $url, [string $message = ""], [integer $delay = "0"])
|
|
Outputs an HTML meta refresh tag to send the visitor to a new URL.
Parameters
string |
$url |
The new URL. |
string |
$message |
An optional message to be displayed. |
integer |
$delay |
Number of seconds to show message. |
s [line 68]
Return an empty string or quotes special characters like "<" and ">"
Tags:
Parameters
string |
$var |
- the string to process |
stripslashes_safe [line 38]
string stripslashes_safe(
string $string)
|
|
Improved version of the stripslashes() function. The original strips out all backslashes, so strings like c:temp
becomes c:temp
.
Tags:
Parameters
string |
$string |
The string to strip. |
strip_query [line 54]
string strip_query(
string $url)
|
|
Removes the query parameters from a URL
Tags:
Parameters
string |
$url |
- the URL to test |
|