⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addfriend.asp

📁 ASP仿QQ程序 web版的
💻 ASP
字号:
<!--#include file="right.asa" -->
<%
u_id=session("nmb")
f_id=request.QueryString("id")
if u_id="" or f_id="" then
response.Write("<script language='Javascript'>alert('未知错误!');history.back(1)</script>")
response.end()
end if
sql="select ifadd from userinfo where user_id="&f_id
rs.open sql,conn,1,3
if rs.eof then
response.Write("<script language='Javascript'>alert('这个号码不存在!有问题或意见请跟管理员联系!');history.back(1)</script>")
rs.close
conn.close
set rs=nothing
set conn=nothing
response.end()
else
ifadd=rs(0)
rs.close
if ifadd=0 then
sql="select id from friend where u_id="&u_id&" and f_id="&f_id
rs.open sql,conn,1,3
if rs.eof or rs.bof then
rs.close
rs.open "friend",conn,1,3
rs.addnew
rs("u_id")=u_id
rs("f_id")=f_id
rs.update
response.Write("<script language='Javascript'>alert('添加成功');history.back(1)</script>")
session("lcount")=4
else
response.Write("<script language='Javascript'>alert('你已经添加了这个号码');history.back(1)</script>")
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
elseif ifadd=1 then
%>
<title>添加好友</title>
<link href="main.css" rel="stylesheet" type="text/css">
<body>
<form action="senddate.asp" method="post">
  <table width="360" height="200" border="0" cellpadding="3" cellspacing="0">
    <tr>
      <td height="40">
<fieldset><legend>系统提示</legend>对方需要你验证身份才能把你加为好友!</fieldset></td>
  </tr>
  <tr>
      <td height="150" align="right" valign="bottom"> 
        <fieldset style="height:100%;width:100%">
        <table width="343" border="0" cellpadding="3" cellspacing="0">
          <tr> 
            <td width="81"> 验证信息</td>
            <td width="250"><input name="saytext" type="text" id="saytext" size="40" maxlength="50"> </td>
          </tr>
        </table>
        </fieldset></td>
  </tr>
  <tr>
      <td height="30" align="right"><input name="recvnmb" type="hidden" id="recvnmb" value="<%=f_id%>">
        <input name="msgtype" type="hidden" id="msgtype" value="1"> 
        <input type="button" class="button1" value="返回" onClick="history.back(1)">
        <input name="button" type="button" class="button1" onClick="window.close()" value="取消"> 
        <input type="submit" class="button1" value="发送">
      </td>
  </tr>
</table></form></body>
<%
elseif ifadd=2 then
response.Write("<script language='Javascript'>alert('添加失败,对方不允许任何人加为好友!');history.back(1)</script>")
end if
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -