非常非常非常急,,,解决送300分!!!

dragonhell 2005-03-06 05:51:23
<%
Option Explicit
dim conn,DBPath
dim rs_lar
dim sql,haveerr,star
dim name,sex,byear,bmonth,bday,province,home,education,company,postcalcode
dim tel,fresume,netname,job,sport,book,music
dim people,interest,character
dim i
dim err(14)

if session("admin_pass")<>"ok" then
response.redirect "guanlilogin.asp"
response.end
end if

'-----------------------------------------------------------------
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("guanli/shujuku/shuju.asp")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
'-----------------------------------------------------------------
Set rs_lar = Server.CreateObject("ADODB.Recordset")
sql="select user_id from larchives where user_id =" & session("user_id")
rs_lar.open sql,conn,3,2



name =request("name")
sex =request("sex")
byear =request("byear")
bmonth =request("bmonth")
bday =request("bday")
province =request("province")
home =request("home")
education =request("education")

company =request("company")
postcalcode =request("postcalcode")
tel =request("tel")
fresume =request("fresume")
netname =request("netname")
job =request("job")

sport =request("sport")
book =request("book")
music =request("music")
people =request("people")
interest =request("interest")

character =request("character")

'容错代码--------------------------------------------------------------------------------------------------------------
if len(name)>10 then err(1)="姓名不能超过10个字符!"
if len(name)<2 then err(1)="姓名最少也要2个字符!"
if len(home)>30 then err(2)="地/市不能超过30个字符!"
if len(company)>50 then err(3)="学校不能超过50个字符!"
if company="" then company="-没有-"
if len(postcalcode)<>6 then err(4)="邮政编码是6位!"
if not(isnumeric(postcalcode)) then err(4)="邮政编码必须是数字!"

if tel="" then tel="-没有-"
if len(fresume)>100 then err(5)="贫困举要不能超过100个字符!"
if fresume="" then fresume="-没有-"
if len(netname)>10 then err(6)="班主任姓名最多只能10个字符!"
if len(netname)<2 then err(6)="班主任姓名最少也要2个字符!"
if len(job)>50 then err(7)="班主任电话不能超过50个字符!"
if job="" then job="-没有-"




if len(sport)>10 then err(8)="监护人姓名不能超过10字符!"
if sport="" then err(8)="监护人姓名不能为空!"
if len(book)>10 then err(9)="监护人年龄最多不能超过10个字符!"
if book="" then book="-没有-"
if len(music)>10 then err(10)="监护人关系最多不能超过10个字符!"
if music="" then music="-没有-"
if len(people)>30 then err(11)="监护人电话多不能超过50个字符!"
if people="" then people="-没有-"
if len(interest)>50 then err(12)="监护人职业最多不能超过50个字符!"
if interest="" then interest="-没有-"

if len(character)>50 then err(13)="监护人详细信息不能超过50个字符!"
if character="" then err(13)="监护人详细信息不能不填!"

if not(isdate(byear & "-" & bmonth & "-" & bday)) then err(14)="生日您没有选择或生日日期无效!"
for i=1 to 14
if err(i)<>"" then haveerr="yes"
next


'--------------------------------------------------------------------------------------------------------------------------

if (bmonth=12 and bday>=22) or (bmonth=1 and bday<=19) then
star= "山羊座"
elseif (bmonth=1 and bday>=20) or (bmonth=2 and bday<=18) then
star= "水瓶座"
elseif (bmonth=2 and bday>=19) or (bmonth=3 and bday<=20) then
star= "双鱼座"
elseif (bmonth=3 and bday>=21) or (bmonth=4 and bday<=19) then
star= "白羊座"
elseif (bmonth=4 and bday>=20) or (bmonth=5 and bday<=20) then
star= "金牛座"
elseif (bmonth=5 and bday>=21) or (bmonth=6 and bday<=20) then
star= "双子座"
elseif (bmonth=6 and bday>=21) or (bmonth=7 and bday<=22) then
star= "巨蟹座"
elseif (bmonth=7 and bday>=23) or (bmonth=8 and bday<=22) then
star= "狮子座"
elseif (bmonth=8 and bday>=23) or (bmonth=9 and bday<=22) then
star= "处女座"
elseif (bmonth=9 and bday>=23) or (bmonth=10 and bday<=22) then
star= "天枰座"
elseif (bmonth=10 and bday>=23) or (bmonth=11 and bday<=21) then
star= "天蝎座"
elseif (bmonth=11 and bday>=22) or (bmonth=12 and bday<=21) then
star= "射手座"
end if

%>
<%if haveerr="yes" then%>
<html>
<head>
<LINK href="../style.css" rel=stylesheet type=text/css>
<title>111</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body topmargin="0" leftmargin="0" bgcolor="#9999CC">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="15%" valign="top" bgcolor="#9999CC" style="border-right: 1 solid #000000"><!--#include file="left.asp"--></td>
<td width="85%" align="center" bgcolor="#D8D8EB"><table border="1" width="400" bordercolor="#6699FF" cellspacing="0" align="center">
<tr>
<td width="100%" bgcolor="#6699FF" align="center"><font color="#FFFFFF"><b>错误提示!</b></font></td>
</tr>
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0">
<tr>
<td width="100%" align="center"><p align="left"><b>提交的学生详细信息栏目中发现如下问题</b> </td>
</tr>
<%for i=1 to 14%>
<%if err(i)<>"" then %>
<tr>
<td width="100%"><ul>
<li> <font color="red"> <%=err(i)%> </font> </li>
</ul></td>
</tr>
<%end if%>
<%next%>
<tr>
<td width="100%" align="center"><a href="register.asp" onclick="history.go(-1);return false;">[返回]<a> </a></a></td>
</tr>
</table></td>
</tr>
</table>
</tr>
</table>
</body>
</html>
<%response.end%>
<%end if%>
<%
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("guanli/shujuku/shuju.asp")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs_lar = Server.CreateObject("ADODB.Recordset")

rs_lar.open "larchives",conn,3,2
rs_lar.addnew
rs_lar("user_id") =session("user_id")
rs_lar("name") =name
rs_lar("sex") =sex
rs_lar("britherday") =byear & "-" & bmonth & "-" & bday
rs_lar("age") =datediff("yyyy",byear & "-" & bmonth & "-" & bday,date)
rs_lar("home") =province & home
rs_lar("education") =education

rs_lar("company") =company
rs_lar("postcalcode") =postcalcode
rs_lar("tel") =tel
rs_lar("fresume") =fresume
rs_lar("netname") =netname

rs_lar("job") =job
rs_lar("sport") =sport
rs_lar("book") =book
rs_lar("music") =music
rs_lar("people") =people
rs_lar("interest") =interest

rs_lar("character") =character
rs_lar("ip") =request.ServerVariables("REMOTE_ADDR")
rs_lar("date") =date
rs_lar("time") =time
rs_lar("click") =0
rs_lar("renqi") =0
rs_lar("photo") =0
rs_lar("star") =star
rs_lar.update
rs_lar.close
response.redirect "sendphoto.asp?user_id=" & session("user_id")
%>



我单位有自己的服务器,我也从网上买了空间,这个页面,在服务器上可以浏览,其实是一个提交页面,但到别的机子上这个网页就显示


无法显示网页
您要访问的网页有问题,无法显示。

HTTP 500 - 内部服务器错误
Internet Explorer


放到购买的空间上也是如此,意思就是,本机可以打开此页面,但别的机子不可以,为什么???


各位帮忙看看,我是找的现成代码改的,是不是程序的问题??
解决了送分,送分,送分!!!
...全文
125 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dragonhell 2005-03-06
  • 打赏
  • 举报
回复
谁领分,给我发短信联系我,我去非技术区给你放分!谢谢你们的帮助。
skyboy0720 2005-03-06
  • 打赏
  • 举报
回复
同意: inelm(木野狐)
sensor 2005-03-06
  • 打赏
  • 举报
回复
你的数据库放到购买的网站的根目录 看看 !
nchen123 2005-03-06
  • 打赏
  • 举报
回复
IE 的工具 -> 选项 -> 高级

去掉 "显示友好 http 错误信息" 再看看。
maxid 2005-03-06
  • 打赏
  • 举报
回复
是放到网站的根目录下面吗?

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧