function warnAdmin() { global $adminEmail, $mambelfishWarnedAdmin; $privateWarning = false; if (!$mambelfishWarnedAdmin) { $bt = debug_backtrace(); if (count($bt) >= 2) { $subject = "Deprecated use of Mambelfish Translation"; $content = "Deprecated use of Mambelfish. Request URL : " . $_SERVER['REQUEST_URI'] . "\n\n"; $content .= "Please contact the author of this component/module/mambot with the details in this message.\n\n"; $content .= "In the meantime the following function reference can be commented out and translation should not be affected.\n"; $content .= "File : " . basename(dirname($bt[1]["file"])) . "\\" . basename($bt[1]["file"]) . "\n"; $content .= "Line : " . $bt[1]["line"] . "\n"; $content .= "Function : " . $bt[1]["function"] . "\n\n"; if ($privateWarning) { global $my; $db =& JFactory::getDBO(); require_once mosMainFrame::getBasePath() . '/components/com_messages/messages.class.php'; $query = "SELECT id" . "\n FROM #__users" . "\n WHERE sendEmail = 1"; $db->setQuery($query); $users = $db->loadResultArray(false); foreach ($users as $user_id) { $msg = new mosMessage($db); // send message from admin $msg->send($user_id, $user_id, $subject, $content); } } else { $content = str_replace("\n", "<br/>", $content); echo "{$content}"; } } } $mambelfishWarnedAdmin = true; }
* * @version $Id: mod_events_latest.php 372 2007-01-20 20:16:39Z tstahl $ * @package Events * @subpackage Module Latest Events * @copyright Copyright (C) 2006-2007 JEvents Project Group * @copyright Copyright (C) 2000 - 2003 Dave McDonnell * @licence http://www.gnu.org/copyleft/gpl.html * @link http://joomlacode.org/gf/project/jevents */ /** * Library for Latest Events Module **/ // following line is to prevent direct access to this script via the url defined('_VALID_MOS') or die('Restricted access'); // setup for all required function and classes $file = mosMainFrame::getBasePath() . 'components/com_events/includes/modutils.php'; if (file_exists($file)) { include_once $file; } else { die("Events Latest\n<br />This module needs the Events component"); } // load language constants EventsHelper::loadLanguage('modlatest'); if (!defined('EVENTS_LATEST_MODULE')) { define('EVENTS_LATEST_MODULE', 1); function JEventsLatestcmpByStartTime(&$a, &$b) { // this custom sort compare function compares the start times of events that are referenced by the a & b vars if ($a->publish_up == $b->publish_up) { return 0; }