TOP004.php
4.24 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
//*****************************************************************************
//*
//* プログラム名:TOPページ
//* プログラムID:TOP004.php
//* 機能 :出勤表
//* 作成者 :K.Yoshimura
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
$strDBinc="include/dbcon.inc";
include($strDBinc);
//*****カレンダー編集*****//
$youbi=array("日","月","火","水","木","金","土");
$clender=array("#ffccff","#ccffcc","#ccffcc","#ccffcc","#ccffcc","#ccffcc","#99ffff");
$schedule=array("#ffccff","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#99ffff");
$st_year=substr($strwkdate, 0, 4);
$st_mon=substr($strwkdate, 4, 2);
$st_day="01";
$dateMax=date("j", mktime (0,0,0,$st_mon+1,$st_day-1,$st_year));
$st_sengetu =date("Ymd", mktime (0,0,0,$st_mon-1,$st_day,$st_year));
$st_raigetu =date("Ymd", mktime (0,0,0,$st_mon+1,$st_day,$st_year));
echo "先月".$st_sengetu;
echo "来月".$st_raigetu;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" type="text/css" href="basefont.css">
<TITLE>e-グル TOP</TITLE>
<?php
include("include/TOP003.inc");
?>
</HEAD>
<BODY>
<?php
//**** メニュー ****//
include("include/menu.inc");
//**** DB接続 ****//
$strDBinc="include/dbcon.inc";
include($strDBinc);
?>
<form name="e_gru">
<br>
<TABLE cellSpacing=0 cellPadding=0 width=502 class="mainColor" border=0>
<TBODY>
<TR>
<TD width=10 class="mainColor" height=30> </TD>
<TD width=200></TD>
<TD align=middle width=300>
<?php
echo "<SELECT name=main_year>";
for ($intCnt = $st_year-1 ; $intCnt <= $st_year+1 ; $intCnt++) {
if ($st_year == $intCnt) {
echo "<option value=".$intCnt." selected>".$intCnt."年</option>\n";
}else{
echo "<option value=".$intCnt.">".$intCnt."年</option>\n";
}
}
echo "</SELECT>";
echo "<SELECT name=main_mon>";
for ($intCnt = 1 ; $intCnt <= 12 ; $intCnt++) {
if ($st_mon == $intCnt) {
if (strlen($intCnt)==1){
echo "<option value=\""."0".$intCnt."\" selected>".$intCnt."月</option>\n";
}
else{
echo "<option value=".$intCnt." selected>".$intCnt."月</option>\n";
}
}else{
if (strlen($intCnt)==1){
echo "<option value=\""."0".$intCnt."\">".$intCnt."月</option>\n";
}
else{
echo "<option value=".$intCnt.">".$intCnt."月</option>\n";
}
}
}
echo "</SELECT>";
echo " <input type=button value=表示 onclick=javascript:getDate();>";
?>
</TD>
<TD align=right width=300><INPUT type=submit value="<< 先月" onclick="move_date(<?php echo $st_sengetu; ?>)"><INPUT type=submit value="来月 >>" onclick="move_date(<?php echo $st_raigetu; ?>)"> </TD>
<TD width=10 class="mainColor" height=30> </TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=1 cellPadding=1 width=500 cellpadding="1" class="mainColor">
<TBODY>
<TR>
<TD>
<TABLE cellspacing="1" cellpadding="1" width="498" " class="mainColor" border="0">
<TBODY>
<TR bgColor=#cccccc>
<TD align=center width=80><SPAN class=Normalfont>日付</SPAN></TD>
<TD align=center width=80><SPAN class=Normalfont>出社</SPAN></TD>
<TD align=center width=80><SPAN class=Normalfont>退社</SPAN></TD>
<TD align=left width=300><SPAN class=Normalfont>外出先</SPAN></TD>
</TR>
<?php
for ($intDayCnt=1; $intDayCnt <= $dateMax; $intDayCnt++){
$intYoubi=date("w", mktime (0,0,0,$st_mon,$intDayCnt,$st_year));
$setdate=date("Ymd", mktime (0,0,0,$st_mon,$intDayCnt,$st_year));
$intspace=date("w", mktime (0,0,0,$st_mon,$intDayCnt,$st_year));
?>
<TR align=left bgColor=#ffffff>
<TD bgcolor=<?php $schedule[$intYoubi] ?>> <?php echo $intDayCnt."(".$youbi[$intspace].")" ?></TD>
<TD><BR></TD>
<TD><BR></TD>
<TD><BR></TD>
</TR>
<?php
}
?>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<br>
<br>
<hr width="967">
<?php
//コピーライト
include("include/copyright.inc");
?>
<input type="hidden" name="intseq" value="">
<input type="hidden" name="syain_cd" value="">
<input type="hidden" name="strwkdate" value="">
</form>
</BODY>
</HTML>