MTG011_m.php
16 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
460
461
462
463
464
465
466
<?php
//*****************************************************************************
//*
//* プログラム名:電子会議室
//* プログラムID:MTG011_m.php
//* 機能 :電子会議室.確認
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=Shift_JIS");
//*** 共通処理 ***//
include("include_m/CommonProcess.inc");
//*** 文字列処理 ***//
include("include_m/STRING.inc");
//*** メール送信処理 ***//
include("../inc/mail_add.inc");
//*** URL取得処理 ***//
include("include_m/CommonUrlGet.inc");
//*** 電子会議 ***
$strMenuSQL = "SELECT name FROM sub_menu_TBL WHERE url = 'MET010.php'";
$rsRecset = pg_exec($strMenuSQL);
$PHP_TITLE_NAME=mb_convert_encoding(pg_result($rsRecset,0,"name"), "SJIS", "EUC-JP");
//*** 会議カテゴリ名 ****//
$strSQL = "select * from mst_kaigi_category ";
$strSQL .= " WHERE category_no=$ctgno";
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$recSet = pg_fetch_object($recData, 0);
$PHP_TITLE_NAME.="(".mb_convert_encoding($recSet->category_name, "SJIS", "EUC-JP").")";
$strHidden = '<INPUT TYPE="hidden" NAME="ctgno" VALUE="'.$ctgno.'">';
$strHidden .= '<INPUT TYPE="hidden" NAME="mtgNo" VALUE="'.$mtgNo.'">';
$strHidden .= '<INPUT TYPE="hidden" NAME="remNo" VALUE="'.$remNo.'">';
$strValue = '&ctgno='.$ctgno.'&mtgNo='.$mtgNo.'&remNo='.$remNo.'&Pg='.$Pg.'&selDisp='.$selDisp;
switch ($intSts) {
case "確認":
$strSQL = "update pkaigi_tbl set read_flg = 1 ";
$strSQL .= "where syain_cd = '".$PHP_SYAIN_CD."' ";
$strSQL .= "and meeting_no = ".$mtgNo." ";
$strSQL .= "and remark_no = ".$remNo." ";
$strSQL .= "and answer_no = ".$ansNo." ";
$strSQL .= "and cp_answer_no = ".$cpNo;
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
header("Location: ./MTG004_m.php?".$PHP_Argument.$strValue);
break;
case "発言停止":
$strSQL = "update kaigi_tbl set stop_flg = 1 ";
$strSQL .= "where meeting_no = ".$mtgNo." ";
$strSQL .= "and remark_no = ".$remNo." ";
$strSQL .= "and answer_no = ".$ansNo." ";
$strSQL .= "and cp_answer_no = ".$cpNo;
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
header("Location: ./MTG004_m.php?".$PHP_Argument.$strValue);
break;
case "発言再開":
$strSQL = "update kaigi_tbl set stop_flg = 0 ";
$strSQL .= "where meeting_no = ".$mtgNo." ";
$strSQL .= "and remark_no = ".$remNo." ";
$strSQL .= "and answer_no = ".$ansNo." ";
$strSQL .= "and cp_answer_no = ".$cpNo;
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
header("Location: ./MTG004_m.php?".$PHP_Argument.$strValue);
break;
case "修正する":
$strSQL="select remark_no, kaigi_info_tbl.theme, kaigi_info_tbl.notice_flg from kaigi_tbl ";
$strSQL.="join kaigi_info_tbl on kaigi_info_tbl.meeting_no = kaigi_tbl.meeting_no ";
$strSQL.="where kaigi_tbl.meeting_no = ".$mtgNo." order by remark_no DESC";
$recRemNo=pg_exec($strSQL);
if($recRemNo==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($recRemNo) > 0){
$objNo = pg_fetch_object($recRemNo, 0);
$txtTheme = ($objNo->theme);
$intNotice = (int)$objNo->notice_flg;
}
//** 発言者名前取得 **//
$strSQLNm="SELECT name_kj_sei,name_kj_mei FROM syain_tbl Where syain_cd='$PHP_SYAIN_CD'";
$objNm = pg_exec($strSQLNm);
if($objNm==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$objNmData = pg_fetch_object($objNm, 0);
$strNameData=mb_convert_encoding($objNmData->name_kj_sei." ".$objNmData->name_kj_mei, "SJIS", "EUC-JP");
//** PC版 **//
$strMail[0] = "会議で発言に修正がありました\n";
$strMail[0] .= "【会議テーマ】\n";
$strMail[0] .= mb_convert_encoding($txtTheme, "SJIS", "SJIS")."\n";
$strMail[0] .= "【発言】\n";
$strMail[0] .= mb_convert_encoding($M, "SJIS", "SJIS")."\n";
$strMail[0] .= "【発言者】\n";
$strMail[0] .= $strNameData."\n";
//** 携帯版 **//
$strMobile = "会議で発言に修正がありました\n";
$strMobile .= "【会議テーマ】\n";
$strMobile .= mb_convert_encoding($txtTheme, "SJIS", "SJIS")."\n";
$strMobile .= "【発言】\n";
$strMobile .= mb_convert_encoding($M, "SJIS", "SJIS")."\n";
$strMobile .= "【発言者】\n";
$strMobile .= $strNameData."\n";
$strMobile = mb_convert_encoding($strMobile, "euc-jp", "SJIS");
//発言修正
$strSQL = "update kaigi_tbl set speak = '".(mb_convert_encoding(addslashes($M), "EUC-JP", "SJIS"))."',";
$strSQL .=" date = '".date("YmdHi")."' ";
$strSQL .= "where meeting_no = ".$mtgNo." ";
$strSQL .= "and remark_no = ".$remNo." ";
$strSQL .= "and answer_no = ".$ansNo." ";
$strSQL .= "and cp_answer_no = ".$cpNo;
$execIns =pg_exec($strSQL);
if($execIns==false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
//お知らせ者取得
$strSQL="select category_no, list_spk, list_obs from kaigi_info_tbl where meeting_no = ".$mtgNo;
$recList=pg_exec($strSQL);
if($recList==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$objList = pg_fetch_object($recList, 0);
$strList=($objList->list_spk);
$arrSPK = split("/",$strList);
for($i=1;$i<count($arrSPK)-1;$i++){
//本人?
if($arrSPK[$i] == $PHP_SYAIN_CD){
$read_flg=1;
}else{
$read_flg=0;
//開設メール配信
if($intNotice == 1){
$strMail[1] = $strMobile;
if ($PHP_MOBILE_NAME==0){
$strMail[1] .= "\n".$UrlHead_MB."MTG004_m.php?P_SYAIN_CD=".$arrSPK[$i]."&P_FOLDER=".$PHP_FOLDER;
$strMail[1] .= "&ctgno=".$ctgno."&mtgNo=".$mtgNo."&remNo=".$remNo;
}
if(subMailIns($mtgNo,3,3,$arrSPK[$i],"000000000000",$strMail) == false){
echo ("SQL実行に失敗しました(INSERT)");
exit;
}
}
}
$strSQL = "update pkaigi_tbl set read_flg = ".$read_flg." ";
$strSQL .= "where syain_cd = '".$arrSPK[$i]."' ";
$strSQL .= "and meeting_no = ".$mtgNo." ";
$strSQL .= "and remark_no = ".$remNo." ";
$strSQL .= "and answer_no = ".$ansNo." ";
$strSQL .= "and cp_answer_no = ".$cpNo;
$execIns =pg_exec($strSQL);
if($execIns==false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
}
//対象検索 オブザーバ
$strList=($objList->list_obs);
$arrOBS = split("/",$strList);
if(count($arrOBS)>0){
for($i=1;$i<count($arrOBS)-1;$i++){
//本人?
if($arrOBS[$i] == $PHP_SYAIN_CD){
$read_flg=1;
}else{
$read_flg=0;
//開設メール配信
if($intNotice == 1){
$strMail[1] = $strMobile;
if ($PHP_MOBILE_NAME==0){
$strMail[1] .= "\n".$UrlHead_MB."MTG004_m.php?P_SYAIN_CD=".$arrOBS[$i]."&P_FOLDER=".$PHP_FOLDER;
$strMail[1] .= "&ctgno=".$ctgno."&mtgNo=".$mtgNo."&remNo=".$remNo;
}
if(subMailIns($mtgNo,3,3,$arrOBS[$i],"000000000000",$strMail) == false){
echo ("SQL実行に失敗しました(INSERT)");
exit;
}
}
}
$strSQL = "update pkaigi_tbl set read_flg = ".$read_flg." ";
$strSQL .= "where syain_cd = '".$arrOBS[$i]."' ";
$strSQL .= "and meeting_no = ".$mtgNo." ";
$strSQL .= "and remark_no = ".$remNo." ";
$strSQL .= "and answer_no = ".$ansNo." ";
$strSQL .= "and cp_answer_no = ".$cpNo;
if($execIns==false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
}
}
header("Location: ./MTG004_m.php?".$PHP_Argument.$strValue);
break;
case "返信する":
$strSQL="select remark_no, kaigi_info_tbl.theme, kaigi_info_tbl.notice_flg from kaigi_tbl ";
$strSQL.="join kaigi_info_tbl on kaigi_info_tbl.meeting_no = kaigi_tbl.meeting_no ";
$strSQL.="where kaigi_tbl.meeting_no = ".$mtgNo." order by remark_no DESC";
$recRemNo=pg_exec($strSQL);
if($recRemNo==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($recRemNo) > 0){
$objNo = pg_fetch_object($recRemNo, 0);
$txtTheme = ($objNo->theme);
$intNotice = (int)$objNo->notice_flg;
}
//** 発言者名前取得 **//
$strSQLNm="SELECT name_kj_sei,name_kj_mei FROM syain_tbl Where syain_cd='$PHP_SYAIN_CD'";
$objNm = pg_exec($strSQLNm);
if($objNm==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$objNmData = pg_fetch_object($objNm, 0);
$strNameData=mb_convert_encoding($objNmData->name_kj_sei." ".$objNmData->name_kj_mei, "SJIS", "EUC-JP");
//** PC版 **//
$strMail[0] = "会議で議案に対する新しい発言がありました\n";
$strMail[0] .= "【会議テーマ】\n";
$strMail[0] .= mb_convert_encoding($txtTheme, "SJIS", "SJIS")."\n";
$strMail[0] .= "【発言】\n";
$strMail[0] .= mb_convert_encoding($M, "SJIS", "SJIS")."\n";
$strMail[0] .= "【発言者】\n";
$strMail[0] .= $strNameData."\n";
//** 携帯版 **//
$strMobile = "会議で議案に対する新しい発言がありました\n";
$strMobile .= "【会議テーマ】\n";
$strMobile .= mb_convert_encoding($txtTheme, "SJIS", "SJIS")."\n";
$strMobile .= "【発言】\n";
$strMobile .= mb_convert_encoding($M, "SJIS", "SJIS")."\n";
$strMobile .= "【発言者】\n";
$strMobile .= $strNameData."\n";
$strMobile = mb_convert_encoding($strMobile, "euc-jp", "SJIS");
$strSQL ="select cp_answer_no from kaigi_tbl ";
$strSQL .= "where meeting_no = ".$mtgNo." ";
$strSQL .= "and remark_no = ".$remNo." ";
$strSQL .= "and answer_no = ".$ansNo." ";
$strSQL.=" order by cp_answer_no DESC";
$recRemNo=pg_exec($strSQL);
if($recRemNo==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($recRemNo) > 0){
$objNo = pg_fetch_object($recRemNo, 0);
$intRemNo=($objNo->cp_answer_no) +1;
}else{
$intRemNo=1;
}
//発言登録
$strSQL = "insert into kaigi_tbl (meeting_no, remark_no, answer_no, cp_answer_no, speak, person, date) ";
$strSQL .= "values(";
$strSQL .= $mtgNo.", ";
$strSQL .= $remNo.", ";
$strSQL .= $ansNo.", ";
$strSQL .= $intRemNo.", '";
$strSQL .= mb_convert_encoding(addslashes($M), "EUC-JP", "SJIS")."', '";
$strSQL .= $PHP_SYAIN_CD."', '";
$strSQL .= date("YmdHi")."')";
$execIns =pg_exec($strSQL);
if($execIns==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
//個人用テーブル設定
//対象検索 発言者
$strSQL="select category_no, list_spk, list_obs, notice_flg, theme from kaigi_info_tbl where meeting_no = ".$mtgNo;
$recList=pg_exec($strSQL);
if($recList==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$objList = pg_fetch_object($recList, 0);
$intCtgNo=($objList->category_no); //カテゴリ番号
$strList=($objList->list_spk);
$txtTheme = ($objList->theme);
$intNotice = (int)$objList->notice_flg;
$arrSPK = split("/",$strList);
for($i=1;$i<count($arrSPK)-1;$i++){
//本人?
if($arrSPK[$i] == $PHP_SYAIN_CD){
$read_flg=1;
}else{
$read_flg=0;
}
$strSQL = "insert into pkaigi_tbl (syain_cd, meeting_no, remark_no, answer_no, cp_answer_no, category_no, speak_flg, read_flg) ";
$strSQL .= "values('".$arrSPK[$i]."', ".$mtgNo.", ".$remNo.", ".$ansNo.", ".$intRemNo.", ".$intCtgNo.", 1, ".$read_flg.")";
$execIns =pg_exec($strSQL);
if($execIns==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
//開設メール配信
if($intNotice == 1 && $read_flg = 0){
$strMail[1] = $strMobile;
if ($PHP_MOBILE_NAME==0){
$strMail[1] .= "\n".$UrlHead_MB."MTG004_m.php?P_SYAIN_CD=".$arrSPK[$i]."&P_FOLDER=".$PHP_FOLDER;
$strMail[1] .= "&ctgno=".$ctgno."&mtgNo=".$mtgNo."&remNo=".$remNo;
}
if(subMailIns($mtgNo,3,3,$arrSPK[$i],"000000000000",$strMail) == false){
echo ("SQL実行に失敗しました(INSERT)");
exit;
}
}
}
//対象検索 オブザーバ
$strList=($objList->list_obs);
$arrOBS = split("/",$strList);
if(count($arrOBS)>0){
for($i=1;$i<count($arrOBS)-1;$i++){
$strSQL = "insert into pkaigi_tbl (syain_cd, meeting_no, remark_no, answer_no, cp_answer_no, category_no, speak_flg, read_flg) ";
$strSQL .= "values('".$arrOBS[$i]."', ".$mtgNo.", ".$remNo.", ".$ansNo.", ".$intRemNo.", ".$intCtgNo.", 0, 0)";
if($execIns==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
//開設メール配信
if($intNotice == 1){
$strMail[1] = $strMobile;
if ($PHP_MOBILE_NAME==0){
$strMail[1] .= "\n".$UrlHead_MB."MTG004_m.php?P_SYAIN_CD=".$arrOBS[$i]."&P_FOLDER=".$PHP_FOLDER;
$strMail[1] .= "&ctgno=".$ctgno."&mtgNo=".$mtgNo."&remNo=".$remNo;
}
if(subMailIns($mtgNo,3,3,$arrOBS[$i],"000000000000",$strMail) == false){
echo ("SQL実行に失敗しました(INSERT)");
exit;
}
}
}
}
header("Location: ./MTG004_m.php?".$PHP_Argument.$strValue);
break;
case "修正":
case "返信":
if ($intSts=="修正"){
$strSQL = "select kaigi_tbl.meeting_no, kaigi_tbl.remark_no, kaigi_tbl.answer_no, kaigi_tbl.cp_answer_no, speak, person ,date, syain_tbl.name_kj_sei, syain_tbl.name_kj_mei, pkaigi_tbl.read_flg, stop_flg ";
$strSQL .= "from kaigi_tbl ";
$strSQL .= "join pkaigi_tbl on pkaigi_tbl.syain_cd = '".$PHP_SYAIN_CD."'";
$strSQL .= " and kaigi_tbl.meeting_no = pkaigi_tbl.meeting_no ";
$strSQL .= "and kaigi_tbl.remark_no = pkaigi_tbl.remark_no ";
$strSQL .= "and kaigi_tbl.answer_no = pkaigi_tbl.answer_no ";
$strSQL .= "and kaigi_tbl.cp_answer_no = pkaigi_tbl.cp_answer_no ";
$strSQL .= "join syain_tbl on syain_tbl.syain_cd = kaigi_tbl.person ";
$strSQL .= "where kaigi_tbl.cp_answer_no = ".$cpNo." and ";
$strSQL .= "kaigi_tbl.meeting_no = ".$mtgNo." ";
$strSQL .= "and kaigi_tbl.answer_no = ".$ansNo." ";
$strSQL .= "AND kaigi_tbl.remark_no = ".$remNo." ";
$strSQL .= "order by kaigi_tbl.remark_no desc, kaigi_tbl.answer_no desc, kaigi_tbl.cp_answer_no desc";
$recKaigi=pg_exec($strSQL);
if($recKaigi==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$ftcKaigi = pg_fetch_object($recKaigi, 0);
$speak=mb_convert_encoding($ftcKaigi->speak, "SJIS", "EUC-JP" );
}else{
$speak="";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<META http-equiv="Content-Style-Type" content="text/css">
<TITLE>E-グルPro(<?php echo $PHP_TITLE_NAME ?>)</TITLE>
</HEAD>
<BODY>
<center>
<form Method="GET" action="MTG011_m.php">
<?php echo $PHP_TITLE_NAME ?><br>
<?php echo $strName; ?>
<HR width="100%">
</center>
<?php
//メニュー表示
include("include_m/CommonMenuReturn.inc");
?>
<HR width="100%">
<!--
<a href="MTG001_m.php?<?php echo $PHP_Argument ?>">カテゴリ一覧</A>
<a href="MTG002_m.php?<?php echo $PHP_Argument ?>&ctgno=<?php echo $ctgno ?>">テーマ一覧</A>
<a href="MTG003_m.php?<?php echo $PHP_Argument ?>&ctgno=<?php echo $ctgno ?>&mtgNo=<?php echo $mtgNo ?>">発言一覧</A>
-->
<a href="MTG004_m.php?<?php echo $PHP_Argument.$strValue; ?>"accesskey="1"><?php echo Get_Num("1"); ?>戻る</A>
<br>
<TEXTAREA name="M" rows="5" wrap="virtual" cols="20"><?php echo $speak; ?></TEXTAREA><br>
<input type="submit" name="intSts" value="<?php echo $intSts; ?>する"><BR>
<!--
<a href="MTG001_m.php?<?php echo $PHP_Argument ?>">カテゴリ一覧</A>
<a href="MTG002_m.php?<?php echo $PHP_Argument ?>&ctgno=<?php echo $ctgno ?>">テーマ一覧</A>
<a href="MTG003_m.php?<?php echo $PHP_Argument ?>&ctgno=<?php echo $ctgno ?>&mtgNo=<?php echo $mtgNo ?>">発言一覧</A>
-->
<a href="MTG004_m.php?<?php echo $PHP_Argument.$strValue; ?>"accesskey="1"><?php echo Get_Num("1"); ?>戻る</A>
<HR width="100%">
<?php
//メニュー表示
include("include_m/CommonMenuReturn.inc");
?>
<INPUT TYPE="hidden" NAME="ctgno" VALUE="<?php echo $ctgno ?>">
<INPUT TYPE="hidden" NAME="mtgNo" VALUE="<?php echo $mtgNo ?>">
<INPUT TYPE="hidden" NAME="remNo" VALUE="<?php echo $remNo ?>">
<INPUT TYPE="hidden" NAME="ansNo" VALUE="<?php echo $ansNo ?>">
<INPUT TYPE="hidden" NAME="cpNo" VALUE="<?php echo $cpNo ?>">
<INPUT TYPE="hidden" NAME="Pg" VALUE="<?php echo $Pg ?>">
<INPUT TYPE="hidden" NAME="selDisp" VALUE="<?php echo $selDisp ?>">
<?php include("include_m/CommonHidden.inc"); ?>
</form>
</BODY>
</HTML>
<?php
break;
}
?>