| 19 |
$from = mamboCore::get('mosConfig_mailfrom'); |
$from = mamboCore::get('mosConfig_mailfrom'); |
| 20 |
$fromname = mamboCore::get('mosConfig_fromname'); |
$fromname = mamboCore::get('mosConfig_fromname'); |
| 21 |
$subject = sprintf(T_("User Submitted '%s'"), $type); |
$subject = sprintf(T_("User Submitted '%s'"), $type); |
| 22 |
$message = sprintf(T_('Hello %s,\n\n\nA user submitted %s:\n [ %s ]\n has been just been submitted by user:\n [ %s ]\n' |
$message = T_("Hello %s,\n\n |
| 23 |
.' for %.\n\n\n\n' |
A user submitted %s:\n[ %s ]\n |
| 24 |
.'Please go to %s/administrator to view and approve this %s.\n\n' |
has been just been submitted by user:\n[ %s ]\n\n |
| 25 |
.'Please do not respond to this message as it is automatically generated and is for information purposes only\n'),$adminName ,$type, $title, $author, $mosConfig_live_site, $mosConfig_live_site, $type); |
for %\n\nPlease go to %s/administrator to view and approve this %s\n\n |
| 26 |
|
Please do not respond to this message as it is automatically generated and is for information purposes only."); |
| 27 |
|
$message = sprintf($message, $adminName ,$type, $title, $author, $mosConfig_live_site, $mosConfig_live_site, $type); |
| 28 |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpmailer/class.phpmailer.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpmailer/class.phpmailer.php'); |
| 29 |
$mail =& new mosMailer ($from, $fromname, $subject, $message); |
$mail =& new mosMailer ($from, $fromname, $subject, $message); |
| 30 |
return $mail->mosMail($adminEmail); |
return $mail->mosMail($adminEmail); |
| 35 |
* Needed by templates |
* Needed by templates |
| 36 |
*/ |
*/ |
| 37 |
function mosPathWay() { |
function mosPathWay() { |
| 38 |
$pathway = mosPathway::getInstance(); |
$pathway =& mosPathway::getInstance(); |
| 39 |
echo $pathway->makePathway(); |
echo $pathway->makePathway(); |
| 40 |
} |
} |
| 41 |
|
|
| 72 |
*/ |
*/ |
| 73 |
function mosChmodRecursive($path, $filemode=NULL, $dirmode=NULL) |
function mosChmodRecursive($path, $filemode=NULL, $dirmode=NULL) |
| 74 |
{ |
{ |
| 75 |
$fileman = mosFileManager::getInstance(); |
$fileman =& mosFileManager::getInstance(); |
| 76 |
return $fileman->mosChmodRecursive($path, $filemode, $dirmode); |
return $fileman->mosChmodRecursive($path, $filemode, $dirmode); |
| 77 |
} |
} |
| 78 |
|
|
| 85 |
*/ |
*/ |
| 86 |
function mosChmod($path) |
function mosChmod($path) |
| 87 |
{ |
{ |
| 88 |
$fileman = mosFileManager::getInstance(); |
$fileman =& mosFileManager::getInstance(); |
| 89 |
return $fileman->mosChmod($path); |
return $fileman->mosChmod($path); |
| 90 |
} // mosChmod |
} // mosChmod |
| 91 |
|
|
| 114 |
*/ |
*/ |
| 115 |
function mosStripslashes(&$value) |
function mosStripslashes(&$value) |
| 116 |
{ |
{ |
| 117 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 118 |
return $database->mosStripslashes($value); |
return $database->mosStripslashes($value); |
| 119 |
} |
} |
| 120 |
|
|
| 127 |
* @param boolean |
* @param boolean |
| 128 |
*/ |
*/ |
| 129 |
function mosBindArrayToObject( $array, &$obj, $ignore='', $prefix=NULL, $checkSlashes=true ) { |
function mosBindArrayToObject( $array, &$obj, $ignore='', $prefix=NULL, $checkSlashes=true ) { |
| 130 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 131 |
return $database->mosBindArrayToOBject($array, $obj, $ignore='', $prefix=NULL, $checkSlashes=true); |
return $database->mosBindArrayToOBject($array, $obj, $ignore='', $prefix=NULL, $checkSlashes=true); |
| 132 |
} |
} |
| 133 |
|
|
| 141 |
function mosReadDirectory( $path, $filter='.', $recurse=false, $fullpath=false ) { |
function mosReadDirectory( $path, $filter='.', $recurse=false, $fullpath=false ) { |
| 142 |
if (@is_dir($path)) { |
if (@is_dir($path)) { |
| 143 |
$dir =& new mosDirectory($path); |
$dir =& new mosDirectory($path); |
| 144 |
$arr = $dir->listFiles ($filter, $type='both', $recurse, $fullpath); |
$arr =& $dir->listFiles ($filter, $type='both', $recurse, $fullpath); |
| 145 |
} |
} |
| 146 |
else $arr = array(); |
else $arr = array(); |
| 147 |
return $arr; |
return $arr; |
| 164 |
* @param boolean Add trailing slash |
* @param boolean Add trailing slash |
| 165 |
*/ |
*/ |
| 166 |
function mosPathName($p_path,$p_addtrailingslash = true) { |
function mosPathName($p_path,$p_addtrailingslash = true) { |
| 167 |
$fileman = mosFileManager::getInstance(); |
$fileman =& mosFileManager::getInstance(); |
| 168 |
return $fileman->mosPathName($p_path,$p_addtrailingslash); |
return $fileman->mosPathName($p_path,$p_addtrailingslash); |
| 169 |
} |
} |
| 170 |
|
|
| 257 |
* @return boolean True if the visitor's group at least equal to the menu access |
* @return boolean True if the visitor's group at least equal to the menu access |
| 258 |
*/ |
*/ |
| 259 |
function mosMenuCheck( $Itemid, $menu_option, $task, $gid ) { |
function mosMenuCheck( $Itemid, $menu_option, $task, $gid ) { |
| 260 |
$menuhandler = mosMenuHandler::getInstance(); |
$menuhandler =& mosMenuHandler::getInstance(); |
| 261 |
return $menuhandler->menuCheck($Itemid, $menu_option, $task, $gid); |
return $menuhandler->menuCheck($Itemid, $menu_option, $task, $gid); |
| 262 |
} |
} |
| 263 |
|
|
| 274 |
// %Y-%m-%d %H:%M:%S |
// %Y-%m-%d %H:%M:%S |
| 275 |
$format = $core->language['dateformat']; |
$format = $core->language['dateformat']; |
| 276 |
} |
} |
| 277 |
if ( $offset == '' ) { |
if ( !$offset ) { |
| 278 |
$offset = $core->language['offset']; |
$offset = $core->language['offset']; |
| 279 |
} |
} |
| 280 |
if ( $date && ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})", $date, $regs ) ) { |
if ( $date && ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})", $date, $regs ) ) { |
| 290 |
* @returns current date |
* @returns current date |
| 291 |
*/ |
*/ |
| 292 |
function mosCurrentDate( $format="" ) { |
function mosCurrentDate( $format="" ) { |
| 293 |
$core = mamboCore::getMamboCore(); |
$core =& mamboCore::getMamboCore(); |
| 294 |
$offset = $core->language['offset']; |
$offset = $core->language['offset']; |
| 295 |
if ($format=="") { |
if ($format=="") { |
| 296 |
$format = $format = $core->language['dateformat']; |
$format = $format = $core->language['dateformat']; |
| 382 |
*/ |
*/ |
| 383 |
function mosMakePassword() { |
function mosMakePassword() { |
| 384 |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 385 |
$authenticator = mamboAuthenticator::getInstance(); |
$authenticator =& mamboAuthenticator::getInstance(); |
| 386 |
return $authenticator->mosMakePassword(); |
return $authenticator->mosMakePassword(); |
| 387 |
} |
} |
| 388 |
|
|