Source for file common.php
Documentation is available at common.php
* @author Mambo Foundation Inc see README.php
* @copyright Mambo Foundation Inc.
* See COPYRIGHT.php for copyright notices and details.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see
* Mambo is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
require_once('../includes/phpgettext/phpgettext.class.php');
* Utility function to return a value from a named array or a specified default
define( "_MOS_NOTRIM", 0x0001 );
define( "_MOS_ALLOWHTML", 0x0002 );
function mosGetParam( &$arr, $name, $def=
null, $mask=
0 ) {
if (isset
( $arr[$name] )) {
$arr[$name] =
trim( $arr[$name] );
$salt =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for ($i =
0; $i <
$length; $i++
)
$makepass .=
$salt[mt_rand(0,$len -
1)];
* Chmods files and directories recursivel to given permissions
* @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
if ($file !=
'.' &&
$file !=
'..') {
$fullpath =
$path.
'/'.
$file;
if (!@chmod($fullpath, $filemode))
if (!@chmod($path, $dirmode))
$ret =
@chmod($path, $filemode);
Documentation generated on Mon, 05 May 2008 16:18:01 +0400 by phpDocumentor 1.4.0