Файл: rayb.me/system/header.php
Строк: 48
<?php
require_once H.'system/head.php';
require_once H.'system/func.php';
if($user){
$clp = mysqli_fetch_assoc(DB::Query("SELECT * FROM `clans` WHERE `id` = '".$user['id_clan']."'"));
$new_msg = mysqli_fetch_row(DB::Query("SELECT COUNT(*) FROM `mail` WHERE `out` = '".$uid."' AND `online` > '0' LIMIT 1"));
$mail_msg = DB::result(DB::Query("SELECT COUNT(*) FROM `mail` where `out` = '".$uid."' AND `online` > '0'"),0);
$cst = ($clp['stat']);
$pms = ($money_updater[0] * $p);
$pcms = (($pms * $cst) / 100);
$panel_money_sek = text($pms + $pcms);
DB::Query("UPDATE `users` SET `dohod` = '".$panel_money_sek."' WHERE `id` = '$uid'");
?>
<table style="width:100%;" cellspacing="0" cellpadding="0">
<tbody><tr>
<td style="padding:0 1px 0 0;">
<a class="btnl" href="/">
<img class="fl" width="36" height="36" alt="обн" src="/img/refresh_white2.png">
<img src="/img/money_36.png" class="fr" width="36" height="36" alt="$">
<div class="fr" style="margin-right: 4px; text-align:right;">
<div style="padding-top: 4px; line-height: 0.8em;color:#FFFFFF;"><?= n_f($user['gold'])?></div>
<div class="small" style="line-height: 1em; color: #FFCF54;"><span><?= n_f($panel_money_sek)?></span> в сек</div>
</div>
<div class="cb"></div>
</a>
</td>
<td style="width: 52px;">
<a class="btnl" href="/mail/">
<img src="/img/mail_white.png" alt="почта" width="36" height="36" class="fr">
<? if($new_msg[0] > '0') {
?> <div style="position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"><span style="width: 40px;height: 40px; line-height: 40px; background: red; margin: 1em; border-radius: 50%; text-align: center;"> <?=$mail_msg?> </span></div> <?
}
?>
<div class="cb"></div>
</a>
</td>
</tr>
</tbody></table>
<?
}
if (isset($_SESSION['msg'])) {
echo msg($_SESSION['msg']);
unset($_SESSION['msg']);
}