ShowFeedback.php
3.29 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
<?php
define('EmpireCMSAdmin','1');
require("../../class/connect.php");
require("../../class/db_sql.php");
require("../../class/functions.php");
require("../../class/com_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,"feedback");
$id=(int)$_GET['id'];
$r=$empire->fetch1("select * from {$dbtbpre}enewsfeedback where id='$id' limit 1");
if(!$r[id])
{
printerror('ErrorUrl','');
}
$bidr=ReturnAdminFeedbackClass($r['bid'],$logininid,$loginin);
//是否已讀
if(empty($r['haveread']))
{
$empire->query("update {$dbtbpre}enewsfeedback set haveread=1 where id='$id' limit 1");
}
$br=$empire->fetch1("select bname,enter,filef from {$dbtbpre}enewsfeedbackclass where bid='$r[bid]'");
$username="遊客";
if($r['userid'])
{
$username="<a href='../member/AddMember.php?enews=EditMember&userid=".$r['userid'].$ecms_hashur['ehref']."' target=_blank>".$r['username']."</a>";
}
$fpath=0;
$getfpath=0;
$record="<!--record-->";
$field="<!--field--->";
$er=explode($record,$br['enter']);
$count=count($er);
for($i=0;$i<$count-1;$i++)
{
$er1=explode($field,$er[$i]);
//附件
if(strstr($br['filef'],",".$er1[1].","))
{
if($r[$er1[1]])
{
if(!$getfpath)
{
$filename=GetFilename($r[$er1[1]]);
$filer=$empire->fetch1("select fpath from {$dbtbpre}enewsfile_other where modtype=4 and path='$r[filepath]' and filename='$filename' limit 1");
$fpath=$filer[fpath];
$getfpath=1;
}
$fspath=ReturnFileSavePath(0,$fpath);
$fileurl=$fspath['fileurl'].$r[$er1[1]];
$val="<b>附件:</b><a href='".$fileurl."' target=_blank>".$r[$er1[1]]."</a>";
}
else
{
$val="";
}
}
else
{
$val=stripSlashes($r[$er1[1]]);
}
$feedbackinfo.="<tr bgcolor='#FFFFFF'><td height=25>".$er1[0].":</td><td>".nl2br($val)."</td></tr>";
}
?>
<!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" class=tableborder style="WORD-BREAK: break-all; WORD-WRAP: break-word">
<tr class=header>
<td height="25" colspan="2">所屬分類:<?=$br[bname]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">提交者:</td>
<td width="81%" height="25">
<?=$username?>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">發佈時間:</td>
<td height="25">
<?=$r[saytime]?>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">IP地址:</td>
<td height="25">
<?=$r[ip]?>:<?=$r[eipport]?>
</td>
</tr>
<?=$feedbackinfo?>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="2"><div align="center">[ <a href="javascript:window.close();">關
閉</a> ]</div></td>
</tr>
</table>
</body>
</html>
<?php
db_close();
$empire=null;
?>