%%C9^C99^C9903263%%MST1423.tpl.php
9.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
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
<?php /* Smarty version 2.6.26, created on 2018-04-01 22:54:27
compiled from MST1423.tpl */ ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="GENERATOR" content="Microsoft FrontPage 4.0">
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="Content-Style-Type" content="text/css">
<link href="./css/style.css" rel="stylesheet" type="text/css">
<TITLE>め〜るNiポン!</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<?php echo '
//********** 一覧へ戻る **********
function ichiranBack(){
if (confirm("入力内容は破棄して回答パターン一覧画面に戻ります\\nよろしいですか?")){
document.Frm.action="./MST1410.php";
document.Frm.submit();
}
}
//********** 入力チェック **********
function input_chk(flg){
if(document.Frm.pattern_nm.value == ""){
window.alert("回答パターン名称を入力してください。");
document.Frm.pattern_nm.focus();
return false;
}
if (confirm("この内容で登録します。\\nよろしいですか?")){
if (flg == 1){
document.Frm.action="MST1422.php";
document.Frm.submit();
}else{
document.Frm.action="MST1421.php";
document.Frm.submit();
}
}
}
//********** 解答欄変更 **********
function num_change(){
document.Frm.action="MST1420.php";
document.Frm.submit();
}
'; ?>
</SCRIPT>
</HEAD>
<BODY bgcolor="White">
<form name="Frm" method="POST">
<!-- ヘッダー表示 -->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
<!-- メニュー表示 -->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'menu.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
<!-- 一覧表示 -->
<CENTER>
<table width="100%" border="0">
<tr>
<th><B><FONT color=blue size=5>回答パターン登録</FONT></B></th>
</tr>
</table>
<hr/>
<br>
<TABLE border=0 WIDTH="700">
<TR>
<TD>
<CENTER>
<INPUT type="button" name="back" value="一覧に戻る" onClick="JavaScript:ichiranBack();">
</CENTER>
</TD>
</TR>
<TR>
<TD>
<B><FONT size="2" color=#FF0000>*</FONT></B><FONT size="2">は入力必須項目です</FONT>
</TD>
</TR>
<TR>
<TD>
<TABLE border=1 bordercolor="#008080" >
<TR>
<TD bgcolor="#FFCC99" WIDTH="150">
<B><FONT size="2">回答パターン名称</FONT><FONT size="2" color=#FF0000>*</FONT></B>
</TD>
<TD>
<INPUT maxlength="30" size="50" type="text" name="pattern_nm" value="<?php echo $this->_tpl_vars['pattern_nm']; ?>
">
<B><FONT size="2">(英数字:最大30文字)</FONT></B>
</TD>
</TR>
<TR>
<TD bgcolor="#FFCC99"><B><FONT size="2">選択数</FONT></B></TD>
<TD>
<select name="select_nm" onChange="num_change();">
<?php unset($this->_sections['cnt']);
$this->_sections['cnt']['name'] = 'cnt';
$this->_sections['cnt']['start'] = (int)0;
$this->_sections['cnt']['loop'] = is_array($_loop=$this->_tpl_vars['max_num']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['cnt']['show'] = true;
$this->_sections['cnt']['max'] = $this->_sections['cnt']['loop'];
$this->_sections['cnt']['step'] = 1;
if ($this->_sections['cnt']['start'] < 0)
$this->_sections['cnt']['start'] = max($this->_sections['cnt']['step'] > 0 ? 0 : -1, $this->_sections['cnt']['loop'] + $this->_sections['cnt']['start']);
else
$this->_sections['cnt']['start'] = min($this->_sections['cnt']['start'], $this->_sections['cnt']['step'] > 0 ? $this->_sections['cnt']['loop'] : $this->_sections['cnt']['loop']-1);
if ($this->_sections['cnt']['show']) {
$this->_sections['cnt']['total'] = min(ceil(($this->_sections['cnt']['step'] > 0 ? $this->_sections['cnt']['loop'] - $this->_sections['cnt']['start'] : $this->_sections['cnt']['start']+1)/abs($this->_sections['cnt']['step'])), $this->_sections['cnt']['max']);
if ($this->_sections['cnt']['total'] == 0)
$this->_sections['cnt']['show'] = false;
} else
$this->_sections['cnt']['total'] = 0;
if ($this->_sections['cnt']['show']):
for ($this->_sections['cnt']['index'] = $this->_sections['cnt']['start'], $this->_sections['cnt']['iteration'] = 1;
$this->_sections['cnt']['iteration'] <= $this->_sections['cnt']['total'];
$this->_sections['cnt']['index'] += $this->_sections['cnt']['step'], $this->_sections['cnt']['iteration']++):
$this->_sections['cnt']['rownum'] = $this->_sections['cnt']['iteration'];
$this->_sections['cnt']['index_prev'] = $this->_sections['cnt']['index'] - $this->_sections['cnt']['step'];
$this->_sections['cnt']['index_next'] = $this->_sections['cnt']['index'] + $this->_sections['cnt']['step'];
$this->_sections['cnt']['first'] = ($this->_sections['cnt']['iteration'] == 1);
$this->_sections['cnt']['last'] = ($this->_sections['cnt']['iteration'] == $this->_sections['cnt']['total']);
?>
<option value="<?php echo $this->_sections['cnt']['index']; ?>
"
<?php if ($this->_tpl_vars['select_nm'] == $this->_sections['cnt']['index']): ?>
selected
<?php endif; ?>
><?php echo $this->_sections['cnt']['index']; ?>
<?php endfor; endif; ?>
</select>
<BR>
<FONT size=2><B>選択数0個の送信は、既読確認のみで回答を入力することはできません。</B></FONT>
</TD>
</TR>
<?php unset($this->_sections['cnt']);
$this->_sections['cnt']['name'] = 'cnt';
$this->_sections['cnt']['start'] = (int)1;
$this->_sections['cnt']['loop'] = is_array($_loop=$this->_tpl_vars['select_nm']+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['cnt']['show'] = true;
$this->_sections['cnt']['max'] = $this->_sections['cnt']['loop'];
$this->_sections['cnt']['step'] = 1;
if ($this->_sections['cnt']['start'] < 0)
$this->_sections['cnt']['start'] = max($this->_sections['cnt']['step'] > 0 ? 0 : -1, $this->_sections['cnt']['loop'] + $this->_sections['cnt']['start']);
else
$this->_sections['cnt']['start'] = min($this->_sections['cnt']['start'], $this->_sections['cnt']['step'] > 0 ? $this->_sections['cnt']['loop'] : $this->_sections['cnt']['loop']-1);
if ($this->_sections['cnt']['show']) {
$this->_sections['cnt']['total'] = min(ceil(($this->_sections['cnt']['step'] > 0 ? $this->_sections['cnt']['loop'] - $this->_sections['cnt']['start'] : $this->_sections['cnt']['start']+1)/abs($this->_sections['cnt']['step'])), $this->_sections['cnt']['max']);
if ($this->_sections['cnt']['total'] == 0)
$this->_sections['cnt']['show'] = false;
} else
$this->_sections['cnt']['total'] = 0;
if ($this->_sections['cnt']['show']):
for ($this->_sections['cnt']['index'] = $this->_sections['cnt']['start'], $this->_sections['cnt']['iteration'] = 1;
$this->_sections['cnt']['iteration'] <= $this->_sections['cnt']['total'];
$this->_sections['cnt']['index'] += $this->_sections['cnt']['step'], $this->_sections['cnt']['iteration']++):
$this->_sections['cnt']['rownum'] = $this->_sections['cnt']['iteration'];
$this->_sections['cnt']['index_prev'] = $this->_sections['cnt']['index'] - $this->_sections['cnt']['step'];
$this->_sections['cnt']['index_next'] = $this->_sections['cnt']['index'] + $this->_sections['cnt']['step'];
$this->_sections['cnt']['first'] = ($this->_sections['cnt']['iteration'] == 1);
$this->_sections['cnt']['last'] = ($this->_sections['cnt']['iteration'] == $this->_sections['cnt']['total']);
?>
<TR>
<TD bgcolor="#FFCC99">
<B><FONT size="2">回答パターン<?php echo $this->_sections['cnt']['index']; ?>
</FONT></B>
</TD>
<TD>
<?php if ($this->_tpl_vars['name_nm'][$this->_sections['cnt']['index']] == ""): ?>
<B><FONT size="2" color="#FF0000">※入力されていません。</FONT></B><br>
<?php endif; ?>
<INPUT maxlength="20" size="30" type="text" name="name_nm[<?php echo $this->_sections['cnt']['index']; ?>
]" value="<?php echo $this->_tpl_vars['name_nm'][$this->_sections['cnt']['index']]; ?>
">
<B><FONT size="2">(英数字:最大30文字)</FONT></B>
<input type="hidden" name="name<?php echo $this->_sections['cnt']['index']; ?>
_id" value="<?php echo $this->_sections['cnt']['index']; ?>
">
</TD>
</TR>
<?php endfor; endif; ?>
</TABLE>
</TD>
</TR>
</TABLE>
<TABLE border=0 WIDTH="700">
<TR>
<td align="center">
<input type="button" value="<?php echo $this->_tpl_vars['btn_value']; ?>
" onClick="return input_chk(<?php echo $this->_tpl_vars['exeflg']; ?>
);">
</TD>
</TR>
</TABLE>
</CENTER>
<input type="hidden" name="pattern_id" value="<?php echo $this->_tpl_vars['pattern_id']; ?>
">
<input type="hidden" name="default_flg" value="<?php echo $this->_tpl_vars['default_flg']; ?>
">
<input type="hidden" name="del_flg" value="<?php echo $this->_tpl_vars['del_flg']; ?>
">
<input type="hidden" name="exeflg" value="<?php echo $this->_tpl_vars['exeflg']; ?>
">
<input type="hidden" name="e" value="<?php echo $this->_tpl_vars['exeflg']; ?>
">
<input type="hidden" name="p" value="<?php echo $this->_tpl_vars['pattern_id']; ?>
">
<input type="hidden" name="scrflg" value="1">
<!-- フッター表示 -->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
</FORM>
</BODY>
</HTML>