MET020.php
12.9 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
<?php
//*****************************************************************************
//*
//* プログラム名:電子会議室開設
//* プログラムID:MET020.php
//* 機能 :電子会議室開設
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include("include/STRING.inc");
include('./include/smarty.conf');
include("inc/header.inc");
include("inc/input_chk.inc");
include("inc/MET020.inc");
//メニューセット
include("menu_opacity.php");
$strDBinc="include/dbcon.inc";
include($strDBinc);
$strSQL="";
$objRec="null";
//カレンダー用 デフォは今日
$cal_st_y = date("Y");
$cal_st_m = date("m");
$cal_st_d = date("d");
$cal_ed_y = date("Y");
$cal_ed_m = date("m");
$cal_ed_d = date("d");
//新規開設画面設定
if($mode==1){
//DBアクセス
$strSQL = "select syain_cd, name_kj_sei, name_kj_mei from syain_tbl where del_flg=true order by disp_rank";
$recSyain = pg_exec($strSQL);
$strSQL = "select category_no, category_name, disp_rank from mst_kaigi_category order by disp_rank";
$recCategory = pg_exec($strSQL);
$strSQL = "select default_data from mst_default_data where data_no=1";
$recRule = pg_exec($strSQL);
$strSQL = "select syozoku_cd, bumon_name from mst_bumon where del_flg=0 order by disp_rank";
$recSection = pg_exec($strSQL);
if(($recSyain==false)||($recCategory==false)){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
//タイトル
$strTitle = "電子会議室"."(新規会議室開設)";
//テーマ
$strTheme = "";
//カテゴリ
if (pg_numrows($recCategory) != 0){
for($i=0;$i<pg_numrows($recCategory);$i++){
$objFetch = pg_fetch_object($recCategory, $i);
$strCategory .= "<option value=\"".$objFetch->category_no."\">".$objFetch->category_name."</option>";
}
}
//議案
$strMeasure = "";
//ルール
if (pg_numrows($recRule) != 0){
$objFetch = pg_fetch_object($recRule, 0);
$strRule = $objFetch->default_data;
}
//その他特記事項
$strEtc = "";
//開始日時
$strSYear = '<OPTION value="'.(Date("Y")).'" selected>'.(Date("Y")).'年</OPTION>';
$strSYear .= '<OPTION value="'.((Date("Y"))+1).'">'.(Date("Y")+1).'年</OPTION>';
$strSYear .= '<OPTION value="'.((Date("Y"))+2).'">'.(Date("Y")+2).'年</OPTION>';
$i = 01;
while ($i < 13) {
if ($i==date("m")) {
$strSMonth .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."月"."</option>";
} else {
$strSMonth .= "<OPTION VALUE=\"".$i."\">".$i."月"."</option>";
}
$i++;
}
$i = 01;
while ($i < 32) {
if ($i==date("d")) {
$strSDate .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."日"."</option>";
} else {
$strSDate .= "<OPTION VALUE=\"".$i."\">".$i."日"."</option>";
}
$i++;
}
$i = 00;
while ($i < 24) {
if ($i==date("H")) {
$strSHour .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."時"."</option>";
} else {
$strSHour .= "<OPTION VALUE=\"".$i."\">".$i."時"."</option>";
}
$i++;
}
//終了日時
$strEYear = $strSYear;
$strEMonth = $strSMonth;
$strEDate = $strSDate;
$strEHour = $strSHour;
//議長
if (pg_numrows($recSyain) != 0){
for($i=0;$i<pg_numrows($recSyain);$i++){
$objFetch = pg_fetch_object($recSyain, $i);
if ($objFetch->syain_cd == $PHP_SYAIN_CD ){
$strChairP .= "<option value=".$objFetch->syain_cd." selected>".$objFetch->name_kj_sei.$objFetch->name_kj_mei."</option>";
}else{
$strChairP .= "<option value=".$objFetch->syain_cd.">".$objFetch->name_kj_sei.$objFetch->name_kj_mei."</option>";
}
}
}
//会議参加者
$strRadioSP1 = "checked";
$strRadioSP2 = "";
//部門コンボ
if (pg_numrows($recSection) != 0){
for($i=0;$i<pg_numrows($recSection);$i++){
$objFetch = pg_fetch_object($recSection, $i);
$strSectionSP .= "<option value=".$objFetch->syozoku_cd.">".$objFetch->bumon_name."</option>";
}
}
//社員追加リスト
$strListSPADD = '<OPTION value="" > </OPTION>';
//社員リスト
for ($i = 0; $i < pg_numrows($recSyain); $i++) {
$objFetch = pg_fetch_object($recSyain, $i);
$strListSP .= "<OPTION value= ".$objFetch->syain_cd." selected>".$objFetch->name_kj_sei.$objFetch->name_kj_mei."</OPTION>";
}
//会議オブザーバ
$strRadioOB1 = "checked";
$strRadioOB2 = "";
//部門コンボ
$strSectionOB = $strSectionSP;
//社員追加リスト
$strListOBADD = '<OPTION value="" > </OPTION>';
//社員リスト
$strListOB = $strListSP;
//議事録作成者
if (pg_numrows($recSyain) != 0){
for($i=0;$i<pg_numrows($recSyain);$i++){
$objFetch = pg_fetch_object($recSyain, $i);
$strMinutesMK .= "<option value=".$objFetch->syain_cd.">".$objFetch->name_kj_sei.$objFetch->name_kj_mei."</option>";
}
}
//発言通知
$strNoticeY = "checked";
$strNoticeN .= "";
//サブミット
$strSubmit = "新規会議室開設";
//テンプレート
$strTPL = "MET020.tpl";
//修正
}elseif($mode==2){
//タイトル
$strTitle = "電子会議室"."(会議項目修正)";
$strSQL = "select category_no, theme, measure, meeting_rule, etc, date_start, date_end, chairperson, ";
$strSQL .= "list_spk, list_obs, minutes_maker, file_name, file_name_jp, notice_flg from kaigi_info_tbl where meeting_no = ".$mtgNo;
$recObj = pg_exec($strSQL);
if($recObj==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$objKaigi = pg_fetch_object($recObj, 0);
//テーマ
$strTheme = htmlspecialchars($objKaigi->theme);
//DBアクセス
$strSQL = "select category_no, category_name, disp_rank from mst_kaigi_category order by disp_rank";
$recCategory = pg_exec($strSQL);
if($recCategory==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
//カテゴリ
if (pg_numrows($recCategory) != 0){
for($i=0;$i<pg_numrows($recCategory);$i++){
$objFetch = pg_fetch_object($recCategory, $i);
if(($objFetch->category_no)==($objKaigi->category_no)){
$strCategory .= "<option value=\"".$objFetch->category_no."\" selected>".$objFetch->category_name."</option>";
}else{
$strCategory .= "<option value=\"".$objFetch->category_no."\">".$objFetch->category_name."</option>";
}
}
}
//議案
$strMeasure = $objKaigi->measure;
//ルール
$strRule = $objKaigi->meeting_rule;
//その他特記事項
$strEtc = $objKaigi->etc;
//通知フラグ
if(($objKaigi->notice_flg)==1){
$strNoticeY = "checked";
$strNoticeN = "";
}else{
$strNoticeY = "";
$strNoticeN = "checked";
}
$cal_st_y = substr(($objKaigi->date_start),0,4);
$cal_st_m = substr(($objKaigi->date_start),4,2);
$cal_st_d = substr(($objKaigi->date_start),6,2);
$cal_ed_y = substr(($objKaigi->date_end),0,4);
$cal_ed_m = substr(($objKaigi->date_end),4,2);
$cal_ed_d = substr(($objKaigi->date_end),6,2);
//開始日時
$intLoop=date("Y")-2005+2;
for ($i = 0 ; $i <= $intLoop ; $i++) {
$strChkYear=2005+$i;
$strSYear.= '<option value="'.$strChkYear.'"';
if ($strChkYear==((int) substr(($objKaigi->date_start),0,4))) {
$strSYear.= ' selected';
}
$strSYear.='>'.$strChkYear.'年</option>';
}
//$i = date("Y");
//while ($i < date("Y") + 3) {
// if ($i==((int) substr(($objKaigi->date_start),0,4))) {
// $strSYear .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."年"."</option>";
// } else {
// $strSYear .= "<OPTION VALUE=\"".$i."\">".$i."年"."</option>";
// }
// $i++;
//}
$i = 01;
while ($i < 13) {
if ($i==substr(($objKaigi->date_start),4,2)) {
$strSMonth .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."月"."</option>";
} else {
$strSMonth .= "<OPTION VALUE=\"".$i."\">".$i."月"."</option>";
}
$i++;
}
$i = 01;
while ($i < 32) {
if ($i==substr(($objKaigi->date_start),6,2)) {
$strSDate .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."日"."</option>";
} else {
$strSDate .= "<OPTION VALUE=\"".$i."\">".$i."日"."</option>";
}
$i++;
}
$i = 00;
while ($i < 24) {
if ($i==substr(($objKaigi->date_start),8,2)) {
$strSHour .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."時"."</option>";
} else {
$strSHour .= "<OPTION VALUE=\"".$i."\">".$i."時"."</option>";
}
$i++;
}
//終了日時
$intLoop=date("Y")-2005+2;
for ($i = 0 ; $i <= $intLoop ; $i++) {
$strChkYear=2005+$i;
$strEYear.= '<option value="'.$strChkYear.'"';
if ($strChkYear==((int) substr(($objKaigi->date_end),0,4))) {
$strEYear.= ' selected';
}
$strEYear.='>'.$strChkYear.'年</option>';
}
//$i = date("Y");
//while ($i < date("Y") + 3) {
// if ($i==((int) substr(($objKaigi->date_end),0,4))) {
// $strEYear .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."年"."</option>";
// } else {
// $strEYear .= "<OPTION VALUE=\"".$i."\">".$i."年"."</option>";
// }
// $i++;
//}
$i = 01;
while ($i < 13) {
if ($i==substr(($objKaigi->date_end),4,2)) {
$strEMonth .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."月"."</option>";
} else {
$strEMonth .= "<OPTION VALUE=\"".$i."\">".$i."月"."</option>";
}
$i++;
}
$i = 01;
while ($i < 32) {
if ($i==substr(($objKaigi->date_end),6,2)) {
$strEDate .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."日"."</option>";
} else {
$strEDate .= "<OPTION VALUE=\"".$i."\">".$i."日"."</option>";
}
$i++;
}
$i = 00;
while ($i < 24) {
if ($i==substr(($objKaigi->date_end),8,2)) {
$strEHour .= "<OPTION VALUE=\"".$i."\" selected='selected'>".$i."時"."</option>";
} else {
$strEHour .= "<OPTION VALUE=\"".$i."\">".$i."時"."</option>";
}
$i++;
}
//社員リスト
$listSP = $objKaigi->list_spk;
$arrTEMP = split("/", $listSP);
$j=0;
for($i=1;$i<count($arrTEMP)-1;$i++){
$strSQL = "select name_kj_sei, name_kj_mei from syain_tbl where syain_cd = '".$arrTEMP[$i]."'";
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$ftcData = pg_fetch_object($recData,0);
$arrSP[$j] = ($ftcData->name_kj_sei).($ftcData->name_kj_mei);
$j++;
}
//オブザーバ
$listOB = $objKaigi->list_obs;
if(trim($listOB) != "/"){
$arrTEMP = split("/", $listOB);
$j=0;
for($i=1;$i<count($arrTEMP)-1;$i++){
$strSQL = "select name_kj_sei, name_kj_mei from syain_tbl where syain_cd = '".$arrTEMP[$i]."'";
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$ftcData = pg_fetch_object($recData,0);
$arrOB[$i] = ($ftcData->name_kj_sei).($ftcData->name_kj_mei);
$j++;
}
}else{
$arrOB[0]="なし";
}
//添付資料
$strTemp = trim($objKaigi->file_name_jp);
$intFNum = 0;
if(trim($strTemp) != ""){
$arrFNJP = split("/",$strTemp);
$intFNum = count($arrFNJP);
}
//DBアクセス
$strSQL = "select syain_cd, name_kj_sei, name_kj_mei from syain_tbl where del_flg=true order by disp_rank";
$recSyain = pg_exec($strSQL);
if(($recSyain==false)||($recCategory==false)){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
//社員追加リスト 発言
$strListSPADD = '<OPTION value="" > </OPTION>';
//社員リスト 発言
for ($i = 0; $i < pg_numrows($recSyain); $i++) {
$objFetch = pg_fetch_object($recSyain, $i);
if(strpos(($listSP.$listOB), ("/".($objFetch->syain_cd)."/")) === false){
$strListSP .= "<OPTION value= ".$objFetch->syain_cd." selected>".$objFetch->name_kj_sei.$objFetch->name_kj_mei."</OPTION>";
}
}
//社員追加リスト オブザーバ
$strListOBADD = '<OPTION value="" > </OPTION>';
//社員リスト オブザーバ
$strListOB = $strListSP;
//テンプレート
$strTPL = "MET021.tpl";
}
$o_smarty->assign('strTitle',$strTitle);
$o_smarty->assign('strTheme',$strTheme);
$o_smarty->assign('strCategory',$strCategory);
$o_smarty->assign('strMeasure',$strMeasure);
$o_smarty->assign('strRule',$strRule);
$o_smarty->assign('strEtc',$strEtc);
$o_smarty->assign('strSYear',$strSYear);
$o_smarty->assign('strSMonth',$strSMonth);
$o_smarty->assign('strSDate',$strSDate);
$o_smarty->assign('strSHour',$strSHour);
$o_smarty->assign('strEYear',$strEYear);
$o_smarty->assign('strEMonth',$strEMonth);
$o_smarty->assign('strEDate',$strEDate);
$o_smarty->assign('strEHour',$strEHour);
$o_smarty->assign('strChairP',$strChairP);
$o_smarty->assign('strRadioSP1',$strRadioSP1);
$o_smarty->assign('strRadioSP2',$strRadioSP2);
$o_smarty->assign('strSectionSP',$strSectionSP);
$o_smarty->assign('strListSPADD',$strListSPADD);
$o_smarty->assign('strListSP',$strListSP);
$o_smarty->assign('strRadioOB1',$strRadioOB1);
$o_smarty->assign('strRadioOB2',$strRadioOB2);
$o_smarty->assign('strSectionOB',$strSectionOB);
$o_smarty->assign('strListOBADD',$strListOBADD);
$o_smarty->assign('strListOB',$strListOB);
$o_smarty->assign('strMinutesMK',$strMinutesMK);
$o_smarty->assign('strNoticeY',$strNoticeY);
$o_smarty->assign('strNoticeN',$strNoticeN);
$o_smarty->assign('strSubmit',$strSubmit);
$o_smarty->assign('mode',$mode);
$o_smarty->assign('mtgNo',$mtgNo);
$o_smarty->assign('arrFNJP',$arrFNJP);
$o_smarty->assign('intFNum',$intFNum);
$o_smarty->assign('arrSP',$arrSP);
$o_smarty->assign('arrOB',$arrOB);
$o_smarty->assign('PHP_TITLE_NAME',$PHP_TITLE_NAME[9]);
$o_smarty->assign('calYMD',$cal_st_y."/".$cal_st_m."/".$cal_st_d);
$o_smarty->assign('calYMD2',$cal_ed_y."/".$cal_ed_m."/".$cal_ed_d);
$o_smarty->assign('PHP_E_GRU_CAPA_OVER',$_SESSION["PHP_E_GRU_CAPA_OVER"]);
$o_smarty->display($strTPL);