File size: 1.25Kb
<?php
require_once('../wu_init.php');
if (!wu_token()) { exit('wu-error'); }
if (!USER_LOGGED) { exit('wu-error'); }
include('wu_checkadmin.php');
include('../wu-functions/wu_functions.php');
if(isset($_POST['usr'])){
if(!empty($_POST['usr'])){
$usr = intval($_POST['usr']);
$qr = mysqli_query($connect_db, "SELECT id,msg,st,dt FROM ".DB_PREFIX."_notif WHERE usr = '$usr' ORDER BY id DESC");
if (mysqli_num_rows($qr) > 0) {
while($row = mysqli_fetch_assoc($qr)) {
$st = $row['st'];
?>
<div class="fulln" id="notif_<?php echo $row['id']; ?>">
<span class="alert-notice"><?php echo wudatenorm($row['dt']); ?> <i class="icon-remove alert-notice-i" onclick="i_n_del('<?php echo $row['id']; ?>');"></i></span>
<div class="alert alert-<?php if($st == 0) { echo 'danger'; } if($st == 1) { echo 'success'; } if($st == 2) { echo 'info'; } if($st == 3) { echo 'success'; } ?> fade in block-inner">
<i class="icon-<?php if($st == 0) { echo 'warning'; } if($st == 1) { echo 'checkmark3'; } if($st == 2) { echo 'info'; } if($st == 3) { echo 'plus'; } ?>"></i> <?php echo $row['msg']; ?>
</div>
</div>
<?php }
} else { echo '<div class="alert alert-info fade in"><i class="icon-info"></i> Уведомлений нет</div>'; }
} else { exit('wu-error'); }
} else { exit('wu-error'); }
?>