CoreFiles by mySites.guru
mod_unread.php30 lines, 1,250 bytes, from Joomla_1.0.13-Stable-Full_Package.zip
Raw History Compare with 1.0.12
md5
332756e87fa21bf5b57cbb2466902bd9
sha1
e3955ab5edbf2b928e7eea6f1594819c673c7fe1
sha256
8da5b17d66228965e0c8cda7d2dde36634c396a7d2515f0a952e9760283510d0
<?php
/**
* @version $Id: mod_unread.php 5028 2006-09-13 18:45:52Z friesengeist $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

$query = "SELECT COUNT(*)"
. "\n FROM #__messages"
. "\n WHERE state = 0"
. "\n AND user_id_to = " . (int) $my->id
;
$database->setQuery( $query );
$unread = $database->loadResult();

if ($unread) {
	echo "<a href=\"index2.php?option=com_messages\" style=\"color: red; text-decoration: none;  font-weight: bold\">$unread <img src=\"images/mail.png\" align=\"middle\" border=\"0\" alt=\"Mail\" /></a>";
} else {
	echo "<a href=\"index2.php?option=com_messages\" style=\"color: black; text-decoration: none;\">$unread <img src=\"images/nomail.png\" align=\"middle\" border=\"0\" alt=\"Mail\" /></a>";
}
?>

The same content is in 3 releases, Joomla 1.0.13 to 1.0.15. See them all, or every version of this file.