MNP900.php
3.67 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
<?php
//*****************************************************************************
//*
//* プログラム名:アンケート機能
//* プログラムID:MNP900.php
//* 機能 :アンケート作成画面
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
//***************************
//* インクルードファイル
//***************************
include("./include/session_start.inc");
include("./include/SessionChk.inc");
include("./inc/input_chk.inc");
//***************************
//* 画面制御
//***************************
include('./include/smarty.conf');
include("./inc/header.inc");
include("./menu_opacity.php"); //メニュー
include("./inc/MNP000.inc");
include("./include/dbcon.inc");
$o_smarty->assign('Send_User_Name', $Send_User_Name);
$o_smarty->assign('Send_User', $_REQUEST["Send_User"]);
//***********************************//
//* メイン処理 //
//***********************************//
//***** 個人orグループ *****//
$radSend = "";
if($_REQUEST["radSendPtn"] == "2"){
$radSend[1] = "checked";
}else{
$radSend[0] = "checked";
}
$o_smarty->assign('radSend', $radSend);
//***** 個人 *****//
$strSQL="SELECT * FROM syain_tbl WHERE syain_tbl.del_flg=true ORDER BY disp_rank";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
for ($intI = 0; $intI < pg_numrows($objRec); $intI++) {
$objData = pg_fetch_object($objRec, $intI);
$syain_list .= "<OPTION value= ".$objData->syain_cd.">".$objData->name_kj_sei.$objData->name_kj_mei."</OPTION>";
}
$syain_list .= '<OPTION value="" > </OPTION>';
$syain_add = '<OPTION value="" > </OPTION>';
$o_smarty->assign('syain_list',$syain_list);
$o_smarty->assign('syain_add' ,$syain_add);
//***** グループ *****//
$Group_List = "";
$strSQL = "SELECT syozoku_cd,bumon_name FROM mst_bumon WHERE del_flg=0 ORDER BY disp_rank";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました1(SELECT)");
exit;
}
for($intI = 0; $intI < pg_numrows($objRec); $intI++){
$objData = pg_fetch_object($objRec, $intI);
$Group_List .= " <input type=checkbox name=group_dat value=".$objData->syozoku_cd;
if (strchr($_REQUEST["group_id"],"/".$objData->syozoku_cd."/")!=false){
$Group_List .= " checked";
}
$Group_List .= ">".$objData->bumon_name."<BR>";
}
$o_smarty->assign('Group_List', $Group_List);
//***** 件名・本文 *****//
$o_smarty->assign('Mail_Subject',stripslashes($_REQUEST["Mail_Subject"])); //件名
$o_smarty->assign('Mail_Body' ,stripslashes($_REQUEST["Mail_Body"])); //本文
//***** 選択肢数 *****//
$kouhoMax = 10;
$optKouho = "";
for($intI=1;$intI<=$kouhoMax;$intI++){
if($intI == $_REQUEST["kouho"]){
$optKouho .= "<option value='".($intI)."' selected>".$intI."</option>";
}else{
$optKouho .= "<option value='".($intI)."'>".$intI."</option>";
}
}
$o_smarty->assign('optKouho', $optKouho);
//***** 選択肢数 *****//
$kouhoData = "";
for($intI=0;$intI<$kouhoMax;$intI++){
//番号
$kouhoData[$intI][0] = $intI + 1;
//開始年
$kouhoData[$intI][1] = $_REQUEST["Ans_Data".$kouhoData[$intI][0]];
}
$o_smarty->assign('kouhoData', $kouhoData);
//***** 複数選択 *****//
$rad_fuku_flg = "";
if($rad_fuku_flg==0){
$rad_fuku_flg[0] = "checked";
}
if($rad_fuku_flg==1){
$rad_fuku_flg[1] = "checked";
}
$o_smarty->assign('rad_fuku_flg', $rad_fuku_flg);
//***** 公開 *****//
$rad_view_flg = "";
if($view_flg==0){
$rad_view_flg[0] = "checked";
}
if($view_flg==1){
$rad_view_flg[1] = "checked";
}
$o_smarty->assign('rad_view_flg', $rad_view_flg);
$o_smarty->assign('PHP_TITLE_NAME',$PHP_TITLE_NAME[20]);
$o_smarty->display('MNP900.tpl');
?>