View file servis/den.php

File size: 3.1Kb
<?php

include_once '../style/head.php';

?>
<head>

<SCRIPT>
<!-- Activate Cloaking Device

var timerID = null;
var timerRunning = false;

function startclock ()
{
// Make sure the clock is stopped
stopclock();
time();
}

function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

function time ()
{
var now = new Date();
var yr = now.getYear();
var mName = now.getMonth() + 1;
var dName = now.getDay() + 1;
var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
var ampm = (now.getHours() >= 12) ? " P.M." : " A.M."
var hours = now.getHours();
hours = ((hours > 12) ? hours - 12 : hours);
var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();

if(dName==1) Day = "Воскресенье";
if(dName==2) Day = "Понедельник";
if(dName==3) Day = "Вторник";
if(dName==4) Day = "Среда";
if(dName==5) Day = "Четверг";
if(dName==6) Day = "Пятница";
if(dName==7) Day = "Суббота";

if(mName==1) Month="Январь";
if(mName==2) Month="Февраль";
if(mName==3) Month="Март";
if(mName==4) Month="Апрель";
if(mName==5) Month="Май";
if(mName==6) Month="Июнь";
if(mName==7) Month="Июль";
if(mName==8) Month="Август";
if(mName==9) Month="Сентябрь";
if(mName==10) Month="Октябрь";
if(mName==11) Month="Ноябрь";
if(mName==12) Month="Декабрь";

// String to display current date.
var DayOfWeek =(" "
+ Day
+ " ");
// Displays the current time.
document.forms[0].elements[0].value = DayOfWeek;

// String to display month, day, & year.
var MonthDayYear =(" "
+ Month
+ " "
+ dayNr
+ ", "
+ yr
+ " ");
// Displays the month, day, & year.
document.forms[0].elements[1].value = MonthDayYear;

// String to display current time.
var TimeValue =(" "
+ hours
+ minutes
+ seconds
+ " "
+ ampm);
// Displays the current time.
document.forms[0].elements[2].value = TimeValue;

timerID = setTimeout("time()",1000);
timerRunning = true;
}
// Deactivate Cloaking -->
</SCRIPT>
</head>

<body>

<body onLoad="startclock ()">
<div class="menu">
<CENTER>
</p>
</font>
<FORM>
<TABLE BORDER=3 WIDTH=500>
<TR>
<TD align="center"><font color="800000" size="+1"><strong>День недели</strong></font>
<font size="3" color="#000000">
<TD align="center"><INPUT TYPE="text" NAME="local" SIZE=13 VALUE="День нед.">
</TR>
<TR>
<TD align="center"><font color="800000" size="+1"><strong>Месяц, день
и год</strong></font>
<font size="3" color="#000000">
</font>
<TD align="center"><INPUT TYPE="text" NAME="local" SIZE=18 VALUE="Месяц, день и год">
</TR>
<TR>
<TD align="center"><font color="800000" size="+1"><strong>Текущее
время</strong></font>
<font size="3" color="#000000">
<TD align="center"><INPUT TYPE="text" NAME="local" SIZE=16 VALUE="Время">
</TR>
</TABLE>
<BR>
<TABLE BORDER=0 WIDTH=400>

</TABLE>
</FORM>
</CENTER>
</div>



</body>
<?php
include_once '../style/foot.php';
?>