Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
vote_save.asp
Package: NetPhone.rar [view]
Upload User: xxtaishan
Upload Date: 2022-01-02
Package Size: 4063k
Code Size: 2k
Category:
VOIP program
Development Platform:
ASP/ASPX
- <!--#include file="vote_conn.asp"-->
- <%
- if request("id")<>"del" then
- err=0
- title=request("title")
- if title="" then
- err=1
- error=error+"标题不能为空n"
- end if
- a=0
- for i=1 to request("choose").count
- if request("choose")(i)="" then
- exit for
- end if
- a=a+1
- next
- if a=0 then
- err=1
- error=error+"选择内容不能为空n"
- end if
- if err=1 then
- response.write "<script>alert('"&error&"');</script>"
- response.write "<script>history.back(1);</script>"
- response.end
- end if
- end if
- if request("id")="xg" then '调查修改
- conn.execute("update class set title='"&title&"',style='"&request("style")&"' where id="&request("classid"))
- conn.execute("delete from vote where class="&request("classid"))
- for i=1 to request("choose").count
- if request("choose")(i)<>"" then
- conn.execute("insert into vote (vote,color,class) values ('"&request("choose")(i)&"','"&request("color")(i)&"',"&request("classid")&")")
- else
- exit for
- end if
- next
- response.write "<script>alert('修改调查成功');</script>"
- response.write "<script>location.href='vote_list.asp';</script>"
- elseif request("id")="del" then '调查删除
- conn.execute("delete from vote where class="&request("classid"))
- conn.execute("delete from class where id="&request("classid"))
- response.write "<script>alert('删除调查成功');</script>"
- response.write "<script>location.href='vote_list.asp';</script>"
- else
- conn.execute("insert into class (title,style) values ('"&title&"','"&request("style")&"')")
- set rs=server.createobject("adodb.recordset")
- sql="select top 1 * from class where title='"&title&"' order by id desc"
- rs.open sql,conn,3,1
- classid=rs("id")
- rs.close
- set rs=nothing
- for i=1 to request("choose").count
- if request("choose")(i)<>"" then
- conn.execute("insert into vote (vote,color,class) values ('"&request("choose")(i)&"','"&request("color")(i)&"',"&classid&")")
- else
- exit for
- end if
- next
- response.write "<script>alert('添加调查成功');</script>"
- response.write "<script>location.href='vote_list.asp';</script>"
- end if
- conn.close
- set conn=nothing
- %>