diff --git a/module/common/model.php b/module/common/model.php index 88408206b5..c8559abf9b 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -3493,6 +3493,21 @@ eof; echo $isMobile ? html::a($link, $label, '', "class='$className' data-app={$app->tab}") : html::a($link, $label, '', "class='$className' data-app={$app->tab}"); } + public static function printMessageBar() + { + global $app, $config; + $app->loadConfig('message'); + if(!$config->message->browser->turnon) return; + + $showCount = $config->message->browser->count; + $unreadCount = $app->dbh->query("SELECT COUNT(1) as count FROM " . TABLE_NOTIFY . " WHERE `objectType` = 'message' AND status != 'read' AND `toList` = ',{$app->user->account},'")->fetch()->count; + $dotStyle = static::getDotStyle($showCount != '0', $unreadCount); + if($unreadCount > 99) $unreadCount = '99+'; + + $fetcher = helper::createLink('message', 'ajaxGetDropMenuForOld'); + foreach($dotStyle as $cssKey => $cssValue) $dotStyle[$cssKey] = $cssKey . ':' . $cssValue; + } + /** * Print top bar. * diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index 8f03bd4d6c..505f63082e 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -21,6 +21,7 @@ include 'chosen.html.php';