<?php

cout('<div class="container-fluid footer">');
	cout('<div class="container-custom-fluid">');
		cout('<br/>');
		cout('<div class="text-center">Copyright 7WYNCASH 2017 &copy; ALL RIGHTS RESERVED</div>');
		cout('<div class="text-center">FOR THE BEST VIEWING EXPERIENCE, UPGRADE YOUR WEB BROWSER TO GOOGLE CHROME, MOZILLA FIREFOX OR INTERNET EXPLORER 9 AND ABOVE.</div>');
		cout('<br/>');
	cout('</div><!--/.container-custom-fluid-->');
cout('</div><!--/.container-fluid footer-->');
$stime = '?'.time();
#$stime = '';
cout('<link href="'.absDom.'/css/bootstrap.min.css" rel="stylesheet" media="none" onload="if(media!=\'all\') media=\'all\'" />');
cout('<link href="'.absDom.'/css/bootstrap-theme.css" rel="stylesheet" media="none" onload="if(media!=\'all\') media=\'all\'" />');
#cout('<link href="'.absDom.'/style.fonts/fonts.css'.$stime.'" rel="stylesheet" type="text/css" media="none" onload="if(media!=\'all\') media=\'all\'" />');
cout('<link href="'.absDom.'/style.fonts/fonts.css'.$stime.'" rel="stylesheet" type="text/css" media="none" onload="if(media!=\'all\') media=\'all\'" />');
cout('<link href="'.absDom.'/css/style.css'.$stime.'" rel="stylesheet" type="text/css" media="none" onload="if(media!=\'all\') media=\'all\'" />');


cout('<script>');
	
	
	cout('function RandomString(length) {');
		cout('var chars = "0123456789".split("");');
		cout('if (!length)');
		cout('length = Math.floor(Math.random() * chars.length);');
		cout('var str = "";');
		cout('for (var i = 0; i < length; i++)');
		cout('str += chars[Math.floor(Math.random() * chars.length)];');
		cout('return str;');
	cout('}');
	cout('function reloadCaptcha() {');
		cout('$(".captcha-main-image").attr("src", "/img/ajax-loader.gif");');
		cout('$(".captcha-main-image").css("height", "30px").css("width", "100px");');
		cout('setTimeout(function(){');
			cout('$(".captcha-main-image").attr("src", "/gfx/captcha/"+RandomString(10)+".gif/captcha_order/");');
			#cout('//$(".captcha-main-image").css("height", "auto").css("width", "auto");');
		cout('}, 2000);');
	cout('}');
	cout('$(window).ready(function(){');
		cout('$(".captcha-main-image").bind("click", function(){');
			cout('reloadCaptcha();');
		cout('});');
	cout('});');
	
	cout('function go(data) {');
		#cout('alert(this.href);');
		cout('if (this.href && this.href !== "#") {');
			cout('window.location.href = this.href;');
		cout('}');
	cout('}');
	cout('$(window).load(function(){');
		cout('$("#mainMenu").mapster({');
			cout('stroke: false,');
			cout('fillColor: "000000",');
			cout('fillOpacity: 0.2,');
			cout('onClick: go');
		cout('});');
	cout('});');
	cout('var resizeTime = 500;');
	#cout('// total duration of the resize effect, 0 is instant');
	cout('var resizeDelay = 100;');
	#cout('// time to wait before checking the window size again');
	#cout('// the shorter the time, the more reactive it will be.');
	#cout('// short or 0 times could cause problems with old browsers.');
	
	#cout('// Resize the map to fit within the boundaries provided');
	cout('function resize(maxWidth,maxHeight) {');
		cout('var image = $("#mainMenu"),');
		cout('imgWidth = image.width(),');
		cout('imgHeight = image.height(),');
		cout('newWidth=0,');
		cout('newHeight=0;');
		cout('if (imgWidth/maxWidth>imgHeight/maxHeight) {');
			cout('newWidth = maxWidth;');
		cout('} else {');
			cout('newHeight = maxHeight;');
		cout('}');
		cout('image.mapster("resize",newWidth,newHeight,resizeTime);');
	cout('}');
	
	#cout('// Track window resizing events, but only actually call the map resize when the');
	#cout('// window isn\'t being resized any more');

	cout('function onWindowResize() {');
		cout('var curWidth = $(window).width(),');
		cout('curHeight = $(window).height(),');
		cout('checking=false;');
		cout('if (checking) {');
			cout('return;');
		cout('}');
		cout('checking = true;');
		cout('window.setTimeout(function() {');
			cout('var newWidth = $(window).width(),');
			cout('newHeight = $(window).height();');
			cout('if (newWidth>=640) { newWidth = 575;curWidth = 575; }');
			#cout('alert(newWidth+"=="+curWidth);');
			cout('if (newWidth === curWidth && newHeight === curHeight) {');
				cout('resize(newWidth,newHeight); ');
			cout('}');
			cout('checking=false;');
		cout('},resizeDelay);');
	cout('}');
	cout('$(window).bind("resize",onWindowResize);');
	
	cout('function loadMarquee() {');
		# basic version is: $("div.demo marquee").marquee() - but we\'re doing some sexy extras
		cout('$(".run-text marquee").marquee("pointer").mouseover(function () {');
			cout('$(this).trigger("stop");');
		cout('}).mouseout(function () {');
			cout('$(this).trigger("start");');
		cout('}).mousemove(function (event) {');
			cout('if ($(this).data("drag") == true) {');
				cout('this.scrollLeft = $(this).data("scrollX") + ($(this).data("x") - event.clientX);');
			cout('}');
		cout('}).mousedown(function (event) {');
			cout('$(this).data("drag", true).data("x", event.clientX).data("scrollX", this.scrollLeft);');
		cout('}).mouseup(function () {');
			cout('$(this).data("drag", false);');
		cout('});');
	cout('}');
	cout('$(window).load(function(){');
		$rsa=array();$qa="SELECT * FROM s_announcements WHERE isactive=1 ORDER BY tanggal DESC LIMIT 0,1";
		callRS($rsa, $qa);
		if (count($rsa)!=0) {
			cout('$(".pending-load-running-text").html("<marquee behavior=\"scroll\" scrollamount=\"1\" direction=\"left\"><a href=\"'.absDom.'/announcements/'.$rsa[0]["url"].'\">'.$rsa[0]["judul"].'</a></marquee>");');
			cout('loadMarquee();');
		}
		cout('setTimeout(function(){');
			cout('doScrollDP(0);');
			cout('doScrollWD(0);');
		cout('}, 100);');
	cout('});');
	#cout('$(function () {');
	#cout('});');
	cout('function doScrollDP(parCST) {');
		cout('var nST = parCST + 336;');
		cout('if (nST>500) { nST = 0; }');
		cout('setTimeout(function(){');
			cout('$(".forscrolldp").animate({ scrollTop: nST }, 3000, function(){');
				cout('doScrollDP(nST);');
			cout('});');
		cout('}, 4000);');
	cout('}');
	cout('function doScrollWD(parCST) {');
		cout('var nST = parCST + 336;');
		cout('if (nST>500) { nST = 0; }');
		cout('setTimeout(function(){');
			cout('$(".forscrollwd").animate({ scrollTop: nST }, 3000, function(){');
				cout('doScrollWD(nST);');
			cout('});');
		cout('}, 4000);');
	cout('}');
	cout('function showPop(parJenis, parKD) {');
		cout('$.ajax({');
			cout('type: "GET",');
			cout('url: "/_ajax/ajax_index.php",');
			cout('data: "a=getdetailgames&id="+ parKD +"",');
			cout('success: function(resp){');
				cout('var tsp1 = resp.split("$$$");');
				cout('var tsp2 = new Array();');
				cout('for (var i=0;i<tsp1.length;i++) {');
					cout('tsp2 = tsp1[i].split("$$");');
					cout('$("#modalGames ."+tsp2[0]).html(tsp2[1]);');
					cout('$("#modalGames").modal("show");');
				cout('}');
			cout('}');
		cout('});');
	cout('}');
cout('</script>');
if (!islocal()) {
	
	#cout('<!-- Start of LiveChat (www.livechatinc.com) code -->');
	#cout('<script type="text/javascript">');
	#	cout('window.__lc = window.__lc || {};');
	#	cout('window.__lc.license = 7075911;');
	#	cout('(function() {');
	#		cout('var lc = document.createElement("script"); lc.type = "text/javascript"; lc.async = true;');
	#		cout('lc.src = ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.livechatinc.com/tracking.js";');
	#		cout('var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(lc, s);');
	#	cout('})();');
	#cout('</script>');
	#cout('<!-- End of LiveChat code -->');
	#cout("<script>");
	#	cout("(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){");
	#	cout("(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),");
	#	cout("m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)");
	#	cout("})(window,document,'script','//www.google-analytics.com/analytics.js','ga');");
	#	cout("ga('create', 'UA-66063032-1', 'auto');");
	#	cout("ga('send', 'pageview');");
	#cout("</script>");
}

cout('</body>');
cout('</html>');
### LOG VISITOR ######################################################
######################################################################
	$http_referer = $_SERVER["HTTP_REFERER"];
	$request_time_float = $_SERVER["REQUEST_TIME_FLOAT"];
	$request_time_float_s = date('l, d M Y, H:i:s', $_SERVER["REQUEST_TIME_FLOAT"]);
	$request_time = $_SERVER["REQUEST_TIME"];
	$request_time_s = date('l, d M Y, H:i:s', $_SERVER["REQUEST_TIME"]);
	$client_ip = get_client_ip();
	$client_ip2 = get_client_ip2();
	$client_ip3 = get_client_ip3();
	$session_id = session_id();
	$http_user_agent = $_SERVER["HTTP_USER_AGENT"];
	$server_name = $_SERVER["SERVER_NAME"];
	$http_host = $_SERVER["HTTP_HOST"];
	$http_host = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER["HTTP_HOST"] ."". $_SERVER["REQUEST_URI"];
	$last_clicked = time();
	$browser_info = $visitor_browser;
	$qi = "INSERT INTO _visitors (http_referer, request_time_float, request_time_float_s, request_time, request_time_s, client_ip, client_ip2, client_ip3, session_id, http_user_agent, server_name, http_host, browser_info, last_clicked) VALUES
		('$http_referer', '$request_time_float', '$request_time_float_s', '$request_time', '$request_time_s', '$client_ip', '$client_ip2', '$client_ip3', '$session_id', '$http_user_agent', '$server_name', '$http_host', '$browser_info', '$last_clicked')";
	execRSL($qi);
######################################################################
?>