[ Index ]

PHP Cross Reference of Mambo 4.6.5

[ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/includes/ -> mambofunc.php (summary)

(no description)

Author: Mambo Foundation Inc see README.php
Copyright: (C) 2000 - 2009 Mambo Foundation Inc.
License: GNU/GPL Version 2, see LICENSE.php
File Size: 529 lines (16 kb)
Included or required: 2 times
Referenced: 3 times
Includes or requires: 2 files
 includes/agent_os.php
 includes/agent_browser.php

Defines 1 class

mosEmpty:: (9 methods):
  def()
  get()
  mosIsRTL()
  mosPath()
  mos_session_start()
  mosFormId()
  mosValidFormId()
  e()
  pr()

Defines 9 functions


Class: mosEmpty  - X-Ref

def( $key, $value='' )   X-Ref
No description

get( $key, $default='' )   X-Ref
No description

mosIsRTL()   X-Ref
No description

mosPath($path, $stripTrailing=false)   X-Ref
Utility path directory separator sanitizer

param: string the path to sanitize
param: boolean false = don't strip trailing slashes true = strip trailing slashes
return: sanitized path

mos_session_start()   X-Ref
Replacement for session_start


mosFormId($option='', $task='', $my='')   X-Ref
Get a form hash


mosValidFormId($option='', $task='', $my='')   X-Ref
Check a form hash


e($string)   X-Ref
Utility debugging shortcut

param: string echoed with a trailing <br /> tag

pr($list)   X-Ref
Utility debugging shortcut

param: list print_r(list) enclosed by <pre></pre> tags

Functions that are not part of a class:

SortArrayObjects( &$a, $k, $sort_direction=1 )   X-Ref
Sorts an Array of objects
sort_direction [1 = Ascending] [-1 = Descending]


mosSendAdminMail( $adminName, $adminEmail, $email, $type, $title, $author )   X-Ref
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


mosPathWay()   X-Ref
No description

mosNotAuth()   X-Ref
Displays a not authorised message

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

ampReplace( $text )   X-Ref
Replaces &amp; with & for xhtml compliance

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

mosChmodRecursive($path, $filemode=NULL, $dirmode=NULL)   X-Ref
Chmods files and directories recursively to given permissions. Available from 4.5.2 up.

param: path The starting file or directory (no trailing slash)
param: filemode Integer value to chmod files. NULL = dont chmod files.
param: dirmode Integer value to chmod directories. NULL = dont chmod directories.
return: TRUE=all succeeded FALSE=one or more chmods failed

mosChmod($path)   X-Ref
Chmods files and directories recursively to mos global permissions. Available from 4.5.2 up.

param: path The starting file or directory (no trailing slash)
param: filemode Integer value to chmod files. NULL = dont chmod files.
param: dirmode Integer value to chmod directories. NULL = dont chmod directories.
return: TRUE=all succeeded FALSE=one or more chmods failed

mosArrayToInts( &$array, $default=null )   X-Ref
Function to convert array to integer values
Deprecated - not used within Mambo


mosStripslashes(&$value)   X-Ref
Strip slashes from strings or arrays of strings

param: value the input string or array

mosBindArrayToObject( $array, &$obj, $ignore='', $prefix=NULL, $checkSlashes=true )   X-Ref
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

param: array the input array
param: obj byref the object to fill of any class
param: string
param: boolean

mosReadDirectory( $path, $filter='.', $recurse=false, $fullpath=false )   X-Ref
Utility function to read the files in a directory

param: string The file system path
param: string A filter for the names
param: boolean Recurse search into sub-directories
param: boolean True if to prepend the full path to the file name

mosRedirect( $url, $msg='' )   X-Ref
Utility function redirect the browser location to another url

Can optionally provide a message.
param: string The file system path
param: string A filter for the names

mosPathName($p_path,$p_addtrailingslash = true)   X-Ref
Function to strip additional / or \ in a path name

param: string The path
param: boolean Add trailing slash

mosGetBrowser( $agent )   X-Ref
Checks the user agent string against known browsers


mosGetOS( $agent )   X-Ref
Checks the user agent string against known operating systems


mosMakeHtmlSafe( &$mixed, $quote_style=ENT_QUOTES, $exclude_keys='' )   X-Ref
Makes a variable safe to display in forms

Object parameters that are non-string, array, object or start with underscore
will be converted
param: object An object to be parsed
param: int The optional quote style for the htmlspecialchars function
param: string|array An optional single field name or array of field names not

mosMenuCheck( $Itemid, $menu_option, $task, $gid )   X-Ref
Checks whether a menu option is within the users access level

param: int Item id number
param: string The menu option
param: int The users group ID number
param: database A database connector object
return: boolean True if the visitor's group at least equal to the menu access

mosFormatDate( $date, $format="", $offset="" )   X-Ref
Returns formated date according to current local and adds time offset

returns: formated date
param: string date in datetime format
param: string format optional format for strftime
param: offset time offset if different than global one

mosCurrentDate( $format="" )   X-Ref
Returns current date according to current local and time offset

returns: current date
param: string format optional format for strftime

mosToolTip( $tooltip, $title='', $width='', $image='tooltip.png', $text='', $href=')   X-Ref
Utility function to provide ToolTips

returns: HTML code for ToolTip
param: string ToolTip text
param: string Box title

mosWarning($warning, $title=null)   X-Ref
Utility function to provide Warning Icons

returns: HTML code for Warning
param: string Warning text
param: string Box title

mosCreateGUID()   X-Ref
No description

mosCompressID( $ID )   X-Ref
No description

mosExpandID( $ID )   X-Ref
No description

mosMail($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=NULL, $bcc=NULL, $attachment=NULL, $replyto=NULL, $replytoname=NULL )   X-Ref
Mail function (uses phpMailer)

param: string From e-mail address
param: string From name
param: string/array Recipient e-mail address(es)
param: string E-mail subject
param: string Message body
param: boolean false = plain text, true = HTML
param: string/array CC e-mail address(es)
param: string/array BCC e-mail address(es)
param: string/array Attachment file name(s)
param: string/array Reply-to e-mail address
param: string/array Reply-to name

mosCreateMail($from, $fromname, $subject, $body)   X-Ref
Create mail object

return: mail object

mosMakePassword()   X-Ref
Random password generator

return: password

html_entity_decode($string, $opt = ENT_COMPAT)   X-Ref
html_entity_decode function for backward compatability in PHP

param: string
param: string

mosParseParams( $txt )   X-Ref

param: string
return: string