default
[ class tree: default ] [ index: default ] [ all elements ]

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]

string full_me( )

Get the complete URL of the current script including protocol and server name.



Tags:

return:  The current URL.


[ Top ]



get_referer [line 274]

string get_referer( )

Returns the HTTP_REFERER without the query parameters.



Tags:

return:  The referer URL.


[ Top ]



me [line 81]

string me( )

Get the current script URI, include the query.



Tags:

return:  The URI.


[ Top ]



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

   $message  
   $color  
   $align  
[ Top ]



nvl [line 23]

any nvl( &$var, [any $default = ""], any $var)

Returns the variable if defined, a default value if not.



Tags:

return:  The variable or default value.


Parameters

any   $var   - Reference to the variable to test
any   $default   - Value to return if the variable is not set
   &$var  
[ Top ]



print_footer [line 223]

void print_footer( )

Ends the current page.

First looks for a

  1. $CFG->footer.php
file and includes it if found, otherwise output a default set of closing tags.




[ Top ]



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

  1. $CFG->dirroot/header.php
. 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.
[ Top ]



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.
[ Top ]



s [line 68]

string s( string $var)

Return an empty string or quotes special characters like "<" and ">"



Tags:

return:  Empty string or processed string.


Parameters

string   $var   - the string to process
[ Top ]



stripslashes_safe [line 38]

string stripslashes_safe( string $string)

Improved version of the stripslashes() function.

The original strips out all backslashes, so strings like

  1. c:temp
becomes
  1. c:temp
.




Tags:

return:  The stripped string.


Parameters

string   $string   The string to strip.
[ Top ]



strip_query [line 54]

string strip_query( string $url)

Removes the query parameters from a URL



Tags:

return:  The URL with the query removed.


Parameters

string   $url   - the URL to test
[ Top ]



Documentation generated on Wed, 15 Nov 2006 08:48:09 -0600 by phpDocumentor 1.3.1