Path : /var/www/html/main/ap/slide/
File Upload :
Current File : /var/www/html/main/ap/slide/index.php

<?php
error_reporting(E_ALL);
ini_set("display_errors", 0);

$_GET['nu'] = (isset($_GET['nu'])) ? $_GET['nu'] : '';

include('../../connDB.php');

$sql = "select * from ap_settings";
$query = mysqli_query($conn,$sql);
$rows = mysqli_fetch_array($query);
$google_analytics = $rows['google_analytics'];
?>
<!DOCTYPE html>
<html>
<head>
	<title>APSlide</title>
	<meta charset="utf-8">
  	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- Bootstrap -->
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
	<link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
	<link href="../../dist/css/bootstrap-theme.min.css" rel="stylesheet">
	<link href="../../theme.css" rel="stylesheet">
	<!-- HTML5 shim and Respond.js for 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/html5shiv/3.7.3/html5shiv.min.js"></script>
	  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
	<style>
	::-webkit-scrollbar {
	    display: none;
	}
	body {
		overflow-x:hidden;
		overflow-y:hidden;
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
	}
	.carousel-inner > .item > img,
	.carousel-inner > .item > a > img {
	    width: 100%;
	    height: 100%;
	    margin: auto;
	}
	</style>
	<script>
    setInterval(function () { autoloadpage(); }, 100000);
    function autoloadpage() {
        window.location.reload();
    }
    //autoloadpage();
    </script>
</head>
<body>
<?php
if($_GET['nu']==""){
?>
	<div id="carousel-anucha" class="carousel slide" data-ride="carousel">
	<?php
	$dt = date('Ymd');
	$sql = "select * from ap_slides where (status='1' and place4='4') and date_time>$dt order by date_time asc";
	$query = mysqli_query($conn,$sql);
	$num_rows = mysqli_num_rows($query);
	if($num_rows>0){
	?>
	  <div class="carousel-inner" role="listbox">
	    <?php
	    $query = mysqli_query($conn,$sql);
	    $i = 0;
	    while($rows = mysqli_fetch_array($query)){
            $i++;
            if($i==1){
	           $ac = " active";
	        }else{ $ac = ""; }
            ?>
            <div class="item<?php echo $ac?>">
            <img src="<?php echo $rows['images']?>" alt="<?php echo $rows['name']?>" style="width: 100%;">
            </div>
        <?php
            $ac = "";
	    }
	    ?>
	  </div>
	<?php
	}
	?>
	</div>
<?php
}

include('logs.php');

mysqli_close($conn);
?>
<script src="../../dist/js/bootstrap.min.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<?php echo $google_analytics?>']);
_gaq.push(['_trackPageview']);

(function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>