<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

	<title>{% block title %}{% endblock %}</title>
	<meta name="description" content="{% block metadesc %}{% endblock %}">
	<meta name="keyword" content="{% block metakey %}{% endblock %}">
	<meta name="author" content="">

	<meta name="viewport" content="width=device-width,initial-scale=1">
	<meta name="google-site-verification" content="_tMgRLlNTFvKNIxRf6RC9kkPWbMDe0O_207eEML4UU4" />
	<link rel="stylesheet" href="{% nav public %}css/sb-admin-2.css">
	<link rel="stylesheet" href="{% nav public %}css/date_android.css">
	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
	<link rel="shortcut icon" type="image/x-icon" href="{% nav public %}favico.png"/>
	<script src="{% nav public %}js/libs/modernizr-2.0.6.min.js"></script>
	<script src="{% nav public %}js/sb-admin-2.min.js"></script>
	{% block style %}{% endblock %}
</head>
<body>
<div id="head">
<div id="subhead">
<div style="position:absolute;width:70px;height:60px;margin-top:-8px;"><img src="{% nav public %}img/logo.png" /></div>
{% if session.user.role == "store" %}
<a href="{% nav store_home %}"><i>Store {{ session.user.store.nama }}</i></a>
{% else %}
<a href="{% nav user_login %}"><i>Apotek ARCADE</i></a>
{% endif %}
{% if session.user.username != "" %}
<div id="subhead_user"><b>{{session.user.username}}</b> | <span id="server_time" 
	year="{{server_time.year}}" 
	month="{{server_time.mon}}" 
	day="{{server_time.mday}}"
	hour="{{server_time.hours}}"
	minute="{{server_time.minutes}}"
	second="{{server_time.seconds}}">-TIME-</span> | <a href="{% nav user_logout %}">Logout</a></div>
{% endif %}
</div>
</div>
<div id="info" style="position:fixed;top:80px;right:50px;width:200px;z-index:999;display:none;">
	<div class='alert alert-success' role='alert' style='width:100%;text-align:center;'>{{msg}}</div>
</div>
<div id="print">
{% block print %}{% endblock %}
</div>
<div id="container" 
	{% if this_page == "user/login.html" %}style="width:820px;"{% endif %}
	{% if session.user.id_role == 1 %}style="width:90%;min-width:1100px"{% endif %}
	{% if session.user.id_role == 2 %}style="width:85%;min-width:1200px"{% endif %}
	{% if session.user.id_role == 7 %}style="width:90%;min-width:1100px"{% endif %}
>
	<div id="main" role="main">
		{% block content %}{% endblock %}
	</div>
</div> <!--! end of #container -->

<script>window.jQuery || document.write('<script src="{% nav public %}js/jquery-3.6.0.min.js"><\/script>')</script>

<!-- scripts concatenated and minified via ant build script-->
<script src="{% nav public %}js/plugins.js"></script>
<script src="{% nav public %}js/script.js"></script>
<script type="text/javascript">Number.prototype.formatMoney = function(c, d, t){
var n = this, c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "," : d, t = t == undefined ? "." : t, s = n < 0 ? "-" : "", i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0;
   return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
 };</script>
{% block script %}{% endblock %}
{% block mainscript %}{% endblock %}

<script type="text/javascript">
	var server_elapsed_second = 0;
	setInterval("setServerTime()",1000);
	setServerTime();
	function setServerTime() {
		server_elapsed_second++;
		c = new Date(
			$("#server_time").attr('year'),
			$("#server_time").attr('month') -1,
			$("#server_time").attr('day'),
			$("#server_time").attr('hour'),
			$("#server_time").attr('minute'),
			$("#server_time").attr('second'));
		
		c.setSeconds(c.getSeconds() + server_elapsed_second); 
		
		hour = c.getHours();
		minute = c.getMinutes();
		second = c.getSeconds();
		if (hour < 10) hour = "0" + Math.floor(hour);
		if (minute < 10) minute = "0" + Math.floor(minute);
		if (second < 10) second = "0" + Math.floor(second);
		
		$("#server_time").text(hour+":"+minute+":"+second);
	}
	if ("{{msg}}" != "") {
		$("#info").show();
		setTimeout("$('#info').fadeOut(); ", 3000);
	}
</script>
<!-- end scripts-->

<!--[if lt IE 7 ]>
	<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"></script>
	<script>window.attachEvent("onload",function(){CFInstall.check({mode:"overlay"})})</script>
<![endif]-->

</body>
</html>
