CON006_3.php
6.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?php
//*****************************************************************************
//*
//* プログラム名:電子決裁設定
//* プログラムID:CON006_3
//* 機能 :
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include("include/dbcon.inc");
include("include/input_chk.inc");
include("inc/CON006_3.inc");
$sinsei_name = addslashes($sinsei_name);
$strTypeArray=split("<///>",$sinsei_name);
$strSinseiType=$strTypeArray[0];
$strTypeName=$strTypeArray[1];
//社員情報取得
$strSQLSyain = "SELECT syain_cd,name_kj_sei,name_kj_mei FROM syain_tbl WHERE del_flg=true Order by disp_rank" ;
$rsRecSyain = pg_exec($pg_con,$strSQLSyain);
if($rsRecSyain==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
//メニュー
include("menu_opacity.php");
?>
<form name="e_gru">
<?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("CON006HLP.htm")'><img src="image/help.gif" border="0"></a> <a href='javascript:Disp_Help("CON006HLP.htm")'>ヘルプ</a></div></th>
</tr>
</table>
<div align="right"></div>
</td>
</tr>
</table>
<br>
<span class="Normalfont"><?php echo htmlspecialchars($strTypeName)."の決裁者設定" ?></span><br>
<table width="402" border="0" cellspacing="1" cellpadding="1" bgcolor="#9999ff">
<tr><td>
<table cellspacing="1" cellpadding="1" width="400" border="0">
<TR bgcolor="#ffffff">
<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第一次決済者</span></TD>
<TD>
<SELECT name="syain_cd1">
<OPTION value="">-----</OPTION>
<?php
for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
//決裁者情報取得
$strSQL = "SELECT kessaisya_cd1 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd1='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
$rsRecKessai = pg_exec($pg_con,$strSQL);
if($rsRecKessai==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($rsRecKessai)==1) {
$strChk=" selected";
}else{
$strChk="";
}
echo " <OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
}
?>
</SELECT>
</TD>
</TR>
<TR bgcolor="#ffffff">
<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第二次決済者</span></TD>
<TD>
<SELECT name="syain_cd2">
<OPTION value="">-----</OPTION>
<?php
for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
//決裁者情報取得
$strSQL = "SELECT kessaisya_cd2 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd2='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
$rsRecKessai = pg_exec($pg_con,$strSQL);
if($rsRecKessai==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($rsRecKessai)==1) {
$strChk=" selected";
}else{
$strChk="";
}
echo " <OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
}
?>
</SELECT>
</TD>
</TR>
<TR bgcolor="#ffffff">
<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第三次決済者</span></TD>
<TD>
<SELECT name="syain_cd3">
<OPTION value="">-----</OPTION>
<?php
for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
//決裁者情報取得
$strSQL = "SELECT kessaisya_cd3 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd3='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
$rsRecKessai = pg_exec($pg_con,$strSQL);
if($rsRecKessai==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($rsRecKessai)==1) {
$strChk=" selected";
}else{
$strChk="";
}
echo " <OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
}
?>
</SELECT>
</TD>
</TR>
<TR bgcolor="#ffffff">
<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第四次決済者</span></TD>
<TD>
<SELECT name="syain_cd4">
<OPTION value="">-----</OPTION>
<?php
for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
//決裁者情報取得
$strSQL = "SELECT kessaisya_cd4 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd4='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
$rsRecKessai = pg_exec($pg_con,$strSQL);
if($rsRecKessai==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($rsRecKessai)==1) {
$strChk=" selected";
}else{
$strChk="";
}
echo " <OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
}
?>
</SELECT>
</TD>
</TR>
<TR bgcolor="#ffffff">
<TD width="100" bgcolor="#ccccff"><span class="Normalfont">第五次決済者</span></TD>
<TD>
<SELECT name="syain_cd5">
<OPTION value="">-----</OPTION>
<?php
for ($intCnt = 0; $intCnt < pg_numrows($rsRecSyain); $intCnt++) {
//決裁者情報取得
$strSQL = "SELECT kessaisya_cd5 FROM kessaisya_tbl WHERE sinsei_syubetu=".$strSinseiType." AND kessaisya_cd5='".pg_result($rsRecSyain,$intCnt,"syain_cd")."'";
$rsRecKessai = pg_exec($pg_con,$strSQL);
if($rsRecKessai==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($rsRecKessai)==1) {
$strChk=" selected";
}else{
$strChk="";
}
echo " <OPTION value=\"".pg_result($rsRecSyain,$intCnt,"syain_cd")."\"".$strChk.">". pg_result($rsRecSyain,$intCnt,"name_kj_sei").pg_result($rsRecSyain,$intCnt,"name_kj_mei")."</OPTION>\n";
}
?>
</SELECT>
</TD>
</TR>
</table>
</td></tr>
</table>
<table width="402" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD height="40" width="402" align="center"><INPUT type="button" onclick="return chk();" value=" 設 定 " name="set"> <INPUT type="button" onclick="return back();" value=" 戻 る " name="modoru"></TD>
</TR>
</table>
<br>
<hr width="100%">
<input type="hidden" name="sinsei_type" value="<?php echo $strSinseiType?>">
<?php }else{ ?>
<a href="TOP000.php"><span class="Normalfont">マスタ変更権限がありません</span></a>
<?php } ?>
</form>
<?php
//コピーライト
include("include/copyright.inc");
?>