ListWfInfo.php
5.25 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
<?php
define('EmpireCMSAdmin','1');
require('../../class/connect.php');
require('../../class/db_sql.php');
require('../../class/functions.php');
require '../'.LoadLang('pub/fun.php');
require('../../data/dbcache/class.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();
$search=$ecms_hashur['ehref'];
$page=(int)$_GET['page'];
$page=RepPIntvar($page);
$start=0;
$line=intval($public_r['hlistinfonum']);//每頁顯示
$page_line=12;//每頁顯示鏈接數
$offset=$page*$line;//總偏移量
$add=" and (groupid like '%,".$lur[groupid].",%' or userclass like '%,".$lur[classid].",%' or username like '%,".$lur[username].",%')";
$totalquery="select count(*) as total from {$dbtbpre}enewswfinfo where checktno=0".$add;
$num=$empire->gettotal($totalquery);
$query="select id,classid,tstatus,checktno from {$dbtbpre}enewswfinfo where checktno=0".$add;
$query=$query." order by id desc limit $offset,$line";
$sql=$empire->query($query);
$returnpage=page2($num,$line,$page_line,$start,$page,$search);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
<title>管理簽發信息</title>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td height="25">位置:<a href="../ListAllInfo.php<?=$ecms_hashur['whehref']?>">管理信息</a> > <a href="ListWfInfo.php<?=$ecms_hashur['whehref']?>">管理簽發信息</a></td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<form name="form1" method="post" action="">
<tr class="header">
<td width="6%" height="25"> <div align="center">ID</div></td>
<td width="46%" height="25"> <div align="center">標題</div></td>
<td width="9%"><div align="center">狀態</div></td>
<td width="13%"><div align="center">發佈者</div></td>
<td width="16%"><div align="center">提交時間</div></td>
<td width="10%" height="25"> <div align="center">操作</div></td>
</tr>
<?php
while($r=$empire->fetch($sql))
{
if($class_r[$r[classid]][tbname])
{
$index_r=$empire->fetch1("select checked from {$dbtbpre}ecms_".$class_r[$r[classid]][tbname]."_index where id='$r[id]' limit 1");
//返回表
$infotb=ReturnInfoMainTbname($class_r[$r[classid]][tbname],$index_r['checked']);
$nr=$empire->fetch1("select title,newstime,userid,username,ismember from ".$infotb." where id='$r[id]' limit 1");
}
$do=$r[classid];
$dob=$class_r[$r[classid]][bclassid];
$addecmscheck='';
if(empty($index_r['checked']))
{
$addecmscheck='&ecmscheck='.$ecmscheck;
}
//狀態
$st='';
if($r[checktno]=='100')
{
$st='審核通過';
}
elseif($r[checktno]=='101')
{
$st='返工';
}
elseif($r[checktno]=='102')
{
$st='已否決';
}
else
{
$st=$r[tstatus];
}
//發佈者
if($nr[ismember])
{
$username=empty($nr[userid])?'遊客':"會員:<a href='../member/AddMember.php?enews=EditMember&userid=".$nr[userid].$ecms_hashur['ehref']."' target='_blank'>".$nr[username]."</a>";
}
else
{
$username="<a href='../user/AddUser.php?enews=EditUser&userid=".$nr[userid].$ecms_hashur['ehref']."' target='_blank'>".$nr[username]."</a>";
}
?>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
<td height="42"> <div align="center">
<?=$r[id]?>
</div></td>
<td height="25">
<a href="ShowWfInfo.php?classid=<?=$r[classid]?>&id=<?=$r[id]?><?=$addecmscheck?><?=$ecms_hashur['ehref']?>" title="查看內容" target="_blank"><?=$nr[title]?></a>
<br>
<font color="#574D5C">欄目:<a href='../ListNews.php?bclassid=<?=$class_r[$r[classid]][bclassid]?>&classid=<?=$r[classid]?><?=$addecmscheck?><?=$ecms_hashur['ehref']?>'>
<font color="#574D5C"><?=$class_r[$dob][classname]?></font>
</a> > <a href='../ListNews.php?bclassid=<?=$class_r[$r[classid]][bclassid]?>&classid=<?=$r[classid]?><?=$addecmscheck?><?=$ecms_hashur['ehref']?>'>
<font color="#574D5C"><?=$class_r[$r[classid]][classname]?></font>
</a></font> </td>
<td><div align="center"><?=$st?></div></td>
<td><div align="center"><?=$username?></div></td>
<td><div align="center">
<?=date("Y-m-d H:i:s",$nr[newstime])?>
</div></td>
<td height="25"> <div align="center">[<a href="#ecms" onclick="window.open('DoWfInfo.php?classid=<?=$r[classid]?>&id=<?=$r[id]?><?=$addecmscheck?><?=$ecms_hashur['ehref']?>','','width=600,height=520,scrollbars=yes');">簽發</a>]</div></td>
</tr>
<?
}
?>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="6">
<?=$returnpage?>
</td>
</tr>
</form>
</table>
</body>
</html>
<?
db_close();
$empire=null;
?>