| 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/admin2/ |
Upload File : |
<?php
include '../configchannel.php';
include 'configtotal.php';
if(!isset($_SESSION['BaoCaoKiemDuyetNguoiLam']) || isset($_GET['Id']))
{
$resultQL = mysqli_fetch_assoc(Select('NguoiLam', false, "`id` = ".mysql_real_escape_string($_GET['Id'])."" ,'`Id` DESC'));
if(!isset($resultQL))
{
Header( "Location: https://rubymedia.studio/admin/baocaoquanly.php" );
exit;
}
$_SESSION['BaoCaoKiemDuyetNguoiLam'] = $resultQL;
}
$resultQL = $_SESSION['BaoCaoKiemDuyetNguoiLam'];
if(isset($_GET['baoCao']))
{
$dataInsert = array(
'KiemDuyet' => mysql_real_escape_string($_GET['kiemduyet']),
'NguoiKiemDuyet' => $_SESSION['login']['id']
);
Update('BaoCaoNhanVien', $dataInsert, '`Id` = ' . mysql_real_escape_string($_GET['baoCao']) . '');
Header( "Location: " . $_SERVER['HTTP_REFERER'] );
exit;
}
else if(isset($_GET['kiemduyetallcomment']))
{
$dataInsert = array(
'KiemDuyet' => 1,
'NguoiKiemDuyet' => $_SESSION['login']['id']
);
$stringid = "";
foreach($_SESSION['BaoCaoComment'] as $key => $item)
{
$stringid .= "`Id` = " . $item;
if($key < count($_SESSION['BaoCaoComment'])-1)
{
$stringid .= " OR ";
}
}
Update('BaoCaoNhanVien', $dataInsert, $stringid);
Header( "Location: " . $_SERVER['HTTP_REFERER']);
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
<meta name="author" content="Coderthemes">
<link rel="shortcut icon" href="assets/images/favicon_1.ico">
<title>Ruby Media</title>
<!--Morris Chart CSS -->
<link href="assets/plugins/custombox/css/custombox.css" rel="stylesheet">
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/core.css" rel="stylesheet" type="text/css" />
<link href="assets/css/components.css" rel="stylesheet" type="text/css" />
<link href="assets/css/icons.css" rel="stylesheet" type="text/css" />
<link href="assets/css/pages.css" rel="stylesheet" type="text/css" />
<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />
<!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script src="assets/js/modernizr.min.js"></script>
</head>
<body class="fixed-left">
<!-- Begin page -->
<div id="wrapper">
<!-- ========== Left Sidebar Start ========== -->
<?php include 'header/taskbar.php'; ?>
<!-- Left Sidebar End -->
<!-- ============================================================== -->
<!-- Start right Content here -->
<!-- ============================================================== -->
<div class="content-page">
<!-- Start content -->
<div class="content">
<div class="container">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<h4 class="page-title">Báo Cáo Của <?php echo $resultQL['TenNhanVien']; ?></h4>
<ol class="breadcrumb">
<li><a href="https://rubymedia.studio/admin/baocaoquanly.php">Báo Cáo</a></li>
<li class="active">Kiểm Duyệt Báo Cáo</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="card-box">
<div class="row">
<div class="col-sm-8">
<a href="baocaoquanlykiemduyet.php" class="badge badge-<?php echo (!isset($_GET['baocao']))? "danger" : "primary" ?>">Hôm Nay</a>
<a href="?baocao=10" class="badge badge-<?php echo (isset($_GET['baocao']) && $_GET['baocao']==10)? "danger" : "primary" ?>">Hôm Qua</a>
<a href="?baocao=7" class="badge badge-<?php echo (isset($_GET['baocao']) && $_GET['baocao']==7)? "danger" : "primary" ?>">Tuần Trước</a>
<a href="?baocao=28" class="badge badge-<?php echo (isset($_GET['baocao']) && $_GET['baocao']==28)? "danger" : "primary" ?>">Báo Cáo 28 Ngày</a>
<?php
$soLuongThangXemLai = 4;
?>
<a href="?baocao=0" class="badge badge-<?php echo (isset($_GET['baocao']) && $_GET['baocao']==0)? "danger" : "primary" ?>">Báo Cáo Tháng <?php echo date('m'); ?></a>
<?php
for($i = 1; $i <= $soLuongThangXemLai; $i++)
{
$thangtruoc = date('m', strtotime('last day of -'.$i." month", time()));
?>
<a href="?baocao=<?php echo $i; ?>" class="badge badge-<?php echo $_GET['baocao']==$i? "danger" : "primary" ?>">Báo Cáo Tháng <?php echo $thangtruoc; ?></a>
<?php
}
?>
<?php
$thoiGianGioiHan = date('d/m/Y', strtotime('0 day', time())); // chọn ngày so sánh đau
$date = explode('/', $thoiGianGioiHan);
$time = mktime(0,0,0,$date[1],$date[0],$date[2]);
$mysqldate = date( 'Y-m-d H:i:s', $time);
$thoiGianGioiHan = date('d/m/Y', strtotime('0 day', strtotime($mysqldate))); // chọn ngày so sánh đau
$date = explode('/', $thoiGianGioiHan);
$time = mktime(23,59,59,$date[1], $date[0],$date[2]);
$ngaySQLSelect = date( 'Y-m-d H:i:s', $time);
$ngaySQL = $ngaySQLSelect;
if(isset($_GET['baocao']))
{
if($_GET['baocao'] == 28) // doanh 28 ngày
{
$thoiGianGioiHan = date('d/m/Y', strtotime('-28 day', time()));
$date = explode('/', $thoiGianGioiHan);
$time = mktime(0,0,0,$date[1],$date[0],$date[2]);
$mysqldate = date( 'Y-m-d H:i:s', $time);
$thoiGianGioiHan = date('d/m/Y', strtotime('0 day', time()));
$date = explode('/', $thoiGianGioiHan);
$time = mktime(23,59,59,$date[1],$date[0],$date[2]);
$ngaySQLSelect = date( 'Y-m-d H:i:s', $time);
}
else if($_GET['baocao'] == 10) // doanh thu hôm qua
{
$thoiGianGioiHan = date('d/m/Y', strtotime('-1 day', time()));
$date = explode('/', $thoiGianGioiHan);
$time = mktime(0,0,0,$date[1],$date[0],$date[2]);
$mysqldate = date( 'Y-m-d H:i:s', $time);
$time = mktime(23,59,59,$date[1], $date[0],$date[2]);
$ngaySQLSelect = date( 'Y-m-d H:i:s', $time);
}
else if($_GET['baocao'] == 7) // doanh thu tuần trước
{
$previous_week = strtotime("-1 week +1 day");
$start_week = strtotime("last sunday midnight",$previous_week);
$end_week = strtotime("next saturday",$start_week);
$mysqldate = date( 'Y-m-d H:i:s', $start_week);
$ngaySQLSelect = date( 'Y-m-d 23:59:59', $end_week);
$ngaySQL = $ngaySQLSelect;
}
else if($_GET['baocao'] == 0) // doanh thu tháng này
{
$thoiGianGioiHan = date('d/m/Y', strtotime('-0 day', time()));
$date = explode('/', $thoiGianGioiHan);
$time = mktime(0,0,0,$date[1],01,$date[2]);
$mysqldate = date( 'Y-m-d H:i:s', $time);
$thoiGianGioiHan = date('t/m/Y'); // chọn ngày so sánh đau
$date = explode('/', $thoiGianGioiHan);
$time = mktime(23,59,59,$date[1], $date[0],$date[2]);
$ngaySQLSelect = date( 'Y-m-d H:i:s', $time);
$ngaySQL = $ngaySQLSelect;
}
else
{
for($i = 1; $i <= $soLuongThangXemLai; $i++)
{
if($i == $_GET['baocao'])
{
$thoiGianGioiHan = date('d/m/Y', strtotime('last day of -'.$i.' month', strtotime($ngaySQL))); // chọn ngày so sánh đau
$date = explode('/', $thoiGianGioiHan);
$time = mktime(0,0,0,$date[1],01,$date[2]);
$mysqldate = date( 'Y-m-d H:i:s', $time);
$thoiGianGioiHan = date('d/m/Y', strtotime('last day of this month', strtotime($mysqldate))); // chọn ngày so sánh đau
$date = explode('/', $thoiGianGioiHan);
$time = mktime(23,59,59,$date[1], $date[0],$date[2]);
$ngaySQLSelect = date( 'Y-m-d H:i:s', $time);
}
}
}
}
?>
</div>
</div>
<div class="row">
<div class="col-sm-8">
<?php
$thoiGianXem = date('d/m/Y', strtotime('0 day', strtotime($mysqldate))); // chọn ngày so sánh đau
$thoiGianXemSau = date('d/m/Y', strtotime('0 day', strtotime($ngaySQLSelect))); // chọn ngày so sánh đau
echo $thoiGianXem . ' - ' . $thoiGianXemSau;
?>
<?php
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
?>
<a href="<?php echo $actual_link; ?>&kiemduyetallcomment" class="badge badge-success">Phê Duyệt Tất Cả Comment</a>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover mails m-0 table table-actions-bar">
<thead>
<tr>
<th>#</th>
<th>Tên Kênh</th>
<th>Thể Loại Báo Cáo</th>
<th>Nội Dung Báo Cáo</th>
<th>Kiểm Duyệt</th>
<th style="width:5px;">Tác Vụ</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$listBaoCao = null;
$result = Select('QuanLyChannel', false, "`IdNguoiLam` = ".$resultQL['id']."");
while($res = mysqli_fetch_array($result))
{
$resultVideoUpload = Select('BaoCaoNhanVien', false, "`IdChannel` = ".$res['id']." AND `NgayBaoCao` <= '".$ngaySQLSelect."' AND `NgayBaoCao` >= '".$mysqldate."'", '`Id` DESC');
while($resVideo = mysqli_fetch_array($resultVideoUpload))
{
$resVideo['InfoChannel'] = $res;
$listBaoCao[] = $resVideo;
}
}
?>
<?php
$demstt = 1;
foreach($listBaoCao as $keyBaoCao => $itemBaoCao)
{
?>
<tr>
<td>
<?php echo $demstt++; ?>
</td>
<td>
<a href="https://www.youtube.com/channel/<?php echo $itemBaoCao['InfoChannel']['IdChannel']; ?>" target="_blank"><?php echo$itemBaoCao['InfoChannel']['NameChannel']; ?></a>
</td>
<td>
<?php
if($itemBaoCao['KieuBaoCao'] == 0)
{
echo 'Upload Video';
} else if($itemBaoCao['KieuBaoCao'] == 1)
{
$_SESSION['BaoCaoComment'][] = $itemBaoCao['Id'];
echo 'Comment Video';
} else if($itemBaoCao['KieuBaoCao'] == 2)
{
echo 'Share MXH';
}
?>
</td>
<td>
<a href="<?php echo $itemBaoCao['NoiDungBaoCao']; ?>" target="_blank"><?php echo substr($itemBaoCao['NoiDungBaoCao'], 0, 70); ?></a>
</td>
<td>
<?php
if($itemBaoCao['NguoiKiemDuyet'] != 0)
{
$resultQLKiemDuyet = mysqli_fetch_assoc(Select('NguoiLam', false, "`id` = ".$itemBaoCao['NguoiKiemDuyet']."" ,'`Id` DESC'));
$name = explode(" ", $resultQLKiemDuyet['TenNhanVien'])[count(explode(" ", $resultQLKiemDuyet['TenNhanVien']))-1];
}
if($itemBaoCao['KiemDuyet'] == 0)
{
echo '<div style="color: white; font-weight: bold;">Chưa Kiểm Duyệt</div>';
} else if($itemBaoCao['KiemDuyet'] == 1)
{
echo '<div style="color: #b2ff9e; font-weight: bold;">'.$name.' Chấp Nhận</div>';
} else if($itemBaoCao['KiemDuyet'] == 2)
{
echo '<div style="color: #ff525a; font-weight: bold;">'.$name.' Từ Chối</div>';
}
?>
</td>
<td style="width:5px;">
<a href="?baoCao=<?php echo $itemBaoCao['Id']; ?>&kiemduyet=1" class="badge badge-success" style="color: white;">Phê Duyệt</a>
</td>
<td>
<a href="?baoCao=<?php echo $itemBaoCao['Id']; ?>&kiemduyet=2" class="badge badge-danger" style="color: white;">Từ Chối</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div>
</div> <!-- container -->
</div> <!-- content -->
<?php include 'header/footer.php'; ?>
</div>
<!-- /Right-bar -->
</div>
<!-- END wrapper -->
<script>
var resizefunc = [];
</script>
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/detect.js"></script>
<script src="assets/js/fastclick.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/jquery.blockUI.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/jquery.nicescroll.js"></script>
<script src="assets/js/jquery.scrollTo.min.js"></script>
<script src="assets/js/jquery.core.js"></script>
<script src="assets/js/jquery.app.js"></script>
<!-- Modal-Effect -->
<script src="assets/plugins/custombox/js/custombox.min.js"></script>
<script src="assets/plugins/custombox/js/legacy.min.js"></script>
</body>
</html>