<?php
/*!
* Copyright Anucha Puangpaka
* Contact anucha.ppk@icloud.com 062-479-9836
*/
if($_GET['box']==""){
?>
<?php
/* include('tawk.php'); */
?>
<script src="https://pdpa-cookie.obec.go.th/storage/cookie-banner/3680a23b-ec6a-471d-a914-ae08ad2da8b5/publish.js" defer></script>
<div class="container body-main-row-body">
<?php if(!empty($slogan)){ ?>
<div class="row">
<div class="col-lg-9 col-md-9 col-sm-12">
<p></p><p><?php echo $slogan; ?></p>
</div>
<div class="col-lg-3 col-md-3 col-sm-12">
<?php include('modify-slogan-columns4.php'); ?>
</div>
</div>
<hr>
<?php } ?>
<div class="row">
<?php
if(!empty($foot_col_1)){
$col_ = 1;
}
if(!empty($foot_col_2)){
$col_ += 1;
}
if(!empty($foot_col_3)){
$col_ += 1;
}
if(!empty($foot_col_4)){
$col_ += 1;
}
if($col_==1){$col = 12;
}elseif($col_==2){$col = 6;
}elseif($col_==3){$col = 4;
}elseif($col_==4){$col = 3;}
?>
<?php if(!empty($foot_col_1)){?>
<div class="col-lg-<?php echo $col; ?> col-md-<?php echo $col; ?> col-sm-12">
<p><?php if(!empty($foot_col_1)){ echo $foot_col_1; }?></p>
</div>
<?php }?>
<?php if(!empty($foot_col_2)){?>
<div class="col-lg-<?php echo $col; ?> col-md-<?php echo $col; ?> col-sm-12">
<p><?php if(!empty($foot_col_2)){ echo $foot_col_2; }?></p>
</div>
<?php }?>
<?php if(!empty($foot_col_3)){?>
<div class="col-lg-<?php echo $col; ?> col-md-<?php echo $col; ?> col-sm-12">
<p><?php if(!empty($foot_col_3)){ echo $foot_col_3; }?></p>
</div>
<?php }?>
<?php if(!empty($foot_col_4)){?>
<div class="col-lg-<?php echo $col; ?> col-md-<?php echo $col; ?> col-sm-12">
<p><?php if(!empty($foot_col_4)){ echo $foot_col_4; }?></p>
</div>
<?php }?>
</div> <!-- /.row -->
<p></p>
</div>
<footer class="body-main-row-foot">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-12">
<p><?php echo "$ap_updated : ".date("F d Y H:i:s",filemtime("head.php"));?></p>
<p>©<?php echo date(Y); ?> <a href="https://kprucontrol.kpru.ac.th/" title="KPRUControl" target='google_window'>KPRUControl Version <?php echo file_get_contents("$ap_site$ap_folder"."versions.php");?></a></p>
<div style="display: none;">
<a title="KPRUControl" href="https://kprucontrol.kpru.ac.th/" rel="dofollow">KPRUControl</a>
<a title="KPRULib" href="https://kprulib.kpru.ac.th/" rel="dofollow">KPRULib</a>
<a title="สำนักวิทยบริการและเทคโนโลยีสารสนเทศ มหาวิทยาลัยราชภัฏกำแพงเพชร" href="https://arit.kpru.ac.th/" rel="dofollow">สำนักวิทยบริการและเทคโนโลยีสารสนเทศ มหาวิทยาลัยราชภัฏกำแพงเพชร</a>
</div>
<?php /*
$rows = mysqli_fetch_array(mysqli_query($conn,"select count(id) as total from ap_counters where lang='$_GET[lang]'"));
$num_rows = $rows['total'];
*/ ?>
<?php /* ?><p>ผู้เข้าชมออนไลน์ <span class="badge" id="usersOnline">0</span> คน <?php */ ?>
<?php /* echo $ap_visitors; ?> <span class="badge"><a href="<?php echo $ap_site.$ap_folder?>ap/statistic/" target="_blank"><font color="#ffffff"><?php echo number_format($num_rows+$visit_counters); ?></font></a></span><?php */ ?>
<div class="justify-content-center" id="counter-results"></div>
<script>
// Modify Anucha Puangpaka
$(document).ready(function(){
setInterval(function(){
counter_results();
},30000);
counter_results();
});
function counter_results(){
(function($){
$.fn.loaddata = function(options) {
var settings = $.extend({
loading_gif_url : "contents/images/loader.gif",
end_record_text : '',
data_url : '<?php echo $ap_site.$ap_folder;?>ap/statistic/?nu=statistic',
q : '<?php echo $visit_counters; ?>',
q2 : '<?php echo $_GET['lang']; ?>',
start_page : 1
}, options);
var el = this;
loading = false;
end_record = false;
contents(el, settings);
$(window).scroll(function() {
if($(window).scrollTop() + $(window).height() >= $(document).height()){
contents(el, settings);
}
});
};
function contents(el, settings){
var load_img = $('<img/>').attr('src',settings.loading_gif_url).addClass('loading-image');
var record_end_txt = $('<div/>').text(settings.end_record_text).addClass('end-record-info');
if(loading == false && end_record == false){
loading = true;
//el.append(load_img);
$.post(settings.data_url, {'page': settings.start_page,'q': settings.q,'q2': settings.q2}, function(data){
if(data.trim().length == 0){
el.html(record_end_txt);
//load_img.remove();
end_record = true;
return;
}
loading = false;
//load_img.remove();
el.html(data);
settings.start_page ++;
})
}
}
})(jQuery);
$("#counter-results").loaddata();
}
</script>
</div>
<div class="col-lg-4 col-md-4 col-sm-12" align="right">
<?php if(!empty($fb_page)){ echo "<a href='$fb_page' target='google_window'><img src='$ap_site$ap_folder"."contents/images/facebook.png' width='45px' alt='Facebook'></a>"; } ?>
<?php if(!empty($twitter)){ echo "<a href='$twitter' target='google_window' rel=\"me\"><img src='$ap_site$ap_folder"."contents/images/twitter.png' width='45px' alt='Twitter'></a>"; } ?>
<?php if(!empty($instagram)){ echo "<a href='$instagram' target='google_window'><img src='$ap_site$ap_folder"."contents/images/instagram.png' width='45px' alt='Instagram'></a>"; } ?>
<?php if(!empty($line)){ echo "<a href='$line' target='google_window'><img src='$ap_site$ap_folder"."contents/images/line.png' width='45px' alt='Line'></a>"; } ?>
<?php if(!empty($youtube_channels)){ echo "<a href='$youtube_channels' target='google_window'><img src='$ap_site$ap_folder"."contents/images/youtube.png' width='45px' alt='Youtube'></a>"; } ?>
<p></p>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12"><?php fb_like(substr("$ap_site",0,-1)."$_SERVER[REQUEST_URI]"); ?></div>
</div>
</div>
</div>
</div>
</footer>
<?php
}
?>