
asp+sql server 复选框数据如何提交到数据库 5
<!--#includefile="../Include/Class_Conn.asp"--><!--#includefile="../Include/Class_Mai...
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Public/Company_Cookies.asp" -->
<%
Dim Comid,Username,Tmp
Dim Cmd,Rs,Action
Dim PhoneKeep,EmailKeep,PublishCount,Publish_Flag,EndDate
Action = Request.QueryString("action")
If Action = "submit" Then Call Submit() '//调用保存数据的函数
'//获取会员登陆的标记
Username = Session("Company")(0)
Comid = Session("Company")(2)
SQL = "Select Nc_Vip_Flag,Nc_Vip_Date,Nc_Vip_EndDate From [pH_Company_Base] Where Comid='"&Comid&"'"
Set Rs = Conn.Execute(SQL)
Nc_Vip_Date = Rs("Nc_Vip_Date")
Nc_Vip_EndDate = Rs("Nc_Vip_EndDate")
Vip_Flag = Rs("Nc_Vip_Flag")
if Vip_Flag=true And DateDiff("d",Nc_Vip_Date,Date()) >= 0 And DateDiff("d",Nc_Vip_EndDate,Date()) <= 0 Then
aaction="ture"
else
aaction="false"
end if
rs.close
job_num=conn.Execute("select count(JobId) from pH_Job_Base where Comid='"&Comid&"'")(0)
if int(job_num)>=int(Cls_WebJobs) and aaction="false" then
response.write "<script language=JavaScript>" &"alert('您发布的职位数量超过限制,请升级后再发布!');" & "history.back()" & "</script>"
response.end
end if
'//调用存储过程
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Com_Publish"
Cmd.CommandType = 4
Cmd.Parameters.Append Cmd.CreateParameter("@Comid",200,1,30)
Cmd.Parameters("@Comid") = Comid
Set Rs = Cmd.Execute
If Rs.Eof Then
Rs.Close
Set Cmd = Nothing
CloseDB
Response.write "没有找到会员资料!"
Response.End()
End if
Tmp = Rs.GetRows() '//将数据填充到数组
'//0企业名称1联系人,2电话,3电话保密,4传真,5邮件,6邮件保密,7地址,8邮政编码,9发布职位数,10会员有否通过审核
'//如 Tmp(0,0) 表示企业名称
'//关闭数据库对象
Rs.Close
Set Cmd = Nothing
'//判断会员有没有通过审核
Flag = Tmp(10,0)
'If Flag = False Then
'Response.redirect "../Public/"&asp_html(Cls_html,"Error",1,"Param",2003,0,0)&""
'Response.End()
'End if
'//判断该企业会员能否发布职位
Set Re = Conn.Execute("Select Nc_Vip_Jobs From [pH_Company_Base] Where Comid='"&Comid&"'")
Jobs = Re(0)
Re.Close
If Jobs <= 0 Then
Response.redirect "../Public/"&asp_html(Cls_html,"Error",1,"Param",2001,0,0)&""
End if
'//功能代码
EndDate = DateAdd("m",3,Date())
PhoneKeep = Tmp(3,0)
EmailKeep = Tmp(6,0)
%>
这里粘贴不完!
有谁能帮忙的
请与QQ联系! 展开
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Public/Company_Cookies.asp" -->
<%
Dim Comid,Username,Tmp
Dim Cmd,Rs,Action
Dim PhoneKeep,EmailKeep,PublishCount,Publish_Flag,EndDate
Action = Request.QueryString("action")
If Action = "submit" Then Call Submit() '//调用保存数据的函数
'//获取会员登陆的标记
Username = Session("Company")(0)
Comid = Session("Company")(2)
SQL = "Select Nc_Vip_Flag,Nc_Vip_Date,Nc_Vip_EndDate From [pH_Company_Base] Where Comid='"&Comid&"'"
Set Rs = Conn.Execute(SQL)
Nc_Vip_Date = Rs("Nc_Vip_Date")
Nc_Vip_EndDate = Rs("Nc_Vip_EndDate")
Vip_Flag = Rs("Nc_Vip_Flag")
if Vip_Flag=true And DateDiff("d",Nc_Vip_Date,Date()) >= 0 And DateDiff("d",Nc_Vip_EndDate,Date()) <= 0 Then
aaction="ture"
else
aaction="false"
end if
rs.close
job_num=conn.Execute("select count(JobId) from pH_Job_Base where Comid='"&Comid&"'")(0)
if int(job_num)>=int(Cls_WebJobs) and aaction="false" then
response.write "<script language=JavaScript>" &"alert('您发布的职位数量超过限制,请升级后再发布!');" & "history.back()" & "</script>"
response.end
end if
'//调用存储过程
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Com_Publish"
Cmd.CommandType = 4
Cmd.Parameters.Append Cmd.CreateParameter("@Comid",200,1,30)
Cmd.Parameters("@Comid") = Comid
Set Rs = Cmd.Execute
If Rs.Eof Then
Rs.Close
Set Cmd = Nothing
CloseDB
Response.write "没有找到会员资料!"
Response.End()
End if
Tmp = Rs.GetRows() '//将数据填充到数组
'//0企业名称1联系人,2电话,3电话保密,4传真,5邮件,6邮件保密,7地址,8邮政编码,9发布职位数,10会员有否通过审核
'//如 Tmp(0,0) 表示企业名称
'//关闭数据库对象
Rs.Close
Set Cmd = Nothing
'//判断会员有没有通过审核
Flag = Tmp(10,0)
'If Flag = False Then
'Response.redirect "../Public/"&asp_html(Cls_html,"Error",1,"Param",2003,0,0)&""
'Response.End()
'End if
'//判断该企业会员能否发布职位
Set Re = Conn.Execute("Select Nc_Vip_Jobs From [pH_Company_Base] Where Comid='"&Comid&"'")
Jobs = Re(0)
Re.Close
If Jobs <= 0 Then
Response.redirect "../Public/"&asp_html(Cls_html,"Error",1,"Param",2001,0,0)&""
End if
'//功能代码
EndDate = DateAdd("m",3,Date())
PhoneKeep = Tmp(3,0)
EmailKeep = Tmp(6,0)
%>
这里粘贴不完!
有谁能帮忙的
请与QQ联系! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询