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

<link rel="stylesheet" type="text/css" href="../css/style.css">
	<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=Replace_Text(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("action")="" then
response.write "<script language='javascript'>"
response.write "alert('您提交的信息不符合规范！');"
response.write"javascript:history.back(-1)</SCRIPT>"
response.end
end if

 action=Replace_Text(request("action"))
 

sql="select * from Websen_bizre"
if action="1" then sql=sql&" where sh=0"
if action="2" then sql=sql&" where sh=1"
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 width="100%" height=25 colspan=2 class="tableHeaderText">会员证书管理</th>
</tr>
<tr>
<td  colspan=2><font color="#666666">温馨提示： ①任何的删除操作都是不可逆的，执行删除时请慎重。 
 ②证书荣誉（将企业线下经营所积累的信用延伸到网上） （1）“税务登记证”5分/张，5分封顶； （2）经营许可类证书、产品类证书、其他证书：2分/张，10分封顶。</font>
</td>
</tr>
<FORM name=form action="select.asp?action=<%=action%>" method=post>
</form>
</table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
	<Form name="search" method="POST" action="check.asp?action=<%=action%>">
                 <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="204" height="20" class=bodytitle><font color="#CC3300"><b>证书名称</b></font></TD>
      <TD width="138" class=bodytitle><font color="#CC3300"><b>所属类别</b></font></TD>
      <TD width="269" class=bodytitle><font color="#CC3300"><b>发布公司</b>  </font></TD>
      <TD width="155" class=bodytitle><font color="#CC3300"><b>发布时间</b></font></TD>
      <TD width="88" class=bodytitle align="center"><font color="#CC3300"><b>操作</b></font></TD>
<TD width="70" 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="204" class=forumRow  style='word-break:break-all'><a title=<%=rs("name")%> href="../../member/bizre/template.asp?id=<%=rs("id")%>" target="_blank"><%=rs("name")%></a></td>
<TD width="138" class=forumRow><%
sqltype="select * from Websen_bizre_class where id="&rs("typeid")&""
set rstype=server.CreateObject("adodb.recordset")
rstype.open sqltype,conn,1,1
if not rstype.eof then 
response.write""&rstype("type")&""
 rstype.close
end if
%></td>
<TD width="269" class=forumRow  style='word-break:break-all'>
<%
set rs3=server.CreateObject("adodb.recordset")
sql3="select id,qymc,trust_score 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")&"'><b>"&rs3("qymc")&"</b></a>  (指数:<font color=red>"&rs3("trust_score")&"</font>)"
else
	Response.write "该会员已不存在！"
end if
%></td>
<TD width="155" class=forumRow><%=rs("dateandtime")%></td>
<TD width="88" class=forumRow align="center">
<%if rs("sh")=0 then%>
<a href="pass1.asp?id=<%=rs("id")%>&gsid=<%=rs("gsid")%>&action=<%=action%>"> 
<font color="#008000">未审核</font></a>
<%else%>
<a href="pass.asp?id=<%=rs("id")%>&gsid=<%=rs("gsid")%>&action=<%=action%>"> 
<font color="#008000">已审核</font></a>
<%end if%>
</td>
<TD width="70" 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("Check.asp?action="&action&"")%></b></td>
              </tr></form>

</table>

<%
sub deleteannounce(id)
set rsd=server.CreateObject("adodb.recordset")
sqld="select picture from [Websen_bizre] where id="&id
rsd.open sqld,conn,1,1
if not(rsd.eof and rsd.bof) then
    call FileDel(HOPE_InstallDir&"vipcom/"&rsd("picture"))
end if
rsd.close
set rsd=nothing
 conn.execute "delete from [Websen_bizre] where id="&cstr(id)
if err then
err.clear
response.write "删 除 失 败 !<br>"
end if
End sub
%>
<!--#include file="../copy.asp"-->
</body> 
</html>