#22004/9/18 16:26:45
* 这是 <head></head>部分
<%
if request("dd")="会员" then
if not isempty(request("ghot")) then
idlist=request("ghot")
if instr(idlist,",")>0 then
idArr=split(idlist)
for i = 0 to ubound(idarr)
id=clng(idarr(i))
call ghot(id)
next
else
call ghot(clng(idlist))
end if
end if
end if
if request("dd")="删除" then
if not isempty(request("selAnnounce")) then
idlist=request("selAnnounce")
if instr(idlist,",")>0 then
idArr=split(idlist)
for i = 0 to ubound(idarr)
id=clng(idarr(i))
call deleteannounce(id)
next
else
call deleteannounce(clng(idlist))
end if
end if
end if
%>
<head>
* 这是 <body></body>部分
<table width="700" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#CCCCCC" bordercolordark="#6699CC">
<tr>
<td height="25" colspan="7"><font color="#FFFFFF">以下是所有公司帐号:</font></td>
</tr>
<form method=Post action="avcomp.asp">
<tr>
<td height="25" width="80"><font color="#FFFFFF">公司帐号</font></td>
<td width="80"><font color="#FFFFFF">帐号密码</font></td>
<td width="220"><font color="#FFFFFF">公司全称</font></td>
<td width="120"><font color="#FFFFFF">电子邮件</font></td>
<td width="120"><font color="#FFFFFF">联系电话</font></td>
<td width="40" align="center"><input type='submit' name=dd value='删除'></td>
<td width="40" align="center"><input type='submit' name=dd value='会员'></td>
</tr>
<%
page=Cint(Request.QueryString("page"))
IF page<1 THEN page=1
Sub WritePage(AbsolutePage,TotalPage)
IF AbsolutePage>1 THEN
Response.write "[<a href=avcomp.asp?page=1&txtitle="&request("txtitle")&">第一页</a>][<a href=avcomp.asp?page="&AbsolutePage-1&"&txtitle="&request("txtitle")&">上一页</a>]"
ELSE
Response.write "[第一页][上一页]"
END IF
IF AbsolutePage<ToTalPage THEN
Response.write "[<a href=avcomp.asp?page="&AbsolutePage+1&"&txtitle="&request("txtitle")&">下一页</a>][<a href=avcomp.asp?page="&TotalPage&"&txtitle="&request("txtitle")&">最后页</a>]"
ELSE
Response.write "[下一页][最后页]"
END IF
END Sub
pagesize=20
%>
<%
set rs=server.createobject("adodb.recordset")
if request("txtitle")<>"" then
title=request("txtitle")
sql="select * from 公司资料 where 公司名称 like '%"&trim(title)&"%' or 帐号 like '%"&trim(title)&"%' or 地址 like '%"&trim(title)&"%' order by id desc"
else
sql="select * from 公司资料 order by id desc"
end if
rs.open sql,conn,1,1
IF Not rs.eof THEN
rs.PageSize=PageSize
rs.AbsolutePage=page
IF rs.PageCount<page THEN page=rs.PageCount
i=1
While not rs.EOF AND i<=rs.PageSize
%>
<tr>
<td height="25"><a href=compinfo.asp?id=<%=rs("帐号")%>><%=rs("帐号")%></a></td>
<td><%=rs("密码")%></td>
<td><a href=../viewcomp.asp?cname=<%=rs("帐号")%> target=_blank><%=rs("公司名称")%></a></td>
<td><%=rs("电子邮件")%></td>
<td><%=rs("电话")%></td>
<td width="40" align="center"><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("id"))%>'></td>
<td width="40" align="center"><%if rs("会员")=true then%><input type='checkbox' name='ghot' value='<%=cstr(rs("id"))%>' checked><%else%><input type='checkbox' name='ghot' value='<%=cstr(rs("id"))%>'><%end if%></td>
</tr>
<%
rs.MoveNext
i=i+1
Wend
%>
</form>
<tr><td colspan="7" height="25">
<%
Response.Write "<table border=0 cellpadding=0 cellspacing=0 width='500' align=center><tr>"
Response.write "<td width=61% height=20> <font color=#FF6600>每页显示"&PageSize&"条信息 当前页"&page&"/"&rs.PageCount&"</font></td>"
Response.write "<td width=39% height=20><p align=center>"
WritePage page,rs.PageCount
Response.write "</td></tr></table>"
ELSE
Response.write "<font color=FF0000 class=M>当前还没有任何信息</font></td></tr></table>"
END IF
%>
<%
sub ghot(id)
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from 公司资料 where id="&cstr(id)
rs.open sql,conn,1,3
if rs("会员")<>true then
rs("会员注册时间")=date()
end if
rs("会员")=true
rs.update
if err.Number<>0 then
err.clear
response.write "验 证 失 败 !<br>"
end if
End sub
sub deleteannounce(id)
dim rs,sql
if err.Number<>0 then
err.clear
response.write "删 除 失 败 !<br>"
else
set rs=server.createobject("adodb.recordset")
sql="select * from 公司资料 where id="&cstr(id)
rs.open sql,conn,1,3
userif=rs("帐号")
conn.execute"delete * from 公司资料 where id="&cstr(id)
conn.execute"delete * from 招聘信息 where 公司名称='"&userif&"'"
conn.execute"delete * from 个人信箱 where 面试公司='"&userif&"'"
conn.execute"delete * from 公司信箱 where 帐号='"&userif&"'"
end if
End sub
%>
<%
rs.close
set rs=nothing
%></div>
</td></tr>
</table>
内容太多,sorry!
编辑历史:[此帖最近一次被 allinhands 编辑过(编辑时间:2004-09-18 19:16:56)]