<% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="61"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<!--#include file="../../inc/FileSystem.asp"-->
  <!--#include file="../rolecheck.asp"-->

<link rel="stylesheet" type="text/css" href="../css/style.css">
<SCRIPT language=javascript1.2 src="../css/iXs_Main.js"></SCRIPT>
<script>
var checkflag="false";
function check(field){
if(checkflag=="false"){
for(i=0;i<field.length;i++){
field[i].checked=true;}
checkflag="true";
return "解除全选"; }
else {
for(i=0;i<field.length;i++) {
field[i].checked=false;}
checkflag="false";
return "选择全部";}}
</script>
<body>
<%
if not isempty(request("selAnnounce")) then
idlist=request("selAnnounce")
if instr(idlist,",")>0 then
dim idarr
idArr=split(idlist)
dim log_id
for i = 0 to ubound(idarr)
log_id=clng(idarr(i))
call deleteannounce(log_id)
next
else
call deleteannounce(clng(idlist))
end if
end if

if request("pass")="" then
response.write "<script language='javascript'>"
response.write "alert('您提交的信息不符合规范！');"
response.write"javascript:history.back(-1)</SCRIPT>"
response.end
end if

if Chkrequest(request("pass")) then
pass=request("pass")
else
Response.Redirect (HOPE_InstallDir&"/login/chklogin.asp?login=4")
end if

keywords=replace_text(request("keywords"))
%>
<%
sql="select * from Websen_expo"
if pass=0 then sql=sql&" where sh=0"
if pass=1 then sql=sql&" where sh=1"
if keywords>"" then sql=sql&" and title like '%"&keywords&"%'"
sql=sql&" order by id desc"

Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1 

msg_per_page=20 '定义每页显示记录条数
%>
<!--#include file="../../inc/headpage.asp"-->
<table width="98%" border="0" cellspacing="0" cellpadding="0"  align=center class="tableBorder">
<tr> 
<th class="tableHeaderText" colspan=2 height=25>展会信息管理</th>
</tr>
<tr>
<td height="20"  colspan="2"  ><font color="#666666">温馨提示： ①任何的删除操作都是不可逆的，执行删除时请慎重。 < 
<font color=blue>②点击<font color=red>未审核</font>与<font color=red>已审核</font>即可进行审核操作。</font>
<br></td>
</tr>
<FORM name=searchForm action="select.asp" method=post>
<tr>
<td width="19%" height=25 class="forumRowHighlight">
<B>管理操作选项</B></td>
<td width="81%" class=forumRowHighlight>关键字：<input name="keywords" type="text" value="<%=keywords%>" maxlength="10">
&nbsp;范围：
<select name="which">
			  <option value="0" <%if pass ="0" then Response.Write "selected"%>>待审展会信息</option>
			  <option value="1" <%if pass ="1" then Response.Write "selected"%>>已审待审展会</option>
			</select> <input type="submit" value="立刻查找" id=submit name=submit>&nbsp;&nbsp;&nbsp;&nbsp;[<a href="javascript:location.reload()">刷新页面</a>]</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
 <Form name="form" method="POST" action="expo.asp?pass=<%=pass%>">
               <tr> 
                <td> 
  <TABLE width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#111111" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" style="border-collapse: collapse">
    <TBODY>
<%
if rs.eof then
response.Write"<br><br><div align='center'>暂无数据信息</div><br><br>"
else
%>
<TR height=25> 
<TD width="385" height="20" class=bodytitle><font color="#CC3300"><b>信息名称</b></font></TD>
<TD width="197" class=bodytitle align="center"><font color="#CC3300"><b>发布人或公司</b></font></TD>
      <TD width="130" class=bodytitle align="center"><font color="#CC3300"><b>发布时间</b></font></TD>
      <TD width="112" class=bodytitle align="center"><font color="#CC3300"><b>操作</b></font></TD>
      <TD width="46" class=bodytitle align="center"><font color="#CC3300"><b>推荐</b></font></TD>
      <TD width="54" align="center" class=bodytitle><input type='submit' value='删除' onClick="{if(confirm('您确定执行操作吗?')){this.document.even.submit();return true;}return false;}"></TD>
</TR>
<%
do while not rs.eof and rowcount > 0%>
<TR height="20"> 
<TD width="385" class=forumRow style="word-break:break-all"><a href="edit.asp?id=<%=rs("id")%>"><% Set re = New RegExp
re.Pattern ="("&keywords&")"
re.IgnoreCase = True
re.Global=True
result = re.Replace(rs("title"), "<font color=red>$1</font>")%><%=result%></a> <%if rs("picture")<>"nopicture.gif" or rs("picture")<>Null then%><img src="../images/haveimg.gif" alt="此条信息为图片标题：&lt;br&gt;&lt;img src=<%=HOPE_InstallDir%>UploadFile/<%=rs("picture")%> border=1 width=220 height=150&gt;" width="12" height="12" border="0"> 
  <%end if%></td>
<TD width="197" class=forumRow align="center"  style="word-break:break-all">
<%if rs("gsid")<>0 then%>
<%
sql1="select * from Websen_corporation where id="&rs("gsid")&""
set rs1=conn.execute(sql1) 
if not rs1.eof then
response.write"<a href=""../vipgrade/edit.asp?id="&rs1("id")&""">"&rs1("qymc")&"</a>"
else
%><font color="red">匿名或后台添加</font>
<%
end if %>
<%else%>
<font color="red">匿名或后台添加</font>
<%end if%>
</td>
<TD width="130" class=forumRow align="center"><%=rs("dateandtime")%></td>
<TD width="112" align="center" class=forumRow>
<%if pass=0 then%>
<a href="shenghe.asp?id=<%=rs("id")%>&pass=<%=pass%>&page=<%=CurrentPage%>&gsid=<%=rs("gsid")%>">
<font color="#008000">未审核</font></a>
<%end if%>
<%if pass=1 then%>
<a href="shenghe1.asp?id=<%=rs("id")%>&pass=<%=pass%>&page=<%=CurrentPage%>">
<font color="#008000">已审核</font></a>
<%end if%> <br> <a href="edit.asp?id=<%=rs("id")%>">修改</a></td>
<TD width="46" align="center" class=forumRow><%if rs("tj")<>"0" then%> <a href="set.asp?action=0&id=<%=rs("id")%>">已推荐(取消)</a> 
		  <%
		  else
		   %>
		  <a href="set.asp?action=1&id=<%=rs("id")%>">未推荐(推荐)</a> 
		  <%end if%>
		  </td>
<TD width="54" align="center" class=forumRow><input type=checkbox name=selAnnounce value="<%=cstr(rs("ID"))%>"></td>
</TR>
<%
icolor=icolor+1
if icolor>1 then icolor=0
rowcount=rowcount-1
rs.movenext
loop
end if
%>
</TABLE>
</td>
              </tr>
			  <tr><td class=forumRow><div align="right"><input type=button value=" 全部选定 " onClick="this.value=check(this.form)"></div></td></tr>
              <tr>
                <td class=forumrowHighLight align="center"><b><%=listPages("expo.asp?pass="&pass&"&keywords="&keywords&"")%></b></td>
              </tr></FORM>
</table>
<%
sub deleteannounce(id)
	
	FileName=HOPE_InstallDir&"service/expo/detail/"&ID&".html"
	Call FileDel(FileName) '删除详细页面
	Set RsPic=Server.CreateObject("adodb.recordset")
	   sqlr="Select id,picture From Websen_expo Where id="&ID
	   RsPic.Open sqlr,conn,1,1
		if NOt RsPic.Eof Then 
			picture=RsPic("picture")
			if picture<>"nopicture.gif" or picture<>"" or picture<>Null then 
				picturePath=HOPE_InstallDir&"UploadFile/"&picturePath
				Call FileDel(picturePath) '删除图片
			end if 
		End if
Response.write("<iframe src='../../manage/makehtml/expo/makelist.asp?all=all' width=0 height=0 ></iframe>")	
Response.write("<iframe src='../../manage/makehtml/index/index.asp?act=expo' width=0 height=0 ></iframe>")	
conn.execute("delete from [Websen_expo] where id="&cstr(id)&"")
if err.Number<>0 then
err.clear
response.write "删 除 失 败 !<br>"
Response.End
end if
	Response.write "<script>window.location.href='expo.asp?pass=1'</script>"
End sub
%>
<!--#include file="../copy.asp"-->