File/includes/mambofunc.php

Description
Classes
Class Description
 class mosEmpty
Functions
ampReplace (line 68)

Replaces & with & for xhtml compliance

Needed to handle unicode conflicts due to unicode conflicts Deprecated - simply code the line below

void ampReplace ( $text)
  • $text
html_entity_decode (line 448)

html_entity_decode function for backward compatability in PHP

void html_entity_decode (string $string, [string $opt = ENT_COMPAT])
  • string $string
  • string $opt
mosArrayToInts (line 108)

Function to convert array to integer values

Deprecated - not used within Mambo

void mosArrayToInts ( &$array, [ $default = null])
  • &$array
  • $default
mosBindArrayToObject (line 141)

Copy the named array content into the object as properties

only existing properties of object are filled. when undefined in hash, properties wont be deleted

void mosBindArrayToObject (array $array, obj &$obj, [string $ignore = ''], [boolean $prefix = NULL], [ $checkSlashes = true])
  • array $array: the input array
  • obj &$obj: byref the object to fill of any class
  • string $ignore
  • boolean $prefix
  • $checkSlashes
mosChmod (line 98)

Chmods files and directories recursively to mos global permissions. Available from 4.5.2 up.

  • return: succeeded FALSE=one or more chmods failed
TRUE=all mosChmod (path $path, filemode 1, dirmode 2)
  • filemode 1: Integer value to chmod files. NULL = dont chmod files.
  • dirmode 2: Integer value to chmod directories. NULL = dont chmod directories.
  • path $path: The starting file or directory (no trailing slash)
mosChmodRecursive (line 85)

Chmods files and directories recursively to given permissions. Available from 4.5.2 up.

  • return: succeeded FALSE=one or more chmods failed
TRUE=all mosChmodRecursive (path $path, [filemode $filemode = NULL], [dirmode $dirmode = NULL])
  • path $path: The starting file or directory (no trailing slash)
  • filemode $filemode: Integer value to chmod files. NULL = dont chmod files.
  • dirmode $dirmode: Integer value to chmod directories. NULL = dont chmod directories.
mosCompressID (line 393)
void mosCompressID ( $ID)
  • $ID
mosCreateGUID (line 385)
void mosCreateGUID ()
mosCreateMail (line 426)

Create mail object

  • return: object
mail &mosCreateMail ( $from,  $fromname,  $subject,  $body)
  • $from
  • $fromname
  • $subject
  • $body
mosCurrentDate (line 335)

Returns current date according to current local and time offset

  • return: date
current mosCurrentDate ([string $format = ""])
  • string $format: format optional format for strftime
mosExpandID (line 397)
void mosExpandID ( $ID)
  • $ID
mosFormatDate (line 283)

Returns formated date according to current local and adds time offset

  • return: date
formated mosFormatDate (string $date, [string $format = ""], [offset $offset = ""], [ $jalali = 1])
  • string $date: date in datetime format
  • string $format: format optional format for strftime
  • offset $offset: time offset if different than global one
  • $jalali
mosGetBrowser (line 186)

Checks the user agent string against known browsers

void mosGetBrowser ( $agent)
  • $agent
mosGetOS (line 224)

Checks the user agent string against known operating systems

void mosGetOS ( $agent)
  • $agent
mosIsRTL (line 487)
void mosIsRTL ()
mosMail (line 415)

Mail function (uses phpMailer)

void mosMail (string $from, string $fromname, string/array $recipient, string $subject, string $body, [boolean $mode = 0], [string/array $cc = NULL], [string/array $bcc = NULL], [string/array $attachment = NULL], [string/array $replyto = NULL], [string/array $replytoname = NULL])
  • string $from: From e-mail address
  • string $fromname: From name
  • string/array $recipient: Recipient e-mail address(es)
  • string $subject: E-mail subject
  • string $body: Message body
  • boolean $mode: false = plain text, true = HTML
  • string/array $cc: CC e-mail address(es)
  • string/array $bcc: BCC e-mail address(es)
  • string/array $attachment: Attachment file name(s)
  • string/array $replyto: Reply-to e-mail address
  • string/array $replytoname: Reply-to name
mosMakeHtmlSafe (line 247)

Makes a variable safe to display in forms

Object parameters that are non-string, array, object or start with underscore will be converted

void mosMakeHtmlSafe (object An &$mixed, [int $quote_style = ENT_QUOTES], [string|array $exclude_keys = ''])
  • object An &$mixed: object to be parsed
  • int $quote_style: The optional quote style for the htmlspecialchars function
  • string|array $exclude_keys: An optional single field name or array of field names not to be parsed (eg, for a textarea)
mosMakePassword (line 436)

Random password generator

password mosMakePassword ()
mosMenuCheck (line 271)

Checks whether a menu option is within the users access level

  • return: True if the visitor's group at least equal to the menu access
boolean mosMenuCheck (int $Itemid, string $menu_option, int $task, database $gid)
  • int $Itemid: Item id number
  • string $menu_option: The menu option
  • int $task: The users group ID number
  • database $gid: A database connector object
mosNotAuth (line 53)

Displays a not authorised message

If the user is not logged in then an addition message is displayed.

void mosNotAuth ()
mosParseParams (line 473)
  • return: Deprecated - use the code within this function instead - not used in Mambo
string mosParseParams (string $txt)
  • string $txt
mosPathName (line 178)

Function to strip additional / or \ in a path name

void mosPathName (string $p_path, [boolean $p_addtrailingslash = true])
  • string $p_path: The path
  • boolean $p_addtrailingslash: Add trailing slash
mosPathWay (line 43)
void mosPathWay ()
mosReadDirectory (line 153)

Utility function to read the files in a directory

void mosReadDirectory (string $path, [string $filter = '.'], [boolean $recurse = false], [boolean $fullpath = false])
  • string $path: The file system path
  • string $filter: A filter for the names
  • boolean $recurse: Recurse search into sub-directories
  • boolean $fullpath: True if to prepend the full path to the file name
mosRedirect (line 169)

Utility function redirect the browser location to another url

Can optionally provide a message.

void mosRedirect (string $url, [string $msg = ''])
  • string $url: The file system path
  • string $msg: A filter for the names
mosSendAdminMail (line 23)

Sends mail to admin

Deprecated - not used in Mambo (code copied into weblinks.php) Could do with a better facility that works out who to send it to as well Note the "email" parameter was not used in the earlier version

void mosSendAdminMail ( $adminName,  $adminEmail,  $email,  $type,  $title,  $author)
  • $adminName
  • $adminEmail
  • $email
  • $type
  • $title
  • $author
mosStripslashes (line 127)

Strip slashes from strings or arrays of strings

void mosStripslashes (value &$value)
  • value &$value: the input string or array
mosToolTip (line 351)

Utility function to provide ToolTips

  • return: code for ToolTip
HTML mosToolTip (string $tooltip, [string $title = ''], [ $width = ''], [ $image = 'tooltip.png'], [ $text = ''], [ $href = '#'])
  • string $tooltip: ToolTip text
  • string $title: Box title
  • $width
  • $image
  • $text
  • $href
mosWarning (line 378)

Utility function to provide Warning Icons

  • return: code for Warning
HTML mosWarning (string $warning, [string $title = null])
  • string $warning: Warning text
  • string $title: Box title
SortArrayObjects (line 13)

Sorts an Array of objects

sort_direction [1 = Ascending] [-1 = Descending]

void SortArrayObjects ( &$a,  $k, [ $sort_direction = 1])
  • &$a
  • $k
  • $sort_direction
utf8_substr (line 495)
void utf8_substr ( $str,  $start)
  • $str
  • $start

Documentation generated on Mon, 05 May 2008 16:20:58 +0400 by phpDocumentor 1.4.0