ShowWfInfo.php
7.57 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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?php
define('EmpireCMSAdmin','1');
require('../../class/connect.php');
require('../../class/db_sql.php');
require('../../class/functions.php');
require('../../data/dbcache/class.php');
require('../../data/dbcache/MemberLevel.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();
$id=(int)$_GET['id'];
$classid=(int)$_GET['classid'];
if(empty($class_r[$classid][classid])||!$id)
{
printerror("ErrorUrl","history.go(-1)");
}
if(!$class_r[$classid][tbname]||!$class_r[$classid][classid])
{
printerror("ErrorUrl","history.go(-1)");
}
//非終極欄目
if(!$class_r[$classid]['islast'])
{
printerror("AddInfoErrorClassid","history.go(-1)");
}
$bclassid=$class_r[$classid][bclassid];
$fun_r['AdminInfo']='管理信息';
//模型
$fieldexp="<!--field--->";
$recordexp="<!--record-->";
$tbname=$class_r[$classid][tbname];
$mid=$class_r[$classid][modid];
$mr=$empire->fetch1("select enter,tbname from {$dbtbpre}enewsmod where mid='$mid'");
if(empty($mr['tbname']))
{
printerror("ErrorUrl","history.go(-1)");
}
$enter=$mr['enter'];
$savetxtf=$emod_r[$mid]['savetxtf'];
//導航
$url=AdminReturnClassLink($classid).' > 查看信息';
//索引表
$index_r=$empire->fetch1("select id,classid,checked from {$dbtbpre}ecms_".$tbname."_index where id='$id' limit 1");
if(!$index_r['id']||$index_r['classid']!=$classid)
{
printerror("ErrorUrl","history.go(-1)");
}
//返回表
$infotb=ReturnInfoMainTbname($tbname,$index_r['checked']);
$r=$empire->fetch1("select * from ".$infotb." where id='$id' limit 1");
$wfinfor=$empire->fetch1("select id,tid,groupid,userclass,username,tstatus,checktno from {$dbtbpre}enewswfinfo where id='$id' and classid='$classid' limit 1");
if(!$wfinfor['id'])
{
printerror('ErrorUrl','history.go(-1)');
}
//工作流
$cwfitemr=$empire->fetch1("select wfid,groupid,userclass,username from {$dbtbpre}enewsworkflowitem where tid='$wfinfor[tid]'");
//驗證權限
if(strstr(','.$cwfitemr[groupid].',',','.$lur[groupid].',')||strstr(','.$cwfitemr[userclass].',',','.$lur[classid].',')||strstr(','.$cwfitemr[username].',',','.$lur[username].','))
{
}
else
{
$doselfinfo=CheckLevel($logininid,$loginin,$classid,"news");
}
$r[newstime]=date("Y-m-d H:i:s",$r[newstime]);
//返回表信息
$infodatatb=ReturnInfoDataTbname($tbname,$index_r['checked'],$r['stb']);
//副表
$finfor=$empire->fetch1("select ".ReturnSqlFtextF($mid)." from ".$infodatatb." where id='$id' limit 1");
$r=array_merge($r,$finfor);
//內容存文本
if($savetxtf)
{
$r[$savetxtf]=GetTxtFieldText($r[$savetxtf]);
}
//發佈者
if($r[ismember])
{
$username=empty($r[userid])?'遊客':"會員:<a href='../member/AddMember.php?enews=EditMember&userid=".$r[userid].$ecms_hashur['ehref']."' target='_blank'>".$r[username]."</a>";
}
else
{
$username="<a href='../user/AddUser.php?enews=EditUser&userid=".$r[userid].$ecms_hashur['ehref']."' target='_blank'>".$r[username]."</a>";
}
//狀態
$st='';
if($index_r[checked])//審核
{
$st.="[已審核] ";
}
else
{
$st.="[未審核] ";
}
if($r[istop])//置頂
{
$st.="[頂".$r[istop]."] ";
}
if($r[isgood])//推薦
{
$st.="[推".$r[isgood]."] ";
}
if($r[firsttitle])//頭條
{
$st.="[頭".$r[firsttitle]."]";
}
//標題
$titleurl=sys_ReturnBqTitleLink($r);
$r[title]="<a href='$titleurl' target='_blank'>".DoTitleFont($r[titlefont],$r[title])."</a>";
//權限
$group='';
if($r[groupid])
{
$group=$level_r[$r[groupid]][groupname];
if($r[userfen])
{
$group.=" ,扣除點數:".$r[userfen];
}
}
//欄目鏈接
$classurl=sys_ReturnBqClassname($r,9);
$getclassurlr['classid']=$bclassid;
$bclassurl=sys_ReturnBqClassname($getclassurlr,9);
$classes="<a href='$bclassurl' target='_blank'>".$class_r[$bclassid][classname]."</a> > <a href='$classurl' target='_blank'>".$class_r[$classid][classname]."</a>";
//標題分類
$titletype=$class_tr[$r[ttid]]['tname'];
?>
<!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 height="25">位置:<?=$url?></td>
</tr>
</table>
<form name="form1" method="post" action="ecmsinfo.php">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder" style="word-wrap: break-word">
<?=$ecms_hashur['form']?>
<tr class="header">
<td height="25" colspan="2"><div align="center">查看信息</div></td>
</tr>
<tr>
<td width="5%" height="25" bgcolor="#FFFFFF">
<div align="right"><strong>發佈者</strong></div></td>
<td bgcolor="#FFFFFF">
<?=$username?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>發佈時間</strong></div></td>
<td bgcolor="#FFFFFF">增加時間:
<?=date("Y-m-d H:i:s",$r[truetime])?>
,最後修改:
<?=date("Y-m-d H:i:s",$r[lastdotime])?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>人氣</strong></div></td>
<td bgcolor="#FFFFFF">點擊數:
<?=$r[onclick]?>
,評論數:
<?=$r[plnum]?>
,下載數:
<?=$r[totaldown]?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>信息狀態</strong></div></td>
<td bgcolor="#FFFFFF">
<?=$st?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>欄目</strong></div></td>
<td bgcolor="#FFFFFF">
<?=$classes?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>標題分類</strong></div></td>
<td bgcolor="#FFFFFF">
<?=$titletype?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>關鍵字</strong></div></td>
<td bgcolor="#FFFFFF">
<?=$r[keyboard]?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>相關信息ID</strong></div></td>
<td bgcolor="#FFFFFF">
<?=$r[keyid]?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>查看權限</strong></div></td>
<td bgcolor="#FFFFFF">
<?=$group?>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="right"><strong>頁面鏈接</strong></div></td>
<td bgcolor="#FFFFFF"><a href="<?=$titleurl?>" target="_blank"><?=$titleurl?></a></td>
</tr>
<?php
$fr=explode($recordexp,$enter);
$count=count($fr)-1;
for($i=0;$i<$count;$i++)
{
$fr1=explode($fieldexp,$fr[$i]);
$fname=$fr1[0];
$f=$fr1[1];
if($f=="special.field")
{
continue;
}
?>
<tr>
<td width="13%" height="25" bgcolor="#FFFFFF"><div align="right"> <strong>
<?=$fname?>
</strong> </div></td>
<td width="87%" bgcolor="#FFFFFF">
<?=stripSlashes($r[$f])?>
</td>
</tr>
<?php
}
?>
</table>
</form>
</body>
</html>
<?php
db_close();
$empire=null;
?>