-
반응형
<?
if($_GET["year"])$this_year = $_GET["year"];
else$this_year = date("Y");
if($_GET["month"])$this_month = $_GET["month"];
else$this_month = date("m");$start_day = date("w",mktime(0,0,0,$this_month,1,$this_year));
$line_num = $check_flag = 0;
?><html>
<head>
<link rel="stylesheet" type="text/css" href="basic.css"/>
<script>
var report_val;
function view_menu(sysdate)
{
report_val = window.open("schedule.html?sysdate="+sysdate+"&mktime=<?=mktime();?>","report","scrollbars=yes,toolbar=no,location=no,resizable=no,status=yes,menubar=no,width=850,height=500,left=250,top=300,fullscreen=no");
report_val.focus();
}
</script>
</head><body>
<table width=910 cellpadding=0 cellspacing=0 border=0 bordercolordark='white' bordercolorlight='#666666' align='center'>
<tr>
<td align='center' height=30>
<span style='font-size:16pt;font-weight:bold'><?=$this_year."년 ".$this_month."월";?></span>
</td>
</tr>
</table>
<table width=910 cellpadding=0 cellspacing=0 border=1 bordercolordark='white' bordercolorlight='#666666' align='center'>
<tr height=25 style='font-weight:bold;background-color:#666666;color:#FFFFFF' align='center'>
<td>日</td>
<td>月</td>
<td>火</td>
<td>水</td>
<td>木</td>
<td>金</td>
<td>土</td>
</tr>
<?
for($a = 1 ; $a <= 37 ; )
{
echo("<tr align='center' height=80 valign='top'>");
for($b = 0 ; $b < 7 ; $b++)
{
if($line_num == 0)
{//첫 줄 스타트를 찾아본다!
if($b < $start_day)
{
echo("<td width=130 style='padding:5 0 0 5'>
<table width='125' cellpadding=0 cellspacing=0 border=0>
<tr>
<td colspan=100 style='color:#AAAAAA;cursor:hand' >".date("d",(mktime(0,0,0,$this_month,1,$this_year) + ($b - $start_day) * 86400))."
</td>
</tr>
</table>
</td>");
}
else
{
if($b == 0)$day_color = "#FF0000";
else if($b == 6)$day_color = "#2846A1";
else$day_color = "#000000";//오늘인가?
if(date("Y-m-d") == $this_year."-".$this_month."-".date("d",(mktime(0,0,0,$this_month,$a,$this_year))))
$bgcolor = "#FFF695";
else$bgcolor = "#FFFFFF";echo("<td width=130 style='padding:5 0 0 5;background-color:".$bgcolor.";cursor:hand' onclick=view_menu('".$this_year."-".$this_month."-".date("d",(mktime(0,0,0,$this_month,$a,$this_year)))."')>
<table width='125' cellpadding=0 cellspacing=0 border=0>
<tr>
<td colspan=100 style='color:".$day_color."'>".date("d",(mktime(0,0,0,$this_month,$a,$this_year)))."</td>
</tr>
</table>
</td>");
$a++;
}
}
else
{
if(date("m",mktime(0,0,0,$this_month,$a,$this_year)) != $this_month)$check_flag = 1;
if($check_flag == 1)$day_color = "#AAAAAA";
else
{
if($b == 0)$day_color = "#FF0000";
else if($b == 6)$day_color = "#2846A1";
else$day_color = "#000000";
}//오늘인가?
if(date("Y-m-d") == $this_year."-".$this_month."-".date("d",(mktime(0,0,0,$this_month,$a,$this_year))))
$bgcolor = "#FFF695";
else$bgcolor = "#FFFFFF";echo("<td width=130 style='padding:5 0 0 5;background-color:".$bgcolor.";cursor:hand' onclick=view_menu('".$this_year."-".$this_month."-".date("d",(mktime(0,0,0,$this_month,$a,$this_year)))."')>
<table width='125' cellpadding=0 cellspacing=0 border=0>
<tr>
<td colspan=100 style='color:".$day_color."'>".date("d",(mktime(0,0,0,$this_month,$a,$this_year)))."</td>
</tr>
</table>
</td>");
$a++;
}
}
$line_num++;
echo("</tr>");
if($check_flag == 1)break;
}
?>
<div id='view_menu_div' style='display:none'></div>
</body>
</html>'분류전' 카테고리의 다른 글
나도 한번 만들어 볼까? ㅎ (0) 2011.01.07 VMWare로 MAC OS 설치하는 방법 (0) 2010.12.16 window.open을 POST로 값 전달하기 (0) 2010.08.03 [CSS] 입력 폼(input, textarea)에 입력 시작이 한글로 입력되게 하자!!! (0) 2010.08.03 [엑셀] 텍스트로 된 숫자를 숫자로 변환하기!! (0) 2010.08.02