<?PHP
function check_sound(){
global $check_sound_tack;
if (isset($check_sound_tack)){} else{
echo'<script type="text/javascript"> pochta_sound();</script>';
$check_sound_tack=true;
}
}
$count = mysql_num_rows(query
("SELECT * FROM `pochta` WHERE `komu_id` = '{$user['id']}' AND `status` = '1' AND `save` = '0'")); if ($count) {
$pochta = mysql_query("SELECT * FROM `pochta` WHERE `komu_id` = '{$user['id']}' AND `status` = '1' AND `save` = '0' ORDER BY `time` DESC LIMIT 1");
?>
<style type="text/css">
#hnp_author span {
display: none
}
.h_newpm {
position: fixed;
left: 75%;
width: 25%;
height: 110px;
bottom: 7px;
background: rgba(0, 0, 0, 0.7);
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
-moz-border-radius-bottomright: 10px;
-webkit-border-bottom-left-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
-moz-background-clip: border;
-moz-background-origin: 10px;
-moz-background-inline-policy: continuous;
height: 100px;
}
.h_npin {
padding: 14px;
padding-top: 10px
}
.h_nptitle {
color: #FFF;
font-size: 13px;
font-weight: bold;
padding-bottom: 12px
}
.h_npimg {
width: 57px;
height: 57px;
overflow: hidden;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.h_npimg img {
width: 100%;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.h_npl {
position: absolute;
left: 13px;
top: 38px;
z-index: 3;
width: 70px
}
.h_npr {
position: absolute;
left: 84px;
top: 38px;
z-index: 3;
color: #FFF;
font-size: 13px;
padding-right: 14px
}
.h_npr #hnp_text, .h_npr #hnp_text:hover {
display: block;
text-decoration: none;
color: #FFF
}
.h_newpm:hover .h_del {
display: inline-block;
}
.h_del {
position: absolute;
display: none;
top: 12px;
right: 12px;
z-index: 3;
cursor: pointer;
background: url('https://yraaa.ru/634294/del023.png') 0px 0px;
width: 18px;
height: 18px
}
.h_del:hover {
background-position: 0px 18px
}
.h_nover {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
</style>
<?
?>
<?
$us = get_user($row['kto_id']);
$photo = mysql_fetch_array(query
("SELECT * FROM `alb_photo` WHERE `id_user` = '{$row['kto_id']}' AND `status` = '1' LIMIT 1")); $ava = '/album/photo/' . $photo['file'];
} else {
$ava = '/style/1/icon/no_ava.gif';
}
?>
<div class="h_newpm">
<div class="h_npin"><a class="h_nover" href="/mail/mess.php?id=<?= $row['id'] ?>"></a>
<div class="h_nptitle">
Новое сообщение
</div>
<div class="h_del"></div>
<div class="h_npl">
<div class="h_npimg">
<a href="#" id="hnp_avatar"></a>
<img src="<?= $ava ?>">
</div>
</div>
<div class="h_npr">
<a href="/id<?= $row['kto_id'] ?>" id="hnp_author">
<?= $us['login'] ?>
</a>
<a id="hnp_text" href="/mail/mess.php?id=<?= $row['id'] ?>">
<?
if (count($row['msg']) > 20
) else
echo $row['msg'];
?>
</a>
</div>
</div>
</div>
<?
check_sound();
}
}