| 18 |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
| 19 |
$from = mamboCore::get('mosConfig_mailfrom'); |
$from = mamboCore::get('mosConfig_mailfrom'); |
| 20 |
$fromname = mamboCore::get('mosConfig_fromname'); |
$fromname = mamboCore::get('mosConfig_fromname'); |
| 21 |
$subject = _MAIL_SUB." '$type'"; |
$subject = sprintf(T_("User Submitted '%s'"), $type); |
| 22 |
$message = _MAIL_MSG; |
$message = sprintf(T_('Hello %s,\n\n\nA user submitted %s:\n [ %s ]\n has been just been submitted by user:\n [ %s ]\n' |
| 23 |
eval ("\$message = \"$message\";"); |
.' for %.\n\n\n\n' |
| 24 |
|
.'Please go to %s/administrator to view and approve this %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); |
| 26 |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpmailer/class.phpmailer.php'); |
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpmailer/class.phpmailer.php'); |
| 27 |
$mail =& new mosMailer ($from, $fromname, $subject, $message); |
$mail =& new mosMailer ($from, $fromname, $subject, $message); |
| 28 |
return $mail->mosMail($adminEmail); |
return $mail->mosMail($adminEmail); |
| 45 |
function mosNotAuth() { |
function mosNotAuth() { |
| 46 |
global $my; |
global $my; |
| 47 |
|
|
| 48 |
echo _NOT_AUTH; |
echo T_('You are not authorized to view this resource.'); |
| 49 |
if ($my->id < 1) { |
if ($my->id < 1) { |
| 50 |
echo "<br />" . _DO_LOGIN; |
echo "<br />" . T_('You need to login.'); |
| 51 |
} |
} |
| 52 |
} |
} |
| 53 |
|
|
| 267 |
* @returns formated date |
* @returns formated date |
| 268 |
*/ |
*/ |
| 269 |
function mosFormatDate( $date, $format="", $offset="" ){ |
function mosFormatDate( $date, $format="", $offset="" ){ |
| 270 |
global $mosConfig_offset; |
$core = mamboCore::getMamboCore(); |
| 271 |
if ( $format == '' ) { |
if ( $format == '' ) { |
| 272 |
// %Y-%m-%d %H:%M:%S |
// %Y-%m-%d %H:%M:%S |
| 273 |
$format = _DATE_FORMAT_LC; |
$format = $core->language['dateformat']; |
| 274 |
} |
} |
| 275 |
if ( $offset == '' ) { |
if ( !$offset ) { |
| 276 |
$offset = $mosConfig_offset; |
$offset = $core->language['offset']; |
| 277 |
} |
} |
| 278 |
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 ) ) { |
| 279 |
$date = mktime( $regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1] ); |
$date = mktime( $regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1] ); |
| 288 |
* @returns current date |
* @returns current date |
| 289 |
*/ |
*/ |
| 290 |
function mosCurrentDate( $format="" ) { |
function mosCurrentDate( $format="" ) { |
| 291 |
global $mosConfig_offset; |
$core = mamboCore::getMamboCore(); |
| 292 |
|
$offset = $core->language['offset']; |
| 293 |
if ($format=="") { |
if ($format=="") { |
| 294 |
$format = _DATE_FORMAT_LC; |
$format = $format = $core->language['dateformat']; |
| 295 |
} |
} |
| 296 |
$date = strftime( $format, time() + ($mosConfig_offset*60*60) ); |
$date = utf8_encode(strftime( $format, time() + ($offset*60*60) )); |
| 297 |
return $date; |
return $date; |
| 298 |
} |
} |
| 299 |
|
|
| 330 |
* @param string Box title |
* @param string Box title |
| 331 |
* @returns HTML code for Warning |
* @returns HTML code for Warning |
| 332 |
*/ |
*/ |
| 333 |
function mosWarning($warning, $title='Mambo Warning') { |
function mosWarning($warning, $title=null) { |
| 334 |
global $mosConfig_live_site; |
if (is_null($title)) $title = T_('Mambo Warning'); |
| 335 |
|
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
| 336 |
$tip = "<a href=\"#\" onMouseOver=\"return overlib('" . $warning . "', CAPTION, '$title', BELOW, RIGHT);\" onmouseout=\"return nd();\"><img src=\"" . $mosConfig_live_site . "/includes/js/ThemeOffice/warning.png\" border=\"0\" /></a>"; |
$tip = "<a href=\"#\" onMouseOver=\"return overlib('" . $warning . "', CAPTION, '$title', BELOW, RIGHT);\" onmouseout=\"return nd();\"><img src=\"" . $mosConfig_live_site . "/includes/js/ThemeOffice/warning.png\" border=\"0\" /></a>"; |
| 337 |
return $tip; |
return $tip; |
| 338 |
} |
} |