AddFeedbackClass.php
7.5 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
<?php
define('EmpireCMSAdmin','1');
require("../../class/connect.php");
require("../../class/db_sql.php");
require("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
//驗證用戶
$lur=is_login();
$logininid=$lur['userid'];
$loginin=$lur['username'];
$loginrnd=$lur['rnd'];
$loginlevel=$lur['groupid'];
$loginadminstyleid=$lur['adminstyleid'];
//ehash
$ecms_hashur=hReturnEcmsHashStrAll();
//驗證權限
CheckLevel($logininid,$loginin,$classid,"feedbackf");
$enews=ehtmlspecialchars($_GET['enews']);
$btype=" checked";
$usernames='';
$r['mustenter']=",title,";
$record="<!--record-->";
$field="<!--field--->";
$url="<a href=feedback.php".$ecms_hashur['whhref'].">管理信息反饋</a> > <a href=FeedbackClass.php".$ecms_hashur['whhref'].">管理反饋分類</a> > 增加反饋分類";
if($enews=="AddFeedbackClass"&&$_GET['docopy'])
{
$bid=(int)$_GET['bid'];
$btype="";
$r=$empire->fetch1("select * from {$dbtbpre}enewsfeedbackclass where bid='$bid'");
$url="<a href=feedback.php".$ecms_hashur['whhref'].">管理信息反饋</a> > <a href=FeedbackClass.php".$ecms_hashur['whhref'].">管理反饋分類</a> > 複製反饋分類: ".$r['bname'];
$usernames=substr($r['usernames'],1,-1);
}
//修改
if($enews=="EditFeedbackClass")
{
$bid=(int)$_GET['bid'];
$btype="";
$url="<a href=feedback.php".$ecms_hashur['whhref'].">管理信息反饋</a> -> <a href=FeedbackClass.php".$ecms_hashur['whhref'].">管理反饋分類</a> -> 修改反饋分類";
$r=$empire->fetch1("select * from {$dbtbpre}enewsfeedbackclass where bid='$bid'");
$usernames=substr($r['usernames'],1,-1);
}
//取得字段
$fsql=$empire->query("select f,fname from {$dbtbpre}enewsfeedbackf order by myorder,fid");
while($fr=$empire->fetch($fsql))
{
$like=$field.$fr[f].$record;
$slike=",".$fr[f].",";
//錄入項
$enterchecked="";
if(strstr($r[enter],$like))
{
$enterchecked=" checked";
//取得字段標識
$dor=explode($like,$r[enter]);
if(strstr($dor[0],$record))
{
$dor1=explode($record,$dor[0]);
$last=count($dor1)-1;
$fr[fname]=$dor1[$last];
}
else
{
$fr[fname]=$dor[0];
}
}
//標題
if($enews=="AddFeedbackClass"&&$fr[f]=="title")
{
$enterchecked=" checked";
}
$entercheckbox="<input name=center[] type=checkbox value='".$fr[f]."'".$enterchecked.">";
//必填項
$mustfchecked="";
if(strstr($r[mustenter],$slike))
{$mustfchecked=" checked";}
if($enews=="AddFeedbackClass"&&$fr[f]=="title")
{
$mustfchecked=" checked";
}
$mustfcheckbox="<input name=menter[] type=checkbox value='".$fr[f]."'".$mustfchecked.">";
$data.="<tr>
<td height=25> <div align=center>
<input name=cname[".$fr[f]."] type=text value='".$fr[fname]."'>
</div></td>
<td> <div align=center>
<input name=cfield type=text value='".$fr[f]."' readonly>
</div></td>
<td><div align=center>
".$entercheckbox."
</div></td>
<td><div align=center>
".$mustfcheckbox."
</div></td>
</tr>";
}
//----------會員組
$sql1=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
while($l_r=$empire->fetch($sql1))
{
if($r[groupid]==$l_r[groupid])
{$select=" selected";}
else
{$select="";}
$membergroup.="<option value=".$l_r[groupid].$select.">".$l_r[groupname]."</option>";
}
db_close();
$empire=null;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>增加反饋分類</title>
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td>位置:<?=$url?></td>
</tr>
</table>
<form name="form1" method="post" action="FeedbackClass.php">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<?=$ecms_hashur['form']?>
<tr>
<td height="25" colspan="2" class="header">增加反饋分類
<input name="bid" type="hidden" id="bid" value="<?=$bid?>"> <input name="enews" type="hidden" id="enews" value="<?=$enews?>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="23%" height="25">分類名稱</td>
<td width="77%" height="25"><input name="bname" type="text" id="bname" value="<?=$r[bname]?>" size="43">
<font color="#666666">(比如:"建議與反饋")</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">管理反饋的用戶</td>
<td height="25"><input name="usernames" type="text" id="usernames" value="<?=$usernames?>" size="42">
<font color="#666666">
<input type="button" name="Submit32" value="選擇" onclick="window.open('../ChangeUser.php?field=usernames&form=form1<?=$ecms_hashur['ehref']?>','','width=300,height=520,scrollbars=yes');">
(空為不限,多個用戶用「,」逗號隔開)</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">提交會員組權限</td>
<td height="25"><select name="groupid" id="groupid">
<option value="0">遊客</option>
<?=$membergroup?>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" valign="top">選擇本表單的字段項<br>
(<font color="#FF0000">
<input name="btype" type="checkbox" value="1"<?=$btype?>>
自動生成表單</font>)<br> <br> <input type="button" name="Submit3" value="字段管理" onclick="window.open('ListFeedbackF.php<?=$ecms_hashur['whehref']?>');">
</td>
<td height="25" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr bgcolor="#DBEAF5">
<td width="35%" height="25"> <div align="center">字段標識</div></td>
<td width="35%" height="25"> <div align="center">字段名</div></td>
<td width="15%"> <div align="center">提交項</div></td>
<td width="15%"> <div align="center">必填項</div></td>
</tr>
<?=$data?>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" valign="top"><p>錄入表單模板<br>
(如<font color="#FF0000">自動生成表單模板</font><br>
,不用填模板內容)<br>
<br>
控制面板頭部標籤:<br>
[!--cp.header--]<br>
<br>
控制面板尾部標籤:<br>
[!--cp.footer--]<br>
<br>
會員中心頭部標籤:<br>
[!--member.header--]<br>
<br>
會員中心尾部標籤:<br>
[!--member.footer--]<br>
<br>
(支持公共模板變量)</p></td>
<td height="25"><textarea name="btemp" cols="75" rows="20" style="WIDTH: 100%" id="btemp"><?=ehtmlspecialchars(stripSlashes($r[btemp]))?></textarea></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" valign="top">註釋:</td>
<td height="25"><textarea name="bzs" cols="75" rows="10" style="WIDTH: 100%" id="textarea"><?=stripSlashes($r[bzs])?></textarea></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"> </td>
<td height="25"><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>