MET950.php
5.17 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
<?php
//*****************************************************************************
//*
//* プログラム名:電子会議室
//* プログラムID:MET950.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 cp_answer_no from kaigi_tbl where meeting_no = ".$mtgNo." and remark_no = ".$remNo." and answer_no = ".$ansNo." 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(".$mtgNo.", ".$remNo.", ".$ansNo.", ".$intRemNo.", '".addslashes($txtAnswer)."', '".$PHP_SYAIN_CD."', '".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;
//** 発言者名前取得 **//
$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] .= addslashes($strNameData)."\n";
//20081023 追加
$strMail[0] .= "\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 .= addslashes($strNameData)."\n";
//20081023 追加
$strMobile .= "\n※このメールは、送信専用メールアドレスから配信されています。\nご返信いただいても配信元へは届きませんのでご了承ください。";
$arrSPK = split("/",$strList);
for($i=1;$i<count($arrSPK)-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('".$arrSPK[$i]."', ".$mtgNo.", ".$remNo.", ".$ansNo.", ".$intRemNo.", ".$intCtgNo.", 1, 0)";
$execIns =pg_exec($strSQL);
if($execIns==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
//開設メール配信
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;
}
}
}
//対象検索 オブザーバ
$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_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;
}
}
}
}
?>
<script language="javascript">
function DoSubmit(){
document.e_gru.action = "MET030.php";
document.e_gru.method="POST";
document.e_gru.submit();
return false;
}
</script>
<body onload="DoSubmit()">
<form name = "e_gru" method="post">
<input name='mtgNo' type="hidden" value="<?php echo $mtgNo ?>">
<input name='remNo' type="hidden" value="<?php echo $remNo ?>">
<input name='ansNo' type="hidden" value="<?php echo $ansNo ?>">
</form>
</body>