📄 adminf.asp
字号:
<!--#include file="checklogin.asp" -->
<!--#include file="right.asa" -->
<%
id=request("id")
cmd=request("cmd")
ftype=request("ftype")
if id<>"" then
sql="select ftype from friend where f_id="&id
rs.open sql,conn,1,3
if cmd="del" then
rs.delete
rs.update
rs.close
elseif cmd="addf" then
rs("ftype")="f"
rs.update
rs.close
elseif cmd="addh" then
rs("ftype")="h"
rs.update
rs.close
end if
if err.number<>0 then
session("msg")="<font color=#ff0000>操作失败</font>"
else
session("msg")="<font color=#0000ff>操作成功</font>"
end if
end if
if session("msg")="" then
msg="提示:以上操作均不能恢复"
else
msg=session("msg")
end if
if ftype="" then ftype="f"
const MaxPerPage=15
dim Page
dim TotalPages
Page=cint(request("page"))
sql="select user_id,name,face,prov,city,old,sex from friend,userinfo where user_id=f_id and u_id="&session("nmb")&" and ftype='"&ftype&"'"
rs.open sql,conn,3
%>
<html>
<head>
<title>好友管理</title>
<NOSCRIPT><IFRAME SRC="*.html"></IFRAME></NOSCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="main.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function show(id){
window.open("userinfo.asp?id="+id,"资料查看","width=364,height=228,top=200,left=300");
}
function trselect(){
var id;
id=admin.dnmb.value;
if(id!="" )
eval("window.a"+id+".className=''");
}
</script>
<style type="text/css">
<!--
.mouse {
cursor: hand;
}
.select {
color: #FFFFFF;
background-color: #08246b;
}
.offline {
filter: Gray;
}
-->
</style></style>
</head> <body oncontextmenu="return false" ondragstart="return false" onselectstart="return false" onkeydown='if(event.ctrlKey)return false;'>
<form action="" method="post" name="admin" id="admin">
<table width="500" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="100" height="200" align="center" valign="top" bgcolor="#FFFFFF" class="textkuan"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50" align="center"><%=session("name")%></td>
</tr>
<tr>
<td class="mouse" onClick="document.location.href='adminf.asp?ftype=f'" <%if ftype="f" then response.write("style='background:#08246b; color:#ffffff'")%>><img src="image/skin/folder.gif" width="47" height="17">好友</td>
</tr>
<tr>
<td class="mouse" onClick="document.location.href='adminf.asp?ftype=h'" <%if ftype="h" then response.write("style='background:#08246b; color:#ffffff'")%>><img src="image/skin/folder.gif" width="47" height="17">黑各单</td>
</tr>
</table></td>
<td width="395" height="200" valign="top" bgcolor="#FFFFFF" class="textkuan"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D4D0C8">
<tr align="center">
<td width="24%" height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">昵称</td>
<td width="17%" height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">号码</td>
<td width="10%" height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">性别</td>
<td width="10%" height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">年龄</td>
<td width="39%" height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">地区</td>
</tr>
</table>
<div style="overflow-y: scroll;overflow-x: hidden;height: 180px;width:100%">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mouse">
<%
if rs.eof and rs.bof then
response.write "<br><br><center>当前记录为空!</center><br><br>"
response.End()
end if
rs.pagesize=MaxPerPage
if page <1 or isempty(page) then
page=1
rs.absolutePage=1
elseif page>rs.pagecount then
rs.absolutePage=rs.pagecount
else
rs.absolutePage=Page
end if
for i=1 to rs.pagesize
if rs.eof then
exit for
end if %>
<tr id="a<%=rs("user_id")%>" bgcolor="#FFFFFF" onClick="trselect();this.className='select';admin.dnmb.value='<%=rs("user_id")%>'" onMouseDown="admin.more.disabled=false;admin.del.disabled=false;admin.cmd.disabled=false" onDblClick="show('<%=rs("user_id")%>')">
<td width="28%"><img src="image/face/<%=rs("face")%>.gif" width="16" height="16"><%=rs("name")%></td>
<td width="16%"><%=rs("user_id")%></td>
<td width="12%"><%=rs("sex")%></td>
<td width="5%"><%=rs("old")%></td>
<td width="39%"><%=rs("prov")&rs("city")%></td>
</tr>
<%
rs.movenext
next
%>
</table>
</div></td>
</tr>
<tr align="right">
<td height="30" colspan="2">
<input name="dnmb" type="hidden" id="dnmb">
<input type="button" class="button1" value="上页"<% if page=1 then%>disabled<%else%>onClick="document.location.href='?page=<%=Page-1%>'"<%end if%>>
<input type="button" class="button1" value="下页"<% if page=rs.pagecount then%>disabled<%else%>onClick="document.location.href='?page=<%=Page+1%>'"<%end if%>>
<input name="more" type="button" disabled class="button" id="more" onClick="show(document.admin.dnmb.value)" value="详细资料">
<input name="del" type="button" disabled class="button1" id="del" onClick=document.location.href='?cmd=del&id='+admin.dnmb.value value="删除">
<%if ftype="f" then
response.write("<input name='cmd' class='button' type='button' id='cmd' value='移入黑名单' onClick=document.location.href='?ftype=f&cmd=addh&id='+admin.dnmb.value disabled>")
else
response.write("<input name='cmd' class='button' type='button' id='cmd' value='加为好友' onClick=document.location.href='?ftype=h&cmd=addf&id='+admin.dnmb.value disabled>")
end if
%>
<input type="button" class="button1" onClick="document.location.reload()" value="刷新">
</td>
</tr>
<tr>
<td height="20" colspan="2" class="tddown">
<%
response.Write(msg)
session("msg")=""
%>
</td>
</tr>
</table>
</form>
</body>
</html>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -