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

📄 chat8.txt

📁 用纯ASP代码实现图片上传并存入数据库中
💻 TXT
📖 第 1 页 / 共 2 页
字号:
      checked> <%else%><input type="checkbox" name="C1" value="ON"><%end if%> <input type="text" name="T3"
      size="6" value="悄悄话"></td>
      <td width="30%" align="center"><div align="center"><center><p>表情:<select name="bq"
      size="1" onchange="windowload();">
        <option selected value=" ">面无表情</option>
<%sc_bq = session("ss_bq")
sc_bq1 = session("ss_bq1")
for i = 1 to 100
    if trim(sc_bq(i))<>"" then
        if trim(sc_bq(i)) = trim(sc_bq1) then%>        <option selected value="<%response.write(sc_bq(i))%>"><%response.write(sc_bq(i))%></option>
<%        else%>        <option value="<%response.write(sc_bq(i))%>"><%response.write(sc_bq(i))%></option>
<%        end if
    end if
next%>      </select></td>
      <td width="50%" align="center"><div align="center"><center><p>动作:<select
      name="action" size="1" onchange="cc(this)">
        <option selected value="没有动作">没有动作</option>
<%
sc_acction = session("ss_acction")
for i = 1 to 100
    if trim(sc_acction(i,1))<>"" then%>        <option value="<%response.write(sc_acction(i,2))%>"><%response.write(sc_acction(i,1))%></option>
<%
end if
next
%>      </select></td>
      <td width="10%" align="center"><div align="right"><p><select name="color" size="1"
      onchange="windowload();">
        <option selected value="#000000">默认颜色</option>
        <option value="#FF0000">红色</option>
      </select></td>
    </tr>
    <tr align="center">
<%if ((session("ss_userflag") = 0) or (session("ss_userflag") = 1)) then%>
      <td width="100%" align="center" colspan="4"><div align="right"><p>时长:<input
      type="text" name="time1" size="6"><input type="submit" value="踢人" name="B1"><input
      type="submit" value="封闭聊天" name="B1"><input type="submit" value="封闭浏览"
      name="B1"></td>
<%end if%>
    </tr>
    <tr align="center">
<%if (session("ss_userflag") = 0) then%>
      <td width="33%" align="center"><a href="loseallhaha.asp" target="_blank">输出系统参数</a></td>
      <td width="33%" align="center"><a href="clearall.asp" target="_blank">重置系统参数</a></td>
      <td width="34%" align="center" colspan="2"><a href="userflag.asp" target="_blank">用户权限修改</a></td>
<%end if%>
    </tr>
  </table>
</form>
</body>
</html>
***************************个人设置*****************************
<%'myoption.asp%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>个人设置</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="Microsoft Theme" content="none, default">
<meta name="Microsoft Border" content="none">
</head>

<body background="images/bg05.gif">

<table border="0" width="100%" cellspacing="0">
  <tr>
    <td width="100%"><a href="optionfriend.asp" target="_blank">朋友设置</a></td>
  </tr>
  <tr>
    <td width="100%"><a href="optionbq.asp" target="_blank">表情设置</a></td>
  </tr>
  <tr>
    <td width="100%"><a href="optionacction.asp" target="_blank">动作设置</a></td>
  </tr>
  <tr>
    <td width="100%"><a href="optioninout.asp" target="_blank">进入/退出</a></td>
  </tr>
</table>
</body>
</html>
****************************朋友设置************************
<%'optionfriend.asp%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>朋友设置</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="Microsoft Theme" content="none, default">
<meta name="Microsoft Border" content="none">
</head>

<body>
<%dim sc_user1(30),sc_allfriend(100),sc_friend(30),sc_user,sc_other(30)
dim sc_count
set conn=server.createobject("adodb.connection")
conn.open "chat","chat","chat001"
sc_name = session("ss_name")
sc_user = application("ap_user")
for i = 1 to 30
    sc_user1(i) = sc_user(i,1)
    sc_friend(i) = ""
    sc_other(i) = ""
next
for i = 1 to 100
    sc_allfriend(i) = ""
next
select case request.form("b1")
    case "删除"
        sql2 = "delete user_friend_table where user_name='" + session("ss_name") + "' and user_friend = '" + request.form("d1") + "'"
        set rs2 = conn.execute(sql2)
        sql1 = "select user_friend from user_friend_table where user_name='" + sc_name + "'"
        set rs = conn.execute(sql1)
        j = 0
        if not rs.eof then
            do while not rs.eof
                j = j + 1
                sc_allfriend(j) = rs(0)
                rs.movenext
            loop
            rs.close
        end if
    case "添加"
        sql3 = "insert user_friend_table values('" + session("ss_name") + "','" + request.form("d2") + "')"
        set rs3 = conn.execute(sql3)
        sql1 = "select user_friend from user_friend_table where user_name='" + sc_name + "'"
        set rs = conn.execute(sql1)
        j = 0
        if not rs.eof then
            do while not rs.eof
                j = j + 1
                sc_allfriend(j) = rs(0)
                rs.movenext
            loop
            rs.close
        end if
end select

sql1 = "select user_friend from user_friend_table where user_name='" + sc_name + "'"
set rs = conn.execute(sql1)
j = 0
if not rs.eof then
    do while not rs.eof
        j = j + 1
        sc_allfriend(j) = rs(0)
        rs.movenext
    loop
    rs.close
end if
session("ss_friend") = sc_allfriend
if 5*int(j/5) < j then
    sc_count = int(j/5) + 1
else
    sc_count = int(j/5)
end if
k = 0
l = 0
for i = 1 to 30
    if sc_user1(i) <> "" then
        flag = 0
        for j = 1 to 100
            if trim(sc_user1(i)) = trim(sc_allfriend(j)) then
                k = k + 1
                sc_friend(k) = sc_user1(i)
                flag = 1
                exit for
            end if
        next
        if flag = 0 then
            l =l + 1
            sc_other(l) = sc_user1(i)
        end if
    end if
next
%>

<form method="POST" action="optionfriend.asp">
  <p>你的所有朋友:</p>
  <table border="0" width="100%" cellspacing="0">
<%for i = 1 to sc_count%>
    <tr>
      <td width="20%" align="center"><%response.write(sc_allfriend((i-1)*5 + 1))%>
</td>
      <td width="20%" align="center"><%response.write(sc_allfriend((i-1)*5 + 2))%>
</td>
      <td width="20%" align="center"><%response.write(sc_allfriend((i-1)*5 + 3))%>
</td>
      <td width="20%" align="center"><%response.write(sc_allfriend((i-1)*5 + 4))%>
</td>
      <td width="20%" align="center"><%response.write(sc_allfriend((i-1)*5 + 5))%>
</td>
    </tr>
<%next%>
  </table>
  <p><%if trim(sc_friend(1)) <> "" then%>将<select name="D1" size="1">
<%for i = 1 to 30
if trim(sc_friend(i)) <> "" then
%>    <option value="<%response.write(sc_friend(i))%>"><%response.write(sc_friend(i))%></option>
<%
end if
next%>  </select>从朋友列表中删除<input type="submit" value="删除" name="B1"><%end if%></p>
  <p><%if trim(sc_other(1)) <> "" then%>将<select name="D2" size="1">
<%for i =1 to 30
if trim(sc_other(i)) <> "" then
%>    <option value="<%response.write(sc_other(i))%>"><%response.write(sc_other(i))%></option>
<%
end if
next%>  </select>添加到朋友列表中<input type="submit" value="添加" name="B1"></p>
<%end if%>
</form>
<%conn.close%>
</body>
</html>





--------------------------------------------------------------------------------

贴子转发:

 
E-mail地址:


--------------------------------------------------------------------------------

相关主题:


 我自己写的聊天室源代码(八)  - 【1_apple】 00-4-28 14:42:42 [ID:231657 点击:2] (14774 Bytes) (0)  


--------------------------------------------------------------------------------

回复:

    
版 面:Joy ASP ↑  *为必填项目 第一次发言请去注册>> 怎样使用UBBCode>> UBB Code Editor>> NEW!
姓 名:* 密码: * 密码遗忘请点这里>>
Email:
主 题:*

表 情:
             
             

内 容(最多16KB) 使用签名 设置签名>>   


链接地址: 
链接标题: 
链接图片: 

 
 

⌨️ 快捷键说明

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