ListPageInfoClass.php
7.99 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
<?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();
//驗證用戶
$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,"cj");
$page=(int)$_GET['page'];
$page=RepPIntvar($page);
$start=0;
$line=25;//每頁顯示條數
$page_line=12;//每頁顯示鏈接數
$offset=$page*$line;//總偏移量
$add="";
$search="";
$search.=$ecms_hashur['ehref'];
//搜索
if($_GET['sear'])
{
$search.="&sear=1";
//關鍵字
$keyboard=RepPostVar2($_GET['keyboard']);
if($keyboard)
{
$show=RepPostStr($_GET['show'],1);
if($show==1)
{
$add=" where (classname like '%$keyboard%')";
}
elseif($show==2)
{
$add=" where (bz like '%$keyboard%')";
}
elseif($show==3)
{
$add=" where (infourl like '%$keyboard%')";
}
else
{
$add=" where (classname like '%$keyboard%' or bz like '%$keyboard%' or infourl like '%$keyboard%')";
}
$search.="&keyboard=$keyboard&show=$show";
}
}
$totalquery="select count(*) as total from {$dbtbpre}enewsinfoclass".$add;
$query="select * from {$dbtbpre}enewsinfoclass".$add;
$num=$empire->gettotal($totalquery);//取得總條數
$query=$query." order by classid 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>
<script>
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td width="50%">位置:採集 > <a href="ListPageInfoClass.php<?=$ecms_hashur['whehref']?>">管理節點</a></td>
<td><div align="right"> </div></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<form name="searchinfoclass" method="GET" action="ListPageInfoClass.php">
<?=$ecms_hashur['eform']?>
<tr>
<td width="50%" class="emenubutton"><input type="button" name="Submit52" value="增加節點" onclick="self.location.href='AddInfoC.php?from=1<?=$ecms_hashur['ehref']?>';">
<input type="button" name="Submit52" value="導入採集規則" onclick="self.location.href='cj/LoadInCj.php?from=1<?=$ecms_hashur['ehref']?>';"></td>
<td width="50%" height="32">
<div align="right">搜索:
<input name="keyboard" type="text" id="keyboard" value="<?=$keyboard?>">
<select name="show" id="show">
<option value="0"<?=$show==0?' selected':''?>>不限</option>
<option value="1"<?=$show==1?' selected':''?>>節點名稱</option>
<option value="2"<?=$show==2?' selected':''?>>備註</option>
<option value="3"<?=$show==3?' selected':''?>>採集頁面地址</option>
</select>
<input type="submit" name="Submit8" value="搜索">
<input name="sear" type="hidden" id="sear" value="1">
</div></td>
</tr>
</form>
</table>
<form name=form1 method=get action="DoCj.php" onsubmit="return confirm('確認要採集?');" target=_blank>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableborder">
<?=$ecms_hashur['form']?>
<input type=hidden name=enews value=DoCj>
<input type=hidden name=from value=1>
<tr class="header">
<td width="3%"><div align="center"></div></td>
<td width="8%" height="25"> <div align="center">採集</div></td>
<td width="27%" height="25"> <div align="center">節點(點擊訪問採集頁)</div></td>
<td width="6%" height="25"> <div align="center">預覽</div></td>
<td width="16%" height="25"> <div align="center">綁定欄目</div></td>
<td width="9%" height="25"> <div align="center">審核採集</div></td>
<td width="24%" height="25"> <div align="center">操作</div></td>
</tr>
<?php
while($r=$empire->fetch($sql))
{
//採集頁面
$pager=explode("\r\n",$r[infourl]);
$infourl=$pager[0];
if($r[newsclassid])
{
$lastcjtime=!$r['lasttime']?'從未採集':date("Y-m-d H:i:s",$r['lasttime']);
$cj="<a href='DoCj.php?enews=CjUrl&classid[]=".$r[classid]."&from=1".$ecms_hashur['href']."' title='最後採集時間:".$lastcjtime."'><u>".$fun_r['StartCj']."</u></a>";
$emptydb=" [<a href='ListInfoClass.php?enews=EmptyCj&classid=$r[classid]&from=1".$ecms_hashur['href']."' onclick=\"return confirm('".$fun_r['CheckEmptyCjRecord']."');\">".$fun_r['EmptyCjRecord']."</a>]";
$loadoutcj=" [<a href=ecmscj.php?enews=LoadOutCj&classid=$r[classid]&from=1".$ecms_hashur['href']." onclick=\"return confirm('確認要導出?');\">導出</a>]";
$checkbox="<input type=checkbox name=classid[] value='$r[classid]' onClick=\"if(this.checked){c".$r[classid].".style.backgroundColor='#DBEAF5';}else{c".$r[classid].".style.backgroundColor='#ffffff';}\">";
}
else
{
$cj=$fun_r['StartCj'];
$emptydb="";
$checkbox="";
}
//欄目鏈接
$getcurlr['classid']=$r[newsclassid];
$classurl=sys_ReturnBqClassname($getcurlr,9);
?>
<tr bgcolor="#FFFFFF" id="c<?=$r[classid]?>" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
<td> <div align="center">
<?=$checkbox?>
</div></td>
<td height="25"> <div align="center">
<?=$cj?>
</div></td>
<td height="25"> <div align="center"><a href='<?=$infourl?>' target=_blank>
<?=$r[classname]?>
</a></div></td>
<td height="25"> <div align="center"><a href='ecmscj.php?enews=ViewCjList&classid=<?=$r[classid]?>&from=1<?=$ecms_hashur['href']?>' target=_blank>
<?=$fun_r['view']?>
</a></div></td>
<td height="25"> <div align="center"><a href='<?=$classurl?>' target=_blank>
<?=$class_r[$r[newsclassid]][classname]?>
</a></div></td>
<td height="25"> <div align="center"><a href='CheckCj.php?classid=<?=$r[classid]?>&from=1<?=$ecms_hashur['ehref']?>'>
<?=$fun_r['CheckCj']?>
</a></div></td>
<td height="25"> <div align="center">
<?="[<a href=AddInfoClass.php?enews=AddInfoClass&docopy=1&classid=".$r[classid]."&newsclassid=".$r[newsclassid]."&from=1".$ecms_hashur['ehref'].">".$fun_r['Copy']."</a>] [<a href=AddInfoClass.php?enews=EditInfoClass&classid=".$r[classid]."&from=1".$ecms_hashur['ehref'].">".$fun_r['edit']."</a>] [<a href=ListInfoClass.php?enews=DelInfoClass&classid=".$r[classid]."&from=1".$ecms_hashur['href']." onclick=\"return confirm('".$fun_r['CheckDelCj']."');\">".$fun_r['del']."</a>]".$emptydb.$loadoutcj;?>
</div></td>
</tr>
<?php
}
?>
<tr bgcolor="#FFFFFF">
<td> <div align="center">
<input type=checkbox name=chkall value=on onClick="CheckAll(this.form)">
</div></td>
<td height="25" colspan="6"> <input type="submit" name="Submit" value="批量採集節點"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td height="25" colspan="6">
<?=$returnpage?>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td height="25" colspan="6"><font color="#666666">備註:彈出採集窗口,請按住"Shift"+點擊〞開始採集"</font></td>
</tr>
</table>
</form>
</body>
</html>
<?
db_close();
$empire=null;
?>