MET941.php
5.26 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
<?php
//*****************************************************************************
//*
//* プログラム名:電子会議室
//* プログラムID:MET941.php
//* 機能 :電子会議室.返信修正
//* 作成者 :
//*
//*****************************************************************************
include("include/session_start.inc");
include("include/SessionChk.inc");
$strDBinc="include/dbcon.inc";
include($strDBinc);
//*** URL取得処理 ***//
include("include/url_get.inc");
include("inc/mail_add.inc");
//発言停止チェック
$strSQL = "select kaigi_tbl.speak, kaigi_info_tbl.notice_flg, kaigi_info_tbl.theme, kaigi_tbl.stop_flg, kaigi_info_tbl.date_end, kaigi_info_tbl.date_start,kaigi_info_tbl.category_no ";
$strSQL .= "from kaigi_tbl join kaigi_info_tbl on kaigi_info_tbl.meeting_no = kaigi_tbl.meeting_no ";
$strSQL .= "where kaigi_tbl.meeting_no = ".$mtgNo." and kaigi_tbl.remark_no = ".$remNo." and kaigi_tbl.answer_no = 0 and kaigi_tbl.cp_answer_no = 0 ";
$recData=pg_exec($strSQL);
if($recData==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$ftcData = pg_fetch_object($recData,0);
if($ftcData->date_start > date("YmdH")){
echo "Err/当会議は開催前となっています";
exit;
}
if($ftcData->date_end <= date("YmdH")){
echo "Err/当会議は既に終了しています";
exit;
}
if($ftcData->stop_flg == "1"){
echo "Err/現在、発言は停止されています";
exit;
}
$txtTheme = ($ftcData->theme);
$intNotice = (int)$ftcData->notice_flg;
$intCtgNo =(int)$ftcData->category_no;
//** 発言者名前取得 **//
$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=$objNmData->name_kj_sei." ".$objNmData->name_kj_mei;
//**** メール本文 ****//
//** PC版 **//
$strMail[0] = "会議で発言に修正がありました\n";
$strMail[0] .= "【会議テーマ】\n";
$strMail[0] .= addslashes($txtTheme)."\n";
$strMail[0] .= "【修正発言】\n";
$strMail[0] .= mb_convert_encoding(addslashes($txtAns), "eucJP-win", "auto")."\n";
$strMail[0] .= "【発言者】\n";
$strMail[0] .= $strNameData."\n";
//20081023 追加
$strMail[0] .= "\n\n※このメールは、送信専用メールアドレスから配信されています。\nご返信いただいても配信元へは届きませんのでご了承ください。";
//** 携帯版 **//
$strMobile = "会議で発言に修正がありました\\n";
$strMobile .= "【会議テーマ】\n";
$strMobile .= addslashes($txtTheme)."\n";
$strMobile .= "【修正発言】\n";
$strMobile .= mb_convert_encoding(addslashes($txtAns), "eucJP-win", "auto")."\n";
$strMobile .= "【発言者】\n";
$strMobile .= $strNameData."\n";
//20081023 追加
$strMobile .= "\n※このメールは、送信専用メールアドレスから配信されています。\nご返信いただいても配信元へは届きませんのでご了承ください。";
//発言修正
$strSQL = "update kaigi_tbl set speak = '".(mb_convert_encoding(addslashes($txtAns), "eucJP-win", "auto"))."', date = '".date("YmdHi")."' ";
$strSQL .= "where meeting_no = ".$mtgNo." and remark_no = ".$remNo." and answer_no = ".$ansNo." and cp_answer_no = ".$cpansNo;
$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_FLG==0){
$strMail[1] .= "\n".$UrlHead_MB."MTG004_m.php?P_SYAIN_CD=".$arrSPK[$i]."&P_FOLDER=".$PHP_FOLDER_NAME;
$strMail[1] .= "&ctgno=".$intCtgNo."&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]."' and meeting_no = ".$mtgNo." and remark_no = ".$remNo." and answer_no = ".$ansNo." and cp_answer_no = ".$cpansNo;
$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_FLG==0){
$strMail[1] .= "\n".$UrlHead_MB."MTG004_m.php?P_SYAIN_CD=".$arrOBS[$i]."&P_FOLDER=".$PHP_FOLDER_NAME;
$strMail[1] .= "&ctgno=".$intCtgNo."&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]."' and meeting_no = ".$mtgNo." and remark_no = ".$remNo." and answer_no = ".$ansNo." and cp_answer_no = ".$cpansNo;
if($execIns==false){
echo("SQL実行に失敗しました(UPDATE)");
exit;
}
}
}
exit;
?>