  <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="41"
	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

keywords=replace_text(request("keywords"))
%>
<%
sql="select * from Websen_productshow where flag=1 and (zsbz like '%0%')"
if keywords<>"" then sql=sql&" and cpmc 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   colspan=2><font color="#666666">温馨提示： ①任何的删除操作都是不可逆的，执行删除时请慎重。 ②点击<font color=red>产品信息</font>查看或修改该条供求详细信息。 
 ③点击<font color=red>公司名</font>查看或者修改用户"企业信息"。</font>
</td>
</tr>

<FORM name=searchForm action="" 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%>">
 
		</select> <input type="submit" value="立刻查找" id=submit name=submit></td>
</tr>
</form>
<tr><td height="1" bgcolor="#CCCCCC" colspan="2"></td></tr>

  <tr>
    <td height=25 class="forumRowHighlight">&nbsp;</td>
    <td height=25 class="forumRowHighlight"><a href="admin_check.asp?action=0">待审产品信息</a> | <a href="admin_check.asp?action=1">已审产品信息</a> |  <a href="index.asp">推荐产品信息</a> |  [<a href="javascript:location.reload()">刷新页面</a>] </td>
  </tr>
</table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
	 	<Form name="search" method="POST" action="index.asp?keywords=<%=keywords%>%>">
     <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="284" height="20" class=bodytitle><font color="#CC3300"><b>产品名称</b></font></TD>
<TD width="300" class=bodytitle><font color="#CC3300"><b>发布公司</b></font></TD>
      <TD width="129" class=bodytitle align=center><font color="#CC3300"><b>发布时间</b></font></TD>
       <TD width="137" class=bodytitle align="center"><font color="#CC3300"><b>操作</b></font></TD>
<TD width="68" 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="284" class=forumRow style="word-break:break-all">
<%
set rshi=server.CreateObject("adodb.recordset")
sqlhi="select id,qymc,trust_score,flag from Websen_corporation where id="&rs("gsid")
rshi.open sqlhi,conn,1,1
if rshi.eof then 
%>
<% Set re = New RegExp
re.Pattern ="("&keywords&")"
re.IgnoreCase = True
re.Global=True
result = re.Replace(rs("cpmc"), "<font color=red>$1</font>")%><%=result%>
<%end if
if not rshi.eof then
%>
<a href=edit.asp?id=<%=rs("id")%>><% Set re = New RegExp
re.Pattern ="("&keywords&")"
re.IgnoreCase = True
re.Global=True
result = re.Replace(rs("cpmc"), "<font color=red>$1</font>")%><%=result%></a>
<%
end if
%>
&nbsp;<%set rs4=conn.execute("select [user] from Websen_corporation where id="&rs("gsid")&"")%>
&nbsp;<%if rs("picture_summ")<>"" then%>
<img src="../images/haveimg.gif" alt="此条信息为图片标题：&lt;br&gt;&lt;img src=<%=HOPE_InstallDir%>vipcom/<%=rs4("user")%>/<%=rs("picture_summ")%> border=1 width=220 height=150&gt;" width="12" height="12" border="0">
        <%end if%><%if rs("Picture")<>"" then%>
<img src="../images/haveimg.gif" alt="此条信息为图片标题：&lt;br&gt;&lt;img src=<%=HOPE_InstallDir%>vipcom/<%=rs4("user")%>/<%=rs("Picture")%> border=1 width=220 height=150&gt;" width="12" height="12" border="0">
        <%end if%></td>
<TD width="300" class=forumRow style="word-break:break-all">
<%
set rs3=server.CreateObject("adodb.recordset")
sql3="select id,qymc,trust_score,gradeid,flag from Websen_corporation where id="&rs("gsid")
rs3.open sql3,conn,1,1
if not rs3.eof then
	response.write"<a href='../vipgrade/edit.asp?id="&rs3("id")&"'>"&rs3("qymc")&"</a> (指数: <font color=red>"&rs3("trust_score")&"</font>)"
	
	 '取出等级-----------------------------
 set rsk=server.CreateObject("adodb.recordset")
 sqlk="select * from Websen_vipgrade where roleid="&rs3("gradeid")
 rsk.open sqlk,conn,1,1
 if not rsk.eof then 
 response.Write("["&rsk("gradename")&"]")
 rsk.close
 end if
 
 
 '---------------------------------------
else
	Response.Write("该会员已不存在")
end if
%></td>
<TD width="129" class=forumRow align=center><%=rs("idate")%></td>
 
<TD width="137" class=forumRow align="center">
 <%if instr(rs("zsbz")&"a","0")<>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="68" 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("index.asp?keywords="&keywords&"")%></b></td>
              </tr></form>
 </table>

<%

sub deleteannounce(id)
dim rs,sql
	Set RsID=Conn.Execute("Select * From Websen_productshow Where id="&cstr(id)&"")
		IF NOt RsID.Eof then 
			         ttid=RsID("id")
					 sortid=RsID("sortid")
					 typeid=RsID("typeid")
					 typeid_2=RsID("typeid_2")
					 showname=RsID("cpmc")
			Pro_Name=HOPE_InstallDir&"productshow/offerdetail/"&sortid&"-"&typeid&"-"&typeid_2&"-"&ttid&".html" 
			Call FileDel(Pro_Name)'删除文件
		end if
	RsID.Close
	Set RsID=NOthing
set rs=server.createobject("adodb.recordset")
sql="delete from [Websen_productshow] where id="&cstr(id)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "删 除 失 败 !<br>"
end if
End sub
%>
<!--#include file="../copy.asp"-->