sibtracker/system/modules/pm_alert.php
2019-05-18 13:46:03 +08:00

29 lines
2.0 KiB
PHP

<?php
if(!defined('DATALIFEENGINE')){die("Hacking attempt!");}
$mp = 0;
$row = $db->query( "SELECT pm.subj, pm.text, pm.user_from, users.name, users.foto FROM " . PREFIX . "_pm as pm, " . PREFIX . "_users as users WHERE pm.user_from=users.name AND pm.user = '$member_id[user_id]' AND pm.folder = 'inbox' ORDER BY pm.pm_read ASC, pm.date DESC LIMIT 0,1");
while($row = $db->get_row()){
$pm++;
if ($row['foto'] !== "") $foto = "{$config['http_home_url']}uploads/fotos/{$row['foto']}";
else
$foto = "{$config['http_home_url']}templates/{$config['skin']}/images/noavatar.png";
$pm_alert = "<style>
.uContent {margin-bottom:10px; width:250px; padding:7px; background:#000; background:rgba(0,0,0,0.8); -moz-box-shadow: 0 0 6px #000; -webkit-box-shadow: 0 0 6px #000; box-shadow: 0 0 6px #000;}
div.uPm-close {width:18px;height:18px;background:url('/system/skins/images/close-pm.png') no-repeat;}
div.uPm-close:hover {background-position:0px -18px;}
</style>
<div style=\"position:relative;\" id=\"uMp-time-close\">
<div style=\"position:fixed;bottom:5px;right:5px;z-index: 99;\">
<div class=\"uContent\" style=\"display:none;\" id=\"uMp-time\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
<tr><td valign=\"top\" style=\"color:#fff;text-shadow:0px 1px 0px rgba(0, 0, 0, 0.70);\" width=\"100%\"><b>Ïåðñîíàëüíîå ñîîáùåíèå:</b></td>
<td><a href=\"javascript://\" onclick=\"$('#uMp-time-close').delay('100').fadeOut('fast');\"><div style=\"margin-top:-3px;\"><div class=\"uPm-close\"></div></div></a></td></tr>
</table>
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:5px;\">
<tr><td width=\"50px\" valign=\"top\"><img style=\"width:50px;\" src=\"{$foto}\" border=\"0\"></td><td style=\"padding-left:7px;\" valign=\"top\"><div style=\"color:#bbb;\">{$row['user_from']}<br><a style=\"color:#fff;\" href=\"/index.php?do=pm\">{$row['subj']}</a></div></td></tr>
</table>
</div></div></div>
<script type=\"text/javascript\">$('#uMp-time').fadeIn('fast');</script>";
}
?>