MTG004_m.php
12.7 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
<?php
//*****************************************************************************
//*
//* プログラム名:会議(携帯電話)
//* プログラムID:MTG004_m.php
//* 機能 :会議
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=Shift_JIS");
//*** 広告 ***//
include("include_m/Advertisement.inc");
//*** 共通処理 ***//
include("include_m/CommonProcess.inc");
//*** 文字列処理 ***//
include("include_m/STRING.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").")";
if ($Pg==""){
$Pg=0;
}
$strValue = '&ctgno='.$ctgno.'&mtgNo='.$mtgNo.'&remNo='.$remNo.'&selDisp='.$selDisp;
$strHidden = '<INPUT TYPE="hidden" NAME="ctgno" VALUE="'.$ctgno.'">';
$strHidden .= '<INPUT TYPE="hidden" NAME="mtgNo" VALUE="'.$mtgNo.'">';
$strHidden .= '<INPUT TYPE="hidden" NAME="remNo" VALUE="'.$remNo.'">';
$strHidden .= '<INPUT TYPE="hidden" NAME="selDisp" VALUE="'.$selDisp.'">';
$strDate = date("Y").date("m").date("d").date("H");
if ($selDisp==""){
$selDisp=1;
}
?>
<!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>
<?php echo $PHP_TITLE_NAME ?><br>
<?php echo $strName; ?>
<HR width="100%">
<?php echo $koukokuTEL; ?>
</center>
<?php
//メニュー表示
include("include_m/CommonMenuReturn.inc");
?>
<HR width="100%">
<a href="MTG001_m.php?<?php echo $PHP_Argument.'&selDisp='.$selDisp; ?>"accesskey="1"><?php echo Get_Num("1"); ?>カテゴリ一覧</A>
<a href="MTG002_m.php?<?php echo $PHP_Argument.'&ctgno='.$ctgno.'&selDisp='.$selDisp ?>"accesskey="2"><?php echo Get_Num("2"); ?>テーマ一覧</A>
<a href="MTG003_m.php?<?php echo $PHP_Argument.'&ctgno='.$ctgno.'&mtgNo='.$mtgNo.'&selDisp='.$selDisp ?>"accesskey="3"><?php echo Get_Num("3"); ?>発言一覧</A>
<br>
<?php
$strSQL = "select theme, measure, meeting_rule, etc,date_start, date_end, chairperson, minutes_maker, minutes, list_spk, list_obs, ";
$strSQL .= "file_name, file_name_jp, notice_flg, opener, mst_kaigi_category.category_name, mst_kaigi_category.category_no ";
$strSQL .= "from kaigi_info_tbl join mst_kaigi_category on mst_kaigi_category.category_no = kaigi_info_tbl.category_no ";
$strSQL .= "where meeting_no = ".$mtgNo;
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$ftcData = pg_fetch_object($recData,0);
$strCPNo = trim($ftcData->chairperson);
$date_end=$ftcData->date_end;
$strSyain = $ftcData->list_spk;
if(strpos($strSyain, "/".$PHP_SYAIN_CD."/") === false){
$strSpkFlg = 0;
}else{
$strSpkFlg = 1;
}
echo '【会議テーマ】<BR>';
echo str_replace ("\r\n","<br>",htmlspecialchars(mb_convert_encoding($ftcData->theme, "SJIS", "EUC-JP")));
echo '<br>';
$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."' and kaigi_tbl.meeting_no = pkaigi_tbl.meeting_no and kaigi_tbl.remark_no = pkaigi_tbl.remark_no and kaigi_tbl.answer_no = pkaigi_tbl.answer_no 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 = 0 and kaigi_tbl.meeting_no = ".$mtgNo." and kaigi_tbl.answer_no = 0 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);
$strTemp = $ftcKaigi->date;
$stop_flg=(int)$ftcKaigi->stop_flg;
$strTemp = ((int) substr($strTemp,4,2))."/".((int) substr($strTemp,6,2))." ".substr($strTemp,8,2).":".substr($strTemp,10,2)."";
echo '<form Method="GET" action="MTG011_m.php">';
echo '【議案】<br>';
echo "・".str_replace ("\r\n","<br> ",mb_convert_encoding($ftcKaigi->speak, "SJIS", "EUC-JP" ));
if ($ftcKaigi->read_flg==0){
echo '<input type="submit" name="intSts" value="確認">';
}
if ($strCPNo==$PHP_SYAIN_CD){
echo '<br>';
echo '<input type="submit" name="intSts" value="修正">';
if ($stop_flg==0){
echo '<input type="submit" name="intSts" value="発言停止">';
}else{
echo '<input type="submit" name="intSts" value="発言再開">';
}
}
echo '<br> ';
echo $strTemp;
echo "(".mb_convert_encoding($ftcKaigi->name_kj_sei, "SJIS", "EUC-JP").mb_convert_encoding($ftcKaigi->name_kj_mei, "SJIS", "EUC-JP").")";
echo '<br>';
echo $strHidden;
echo '<INPUT TYPE="hidden" NAME="ansNo" VALUE="0">';
echo '<INPUT TYPE="hidden" NAME="cpNo" VALUE="0">';
echo '<INPUT TYPE="hidden" NAME="Pg" VALUE="'.$Pg.'">';
include("include_m/CommonHidden.inc");
echo '</form>';
?>
<HR width="90%">
<?php if (($strSpkFlg == 1) && ($strDate<=$date_end) && ($stop_flg==0)){ ?>
<form Method="GET" action="MTG012_m.php">
【新規発言】<BR>
<TEXTAREA name="M" rows="5" wrap="virtual" cols="20"></TEXTAREA><br>
<input type="submit" value="発言する"><br>
<?php
echo $strHidden;
include("include_m/CommonHidden.inc");
?>
</form>
<HR width="90%">
<?php } ?>
<?php
$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."' and kaigi_tbl.meeting_no = pkaigi_tbl.meeting_no and kaigi_tbl.remark_no = pkaigi_tbl.remark_no and kaigi_tbl.answer_no = pkaigi_tbl.answer_no 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 = 0 and kaigi_tbl.meeting_no = ".$mtgNo." 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;
}
$max = pg_numrows($recKaigi)-1;
$intCnt=0;
for($i=0;$i<$max;$i++){
$ftcKaigi = pg_fetch_object($recKaigi, $i);
//発言内容
$strData[$intCnt][0] = " ".str_replace ("\r\n","<br> ",mb_convert_encoding($ftcKaigi->speak, "SJIS", "EUC-JP" ));
//既読フラグ
$strData[$intCnt][1] = $ftcKaigi->read_flg;
//発言日
$strTemp = $ftcKaigi->date;
$strTemp = ((int) substr($strTemp,4,2))."/".((int) substr($strTemp,6,2))." ".substr($strTemp,8,2).":".substr($strTemp,10,2)."";
$strData[$intCnt][2] = $strTemp;
//発言者
$strData[$intCnt][3] = mb_convert_encoding($ftcKaigi->name_kj_sei, "SJIS", "EUC-JP").
mb_convert_encoding($ftcKaigi->name_kj_mei, "SJIS", "EUC-JP");
//発言番号
$strData[$intCnt][4]=$ftcKaigi->answer_no;
//cpNo
$strData[$intCnt][5]=0;
//修正ボタン
if ($ftcKaigi->person==$PHP_SYAIN_CD){
$strData[$intCnt][6]=1;
}
$intCnt=$intCnt+1;
//議長発言
$strSQL = "select kaigi_tbl.cp_answer_no,kaigi_tbl.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."' and kaigi_tbl.meeting_no = pkaigi_tbl.meeting_no and kaigi_tbl.remark_no = pkaigi_tbl.remark_no and kaigi_tbl.answer_no = pkaigi_tbl.answer_no 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 > 0 and kaigi_tbl.meeting_no = ".$mtgNo." and kaigi_tbl.remark_no = ".$remNo." and kaigi_tbl.answer_no = ".($ftcKaigi->answer_no)." ";
$strSQL .= "order by cp_answer_no desc";
$recCP=pg_exec($strSQL);
if($recCP==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if(pg_numrows($recCP) > 0){
for($j=0;$j<pg_numrows($recCP);$j++){
$ftcCP = pg_fetch_object($recCP, $j);
//発言内容
$strData[$intCnt][0] = " ".str_replace ("\r\n","<br> ",mb_convert_encoding($ftcCP->speak, "SJIS", "EUC-JP" ));
//既読フラグ
$strData[$intCnt][1] = $ftcCP->read_flg;
//発言日
$strTemp = $ftcCP->date;
$strTemp = ((int) substr($strTemp,4,2))."/".((int) substr($strTemp,6,2))." ".substr($strTemp,8,2).":".substr($strTemp,10,2)."";
$strData[$intCnt][2] = $strTemp;
//発言者
$strData[$intCnt][3] = mb_convert_encoding($ftcCP->name_kj_sei, "SJIS", "EUC-JP").
mb_convert_encoding($ftcCP->name_kj_mei, "SJIS", "EUC-JP");
//発言番号
$strData[$intCnt][4]=$ftcCP->answer_no;
//cpNo
$strData[$intCnt][5]=1;
//修正ボタン
if ($ftcCP->person==$PHP_SYAIN_CD){
$strData[$intCnt][6]=1;
}
$intCnt=$intCnt+1;
}
}
}
$strChk=count($strData);
//終了ページの取得
$intEndCnt=5 * ($Pg+1);
if ($intEndCnt>$strChk){
$intEndCnt=$strChk;
}
if (($Pg > 0) && ($strChk > (5 * ($Pg+1)))){
$intPt1=$Pg-1;
$intPt2=$Pg+1;
echo '<a href="MTG004_m.php?'.$PHP_Argument.$strValue.'">[最新]</a>';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt1.$strValue.'">[前5件]</a>';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt2.$strValue.'">[次5件]</a>';
echo "<br>";
}elseif(($Pg > 0) && ($strChk <= (5 * ($Pg+1)))){
$intPt1=$Pg-1;
echo '<a href="MTG004_m.php?'.$PHP_Argument.$strValue.'">[最新]</a>';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt1.$strValue.'">[前5件]</a>';
// echo '[次5件]';
echo "<br>";
}elseif(($Pg == 0) && ($strChk > (5 * ($Pg+1)))){
$intPt2=$Pg+1;
echo '<a href="MTG004_m.php?'.$PHP_Argument.$strValue.'">[最新]</a>';
// echo '[前5件]';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt2.$strValue.'">[次5件]</a>';
echo "<br>";
}
echo "【発言】<br>";
for($i=5*$Pg;$i<$intEndCnt;$i++){
echo '<form Method="GET" action="MTG011_m.php">';
echo "・".$strData[$i][3];
echo " ".$strData[$i][2]."<br>";
$strButton="";
if ($strData[$i][1]==0){
$strButton.= ' <input type="submit" name="intSts" value="確認">';
}
if(($strCPNo == $PHP_SYAIN_CD) && ($strData[$i][5]==0) && ($strDate<=$date_end)){
$strButton.= ' <input type="submit" name="intSts" value="返信">';
}
if (($strData[$i][6]==1) && ($strDate<=$date_end)){
$strButton.= ' <input type="submit" name="intSts" value="修正">';
}
if ($strButton!=""){
echo $strButton.'<br>';
}
echo $strData[$i][0];
echo '<HR width="90%">';
echo $strHidden;
echo '<INPUT TYPE="hidden" NAME="ansNo" VALUE="'.$strData[$i][4].'">';
echo '<INPUT TYPE="hidden" NAME="cpNo" VALUE="'.$strData[$i][5].'">';
echo '<INPUT TYPE="hidden" NAME="Pg" VALUE="'.$Pg.'">';
include("include_m/CommonHidden.inc");
echo '</form>';
}
if (($Pg > 0) && ($strChk > (5 * ($Pg+1)))){
$intPt1=$Pg-1;
$intPt2=$Pg+1;
echo '<a href="MTG004_m.php?'.$PHP_Argument.$strValue.'">[最新]</a>';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt1.$strValue.'">[前5件]</a>';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt2.$strValue.'">[次5件]</a>';
echo "<br>";
}elseif(($Pg > 0) && ($strChk <= (5 * ($Pg+1)))){
$intPt1=$Pg-1;
echo '<a href="MTG004_m.php?'.$PHP_Argument.$strValue.'">[最新]</a>';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt1.$strValue.'">[前5件]</a>';
// echo '[次5件]';
echo "<br>";
}elseif(($Pg == 0) && ($strChk > (5 * ($Pg+1)))){
$intPt2=$Pg+1;
echo '<a href="MTG004_m.php?'.$PHP_Argument.$strValue.'">[最新]</a>';
// echo '[前5件]';
echo '<a href="MTG004_m.php?'.$PHP_Argument.'&Pg='.$intPt2.$strValue.'">[次5件]</a>';
echo "<br>";
}
?>
<br>
<a href="MTG001_m.php?<?php echo $PHP_Argument.'&selDisp='.$selDisp; ?>"accesskey="1"><?php echo Get_Num("1"); ?>カテゴリ一覧</A>
<a href="MTG002_m.php?<?php echo $PHP_Argument.'&ctgno='.$ctgno.'&selDisp='.$selDisp ?>"accesskey="2"><?php echo Get_Num("2"); ?>テーマ一覧</A>
<a href="MTG003_m.php?<?php echo $PHP_Argument.'&ctgno='.$ctgno.'&mtgNo='.$mtgNo.'&selDisp='.$selDisp ?>"accesskey="3"><?php echo Get_Num("3"); ?>発言一覧</A>
<HR width="100%">
<?php
//メニュー表示
include("include_m/CommonMenuReturn.inc");
?>
</BODY>
</HTML>