| Server IP : 103.82.32.14 / Your IP : 216.73.217.121 Web Server : Apache/2.2.32 (Unix) mod_ssl/2.2.32 OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 System : Linux cloud.lonmanhoabinh.com 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : lonmakmf ( 524) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/rubymnik/public_html/admin/ |
Upload File : |
<?php
include '../configchannel.php';
include 'configtotal.php';
if(isset($_POST['thongtininsert']))
{
$dataInsert = array(
'ThongTin' => mysql_real_escape_string($_POST['thongtininsert']),
'NguoiCapNhat' => $_SESSION['login']['id']
);
$idinsert = Insert('ThongTinCapNhat', $dataInsert);
}
else if(isset($_POST['updategiaodien']))
{
$jsonfile = json_encode($_POST);
$data = array(
'GiaoDien' => mysql_real_escape_string($jsonfile)
);
Update('NguoiLam', $data, "`id` = " . $_SESSION['login']['id']);
$_SESSION['login']['GiaoDien'] = $jsonfile;
}
?>
<?php
$thongTinUpdate = SelectAll('ThongTinCapNhat', "SELECT id, ThongTin, NgayCapNhat,NguoiCapNhat, COUNT(ThongTin) as Total FROM `ThongTinCapNhat` WHERE `id` > 0 GROUP BY CONCAT(CONCAT(DATE_FORMAT(NgayCapNhat, '%Y%m%d'), '-',ThongTin), NguoiCapNhat) ORDER BY `NgayCapNhat` DESC LIMIT 10");
while($res = mysqli_fetch_array($thongTinUpdate)) :
$thongNhanSu = mysqli_fetch_assoc(SelectAll('NguoiLam',"SELECT * FROM `NguoiLam` WHERE `id` = " . $res['NguoiCapNhat']));
$second = (time() - strtotime($res['NgayCapNhat'])) / 60 / 60 / 24;
?>
<div class="col-md-12">
<div class="card mb-0 mt-3 border<?php echo $second < 1 ? " border-success" : ""; ?>">
<div class="card-body">
<?php if($second < 1) : ?>
<span class="badge badge-soft-success float-end"> Tin Mới</span>
<?php endif; ?>
<pre style="word-wrap: break-word;"><?php
$thongtin = $res['ThongTin'];
if($res['Total'] > 1)
{
$thongtin = str_replace("Một", $res['Total'], $thongtin);
$thongtin = str_replace("1 ", $res['Total'] . ' ', $thongtin);
}
echo $thongtin;
?></pre>
<div class="clearfix"></div>
<div class="row">
<div class="col">
<a href="javascript: void(0);" class="text-reset">
<img src="<?php echo getAvatar($thongNhanSu['id']); ?>" class="avatar-sm img-thumbnail rounded-circle">
<span class="d-none d-md-inline-block ms-1 fw-semibold"><?php echo $thongNhanSu['TenNhanVien']; ?> </span> [ <?php echo $thongNhanSu['ChucVu'] ?> ]
</a>
</div>
<div class="col-auto">
<div class="text-end text-muted">
<p class="font-13 mt-2 mb-0"><i class="mdi mdi-calendar"></i> <?php echo date("d-m-Y", strtotime($res['NgayCapNhat'])) ?></p>
</div>
</div>
</div>
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
<?php endwhile; ?>