View file other/new_act.php

File size: 876B
<?php
require_once '../system/xcms_core.php';
if($user){
	$new_mail=$db->query("select `id` from `mail` where `komu`='$user[id]' and `status`='1'")->rowCount();
	$new_notc=$db->query("select `id` from `notice` where `to`='$user[id]' and `status`='1'")->rowCount();
	if($_COOKIE['style']=='web'){
		if($new_mail)echo'<script type="text/javascript" src="other/notice_mail.js"></script>';
		if($new_notc)echo'<script type="text/javascript" src="other/notice.js"></script>';
		echo'<div id="growl"></div>';
	}else{
		if($new_mail)echo'<div class="menu" style="text-align:center;"><b><a href="/dialog" style="display:block;">Новые сообщения: +'.$new_mail.'</a></b></div>';
		if($new_notc)echo'<div class="menu" style="text-align:center;"><b><a href="/notice" style="display:block;">Новые оповещения: +'.$new_notc.'</a></b></div>';
	}
}
?>