CON011_1.php
5.66 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
151
152
153
154
155
<?php
//*****************************************************************************
//*
//* プログラム名:祝祭日名入力画面(新規・修正併用)
//* プログラムID:CON011_1
//* 機能 :祝祭日名を入力する
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
//*****************************************************************************
//* インクルードファイル
//*****************************************************************************
include("include/session_start.inc"); //セッション開始
include("include/SessionChk.inc"); //セッションチェック
include("include/dbcon.inc"); //DB接続
//*****************************************************************************
//* 画面制御
//*****************************************************************************
include("inc/header.inc"); //
include("include/input_chk.inc"); //
include("inc/CON011_1.inc"); //
include("menu_opacity.php"); //メニュー
switch ($_POST["sinki_edit_flg"]) {
case "sinki":
$strHolidayDateY = ""; //祝祭日年
$strHolidayDateM = ""; //祝祭日月
$strHolidayDateD = ""; //祝祭日日
$strHolidayName="";
$strSeq = "";
$strHolidayName = "";
break;
case "edit":
$strSql = "SELECT * FROM holiday_tbl WHERE seq= ".$_POST["seq"];
$rsResult = pg_exec($pg_con,$strSql);
$strHolidayDate = split("/",pg_result($rsResult,0,"holiday_date"));
if ($strHolidayDate) {
$strHolidayDateY = $strHolidayDate[0]; //祝祭日年
$strHolidayDateM = $strHolidayDate[1]; //祝祭日月
$strHolidayDateD = $strHolidayDate[2]; //祝祭日日
}else{
$strHolidayDateY = ""; //祝祭日年
$strHolidayDateM = ""; //祝祭日月
$strHolidayDateD = ""; //祝祭日日
}
$strSeq = pg_result($rsResult,0,"seq");
$strHolidayName = pg_result($rsResult,0,"holiday_name");
break;
}
?>
<form name="e_gru" method = "POST" onsubmit = "return false">
<?php if ($PHP_BIT[0]==1){ ?>
<table width="100%" border="0" cellspacing="0">
<tr>
<td class="midashi">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="50%" scope="col"><div align="left"><img src="image/t_kanri.gif" border="0"> 祝祭日設定</div></th>
<th width="50%" scope="col"><div align="right"><a href='javascript:Disp_Help("CON011HLP.htm")'><img src="image/help.gif" border="0"></a> <a href='javascript:Disp_Help("CON011HLP.htm")'>ヘルプ</a></div></th>
</tr>
</table>
<div align="right"></div>
</td>
</tr>
</table>
<br>
<span class="Chufont">*</span><span class="Normalfont">は入力必須項目です</span>
<table width="402" border="0" cellspacing="1" cellpadding="1" class="mainColor">
<tr>
<td>
<table cellspacing="1" cellpadding="1" width="400" border="0">
<tr bgcolor="#ffffff">
<td width="100" class="toneDown"><span class="Normalfont">祝祭日</span><span class="Chufont">*</span></td>
<td><span class="Normalfont">西暦</span><input type="text" maxlength="4" size="6" value="<?php echo $strHolidayDateY?>" name="holiday_year"><span class="Normalfont">年</span>
<select name="holiday_month">
<option value="">--月</option>
<?php
for ($i = 1 ; $i <= 12 ; $i++) {
if ($strHolidayDateM == $i) {
if (strlen($i)==1){
echo "<option value=\""."0".$i."\" selected>".$i."月</option>\n";
}else{
echo "<option value=$i selected>".$i."月</option>\n";
}
}else{
if (strlen($i)==1){
echo "<option value=\""."0".$i."\">".$i."月</option>\n";
}else{
echo "<option value=$i>".$i."月</option>\n";
}
}
}
?>
</select>
<select name="holiday_day">
<option value="">--日</option>
<?php
for ($i = 1 ; $i <= 31 ; $i++) {
if ($strHolidayDateD == $i) {
if (strlen($i)==1){
echo "<option value=\""."0".$i."\" selected>".$i."日</option>\n";
}else{
echo "<option value=$i selected>".$i."日</option>\n";
}
}else{
if (strlen($i)==1){
echo "<option value=\""."0".$i."\">".$i."日</option>\n";
}else{
echo "<option value=$i>".$i."日</option>\n";
}
}
}
?>
</select>
</td>
</tr>
<table cellspacing = "1" cellpadding = "1" width = "400" border = "0">
<tr bgcolor="#ffffff">
<td width="100" class="toneDown"><span class="Normalfont">祝祭日名</span><span class="Chufont">*</span></td>
<td><input type="text" maxLength="20" size="50" value="<?php echo $strHolidayName?>" name="holiday_name"></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="402" border="0" cellspacing="0" cellpadding="0">
<tr height = "40">
<td height="40" align="left">
<input type = "button" onclick = "return chk();" value = " 設 定 " name = "btn1">
</td>
<td height="40" align="center">
<input type = "reset" value = "ク リ ア">
</td>
<?php if($_POST["sinki_edit_flg"] == "edit") { ?>
<td height="40" align="center">
<input type = "button" onclick = "return dell_chk();" value = " 削 除 " name = "btn2">
</td>
<?php } ?>
<td height="40" align="right">
<input type = "button" onclick = "return back();" value = " 戻 る " name = "modoru">
</td>
</tr>
</table>
<input type="hidden" name="seq" value="<?php echo $strSeq; ?>">
<?php }else{ ?>
<a href="TOP000.php"><span class="Normalfont">マスタ変更権限がありません</span></a>
<?php } ?>
</form>
<?php
//コピーライト
include("include/copyright.inc");
?>