<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="robots" content="noindex" />
<meta name="googlebot" content="noindex" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<title>Ders-teneffüs Sayacı</title>
<style type="text/css">
body,
td,
th {
font-family: Verdana, Geneva, sans-serif;
color: #FFF;
height: auto;
weight: auto;
}
body {
background-color: #eb1e0c;
text-align: center;
}
</style>
</head>
<table width="100%" align="center">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<meta
http-equiv="Content-Type"
content="text/html; charset=windows-1254"
/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="robots" content="noindex" />
<meta name="googlebot" content="noindex" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<title>Ders-teneffüs Sayacı</title>
<script type="text/javascript">
var dersSaatleri = [
"08:30-09:10",
"09:25-10:05",
"10:15-10:55",
"11:05-11:45",
"11:55-12:35",
"13:30-14:20",
"14:30-15:10",
"15:20-16:00"
];
var i;
function baslat() {
sayac = window.setInterval(function() {
var saat1 = saat(),
saniye1 = saniye(saat1),
aktivite$ = "",
sayac$ = "";
for (i = 0; i <= dersSaatleri.length - 1; i++) {
saatAraligi = dersSaatleri[i].split("-");
saniye2 = saniye(saatAraligi[0]);
saniye3 = saniye(saatAraligi[1]);
if (i == 0 && saniye1 < saniye2) {
aktivite$ = "";
sayac$ =
"İlk Dersin Başlamasına " +
sureyeCevir(saniye2 - saniye1) +
" Var.";
}
if (saniye1 >= saniye2 && saniye1 <= saniye3) {
aktivite$ = i + 1 + ". Ders İşleniyor.";
sayac$ =
"Teneffüse " +
sureyeCevir(saniye3 - saniye1 + 60) +
" Var.";
}
if (i < dersSaatleri.length - 1) {
saniye4 = saniye(dersSaatleri[i + 1].split("-")[0]) + 60;
if (saniye1 >= saniye3 + 60 && saniye1 < saniye4) {
aktivite$ = i + 1 + ". Teneffüstesiniz.";
sayac$ =
i +
2 +
". Dersin Başlamasına " +
sureyeCevir(saniye4 - saniye1) +
" Var.";
}
}
if (i == dersSaatleri.length - 1 && saniye1 > saniye3 + 60) {
aktivite$ = "Bütün Dersler Bitti.";
sayac$ = "İyi günler.";
}
}
document.getElementById("suankisaat").innerHTML = saat1;
document.getElementById("aktivite").innerHTML = aktivite$;
document.getElementById("aktivitesayaci").innerHTML = sayac$;
}, 100);
}
function sureyeCevir(sure) {
var st = 0,
dk = 0,
a$ = "";
if (sure >= 3600) {
do {
sure = sure - 3600;
st++;
} while (sure >= 3600);
}
if (sure >= 60) {
do {
sure = sure - 60;
dk++;
} while (sure >= 60);
}
if (st > 0) {
a$ = st + " saat ";
}
if (dk > 0) {
a$ = a$ + dk + " dakika ";
}
return a$ + sure + " Saniye";
}
function sifirSil(a$) {
if (a$.charAt(0) == "0") {
a$ = a$.charAt(1);
}
return parseInt(a$);
}
function left$(a$) {
a$ = a$.toString();
return a$.substring(a$.length - 2, a$.length);
}
function saat() {
return (
left$("0" + new Date().getHours()) +
":" +
left$("0" + new Date().getMinutes()) +
":" +
left$("0" + new Date().getSeconds())
);
}
function saniye(saat$) {
saat$ = saat$.split(":");
if (saat$.length == 2) {
saat$.push("00");
}
return (
sifirSil(saat$[0]) * 3600 +
sifirSil(saat$[1]) * 60 +
sifirSil(saat$[2])
);
}
</script>
</td>
</tr>
</table>
<body onload="baslat()">
<div class="th">
<span id="suankisaat" style="font-size:300px;"></span><br />
<span id="aktivite" style="font-size:120px;"></span><br />
<span id="aktivitesayaci" style="font-size:120px;"></span
><br /> <br />
</div>
<table>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>