泡泡堂服务端内有建站说明,喜欢玩泡泡堂的朋友下载开发.

源代码在线查看: community_qna_write.asp

软件大小: 3830 K
上传用户: lujing200912345
关键词: 服务端
下载地址: 免注册下载 普通下载 VIP

相关代码

				
								login_check = Request.Cookies("LOGIN")("check")
				bomb_id		= trim(Request.Cookies("LOGIN")("bomb_id"))
				bomb_name	= Request.Cookies("LOGIN")("bomb_name")
				
				mode   = request.form ("mode")
				title  = request.form ("title")
				passwd = bomb_id
				text   = request.form ("text")
				ref    = request.form ("ref")
				sort   = request.form ("sort")
				depth  = request.form ("depth")
				index  = request.form ("index")
				email  = request.form ("email")
				if not isNumeric (sort)  then sort  = 0
				if not isNumeric (depth) then depth = 0
				if not isNumeric (ref)   then ref   = 0
				if title  "" then 
					title = replace (title, "					title = replace (title, "'", "''")
				end if
				if text  "" then text = replace (text, "'", "''")
				if email  "" then email = replace (email, "'", "''")
				if name  "" then name = replace (name, "'", "''")
				if passwd  "" then passwd = replace (passwd, "'", "''")
				if bomb_id = "" then mode = ""
				
				if trim(bomb_id)  "" or trim(mode)  "" or trim(title)  "" or trim(text)  "" then
				
					cur_date = NOW ()
					cur_year = Year(date)
					cur_month = Month(date)
					if len(cur_month) = 1 then cur_month = "0" & cur_month
					cur_day = Day(date)
					if len(cur_day) = 1 then cur_day = "0" & cur_day
					reg_date = DateSerial(cur_year, cur_month, cur_day)
					reg_date = reg_date & " " & Hour(cur_date) & ":" & Minute(cur_date) & ":" & Second(cur_date)
					ip = Request.ServerVariables ("REMOTE_ADDR")
				
					if bomb_id  "" then
					  IsMember = "雀盔"
					else
					  IsMember = "厚雀盔"
					end if
				
					if mode="insert" then
						sql = "INSERT INTO QnaBBS ("
						sql = sql & "StarID, name, title, readNum, Email, PWD, comment, IP, IsMember, ref, ref_level, ref_step "
						sql = sql & ") VALUES ("
						sql = sql & "-1,"
						sql = sql & "'" & bomb_id & "', "
						sql = sql & "'" & title  & "', "
						'sql = sql & "'" & reg_date  & "', "
						sql = sql & "0, "
						sql = sql & "'" & email  & "', "
						sql = sql & "'" & passwd  & "', "
						sql = sql & "'" & text & "', "
						sql = sql & "'" & ip & "', "
						sql = sql & "'" & IsMember & "', "
						sql = sql & "0, "
						sql = sql & "0, "
						sql = sql & "0"
						sql = sql & " )"
				
						DBCon.Execute (sql)
						sql = "UPDATE QnaBBS SET ref=idx WHERE ref=0"
						DBCon.Execute (sql)
						response.redirect ("community_qna.asp")
					elseif mode="modify" then
						sql = "UPDATE QnaBBS SET "
						sql = sql & "PWD='" & passwd & "', "
						sql = sql & "title='" & title & "', "
						sql = sql & "comment='" & text & "' "
						if (email  "") then sql = sql & ", Email='" & email & "' "
						sql = sql & "WHERE idx=" & index
						DBCon.Execute (sql)
						response.redirect ("community_qna.asp")
					elseif mode="delete" then
						sql = "SELECT idx FROM QnaBBS WHERE idx=" & index 
						if bomb_id  "nako" then
							sql = sql & " AND name='" & bomb_id & "'"
						end if
						set rs = DBCon.Execute (sql)
						if (rs.EOF) then %>
					
											else
							sql = "DELETE FROM QnaBBS WHERE idx=" & index
							DBCon.Execute (sql)
							response.redirect ("community_qna.asp")
						end if
					elseif mode="reply" then
						sql = "UPDATE QnaBBS SET ref_step=ref_step+1 "
						sql = sql & "WHERE ref=" & ref & " AND ref_step > " & sort
						DBCon.Execute (sql)
						idname = bomb_id
						sql = "INSERT INTO QnaBBS ("
						sql = sql & "StarID, name, title, readNum, Email, PWD, comment, IP, IsMember, ref, ref_level, ref_step "
						sql = sql & ") VALUES ("
						sql = sql & "-1,"
						sql = sql & "'" & bomb_id & "', "
						sql = sql & "'" & title  & "', "
						'sql = sql & "'" & reg_date  & "', "
						sql = sql & "0, "
						sql = sql & "'" & email  & "', "
						sql = sql & "'" & passwd  & "', "
						sql = sql & "'" & text & "', "
						sql = sql & "'" & ip & "', "
						sql = sql & "'" & IsMember & "', "
						sql = sql & ref & ", "
						sql = sql & (CLng(depth)+1) & ", "
						sql = sql & (CLng(sort) +1) & ""
						sql = sql & " )"
				
						DBCon.Execute (sql)
						response.redirect ("community_qna.asp")
					else %>
					
									
					' response.write mode
				
					end if
					rs.close
					set rs=nothing
				
				else %>
				
								
				' response.write mode
				
				end if
				%>
							

相关资源