View file www/service/others/calendar.php

File size: 2.99Kb
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';

$set['title']='Сервисы - Календарь';
include_once '../../sys/inc/thead.php';
title();
aut();
err();	

?>

<div class='main'><img width='20px' src='/style/img/sep.png'><a href='/'> На главную</a> | <a href='/service'> Сервисы</a> | Календарь</div>


<div class='nav1'>

<script type="text/javascript">
function fill_month(month, month_days) {
document.write("<table style='border:1px solid #44a;' cellspacing=1 cellpadding=0>")
document.write("<tr align=center><td colspan=7>")
document.write("<b>"+month+" "+year+" года</b><tr bgcolor=#d2daec align=center>")
document.write("<td width=30>"+"Пн"+"</td>")
document.write("<td width=30>"+"Вт"+"</td>")
document.write("<td width=30>"+"Ср"+"</td>")
document.write("<td width=30>"+"Чт"+"</td>")
document.write("<td width=30>"+"Пт"+"</td>")
document.write("<td width=30>"+"Сб"+"</td>")
document.write("<td width=30>"+"Вс"+"</td></tr><tr align=center>")

 day=1
 for (var i=1;i<start_day;i++) { document.write("<td>") }

 for (var i=start_day;i<8;i++) {
  document.write("<td>"+day+"</td>")
  day++
 }
 document.write("<tr align=center>")
 while (day <= month_days) {
  for (var i=1;i<=7 && day<=month_days;i++) {
   document.write("<td>"+day+"</td>")
   day++
  }
  document.write("</tr><tr align=center>")
  start_day=i
 }
 document.write("</tr></table>")
}

today = new Date();
year = today.getYear();
if (year < 2000) year = year + 1900;
today= new Date("January 1, "+year)
if (today.getDay()==0) start_day=7
 else start_day = today.getDay()

document.write("<table><tr valign=top><td>")
fill_month("Январь",31)
document.write("</td><td>")
if (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0))
{ fill_month("Февраль", 29); }
else { fill_month("Февраль", 28); }
document.write("</td><td>")
fill_month("Март",31)
document.write("</td></tr><tr valign=top><td>")
fill_month("Апрель",30)
document.write("</td><td>")
fill_month("Май",31)
document.write("</td><td>")
fill_month("Июнь",30)
document.write("</td></tr><tr valign=top><td>")
fill_month("Июль",31)
document.write("</td><td>")
fill_month("Август",31)
document.write("</td><td>")
fill_month("Сентябрь",30)
document.write("</td></tr><tr valign=top><td>")
fill_month("Октябрь",31)
document.write("</td><td>")
fill_month("Ноябрь",30)
document.write("</td><td>")
fill_month("Декабрь",31)
document.write("</td></tr></table>")
</script>

</div>

<div class='main'><img width='20px' src='/style/img/sep.png'><a href='/'> На главную</a> | <a href='/service'> Сервисы</a> | Календарь</div>


<?

	
include_once '../../sys/inc/tfoot.php';
?>