/home/mjc1/public_html/manage/mini_calendar.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<? 
if(!$year$year date(Y); 
if(!
$month$month date(m); 
$next_year $year
$prev_year $year
$next_month $month 1
$prev_month $month 1
if(
$month == 12) { 
$next_year $year 1
$next_month 1
} else if (
$month == 1) { 
$prev_year $year 1
$prev_month 12


$total_days date(t); 
$first_day date('w'mktime(0,0,0,$month,1,$year)); 
?> 
<html> 
<head> 
<title>´Þ·Â</title> 
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr"> 
<link rel="StyleSheet" href="../include/common.css" type="text/css"> 
<style> 
<!-- 
td { font-size : 9pt; } 
A:link { font : 9pt; color : black; text-decoration : none; font-family : ±¼¸²; font-size : 9pt; } 
A:visited { text-decoration : none; color : black; font-size : 9pt; } 
A:hover { text-decoration : underline; color : black; font-size : 9pt; } 

-->  
</style> 
<script language="javascript"> 
<!-- 
function calendar(yy,mm,dd) { 
window.opener.<? echo $form?>.<? echo $ffild?>.value = yy + '-' + mm + '-' + dd; 
self.close(); 

--> 
</script> 
</head> 

<body leftmargin=0 marginwidth=0> 
<table border=0 cellpadding=0 cellspacing=1 bgcolor=dfdfdf width=200 align=center> 
  <tr bgcolor=ffffff> 
    <td background="../img/calendar_top.gif" height="25" valign="bottom"> 
      <table border=0 cellpadding=0 cellspacing=0 width=80% align="center"> 
        <tr> 
          <td align=center> 
            <a href="calendar.php?form=<? echo $form?>&ffild=<? echo $ffild?>&year=<? echo $year-1?>&month=<? echo $month?>" title="<? echo $year-1?>³â<? echo $month?>¿ù">¢¸</a> <? echo ${year}.'³â'?> <a href="calendar.php?form=<? echo $form?>&ffild=<? echo $ffild?>&year=<? echo $year+1?>&month=<? echo $month?>" title="<? echo $year+1?>³â<? echo $month?>¿ù">¢º</a> 
            <a href="calendar.php?form=<? echo $form?>&ffild=<? echo $ffild?>&year=<? echo $prev_year?>&month=<? echo $prev_month?>" title="<? echo $prev_year?>³â<? echo $prev_month?>¿ù">¢¸</a> <? echo ${month}.'¿ù'?> <a href="calendar.php?form=<? echo $form?>&ffild=<? echo $ffild?>&year=<? echo $next_year?>&month=<? echo $next_month?>" title="<? echo $next_year?>³â<? echo $next_month?>¿ù">¢º</a> 
          </td> 
        </tr> 
      </table> 
    </td> 
    <td rowspan=4 background="../img/calendar_back.gif" valign=top></td> 
  </tr> 
  <tr bgcolor=ffffff> 
    <td background="../img/calendar_bg.gif" valign=top > 
      <table border="0" cellspacing="1" cellpadding="4" align=center width=90%> 
        <tr align="right"> 
          <td>ÀÏ</td> 
          <td>¿ù</td> 
          <td>È­</td> 
          <td>¼ö</td> 
          <td>¸ñ</td> 
          <td>±Ý</td> 
          <td>Åä</td> 
        </tr> 
        <tr valign=top> 
<? 
$col 
0
for(
$i 0$i $first_day$i++) { 
echo 
'<td bgcolor="#ffffff"> </td>'
$col++; 

for(
$j 1$j <= $total_days$j++) { 
$bgc '#eeeeee'
if (
$col == 6$bgc '#E9F7FE'
if (
$col == 0$bgc '#FEEFF1'
if (
$year == date(Y) && $month == date(m) && $j == date(d)) $style '<font color="#cc0000"><b>'.$j.'</b></font>'; else $style $j
echo 
'<td align=right bgcolor="'.$bgc.'"><a href="javascript:calendar('.$year.','.$month.','.$j.');">'.$style.'</a></td>'
$col++; 
if(
$col == 7) { 
echo 
'</tr>'
if(
$j != $total_days) echo '<tr valign="top" height="22">'
$col 0


while(
$col && $col 7) { 
echo 
'<td bgcolor="#ffffff"> </td>'
$col++; 

?> 
        </tr> 
      </table> 
    </td> 
  </tr> 
</table> 
</body> 
</html>