asp文件 在deramweaver中的显示

harveywang 2007-06-06 05:59:39
我下载了一个asp人事系统示例 在dreamweaver中打开 可是以下这段代码对应的表格 却显示不出来 只显示扁扁的一条 里边的东西都不显示 这是为什么
<table width="955" border="0" bordercolor="#16A84D" align="center" cellpadding="3" cellspacing="0">
<tr><td><br>

<form action="./EmployeeInformation.asp" method=post>

<table cellpadding=1 cellspacing=2 border=1 bordercolor="#16A84D" width=955 align=center>
<tr valign="center" align="center">

<td>

<table cellpadding=1 cellspacing=1 border=1 align=center width=100%>
<tr>
<td width=20%><input type="radio" checked name="SendTo" value="AllEmployeeInformation" >
<font color="#16A84D">查询所有员工信息</font></td>
<td>
<input type="radio" checked name="AllOrder" value="xm" >按姓名排序
<input type="radio" name="AllOrder" value="gzbm" >按部门排序
<input type="radio" name="AllOrder" value="gzbh" >按工资编号排序
</td></tr>
<tr><td width=20%>
<input type="radio" name="SendTo" value="DepartmentEmployeeInformation" >
<font color="#16A84D">查询某部门员工信息</font></td>
<td>
<select name="DepartmentName" >
<%
Do Until RSDepartments.EOF
%>
<option value="<% Response.Write RSDepartments("DepartmentName") %>">
<% Response.Write RSDepartments("DepartmentName") %></option>
<%
RSDepartments.Movenext
loop
%>
</select></td></tr>

<tr><td>
<input type="radio" name="SendTo" value="OneEmployeeInformation" >
<font color="#16A84D">查询某个员工信息</font>
</td><td>

<table width=100% border=1>
<tr><td>
<input type="radio" Checked name="CheckName" value="FromList" ><font color="#16A84D">从列表中选择</font>
</td><td>
<select name="RoleName" >
<%
Do Until RSRoles.EOF
%>
<option value="<% Response.Write RSRoles("xm") %>"><% Response.Write RSRoles("xm") %></option>
<%
RSRoles.Movenext
loop
%>
</select>
</td></tr>
<tr><td>
<input type="radio" name="CheckName" value="Type" ><font color="#16A84D">从输入的名字查询</font>
</td>
<td>
<input type="text" Checked name="TypeName" value="" >
</td></tr></table>
</td></tr>
<tr><td width=20%><input type="radio" name="SendTo" value="DepartmentManager" >
<font color="#16A84D">查询部门主管信息</font></td><td> </td></tr>
<th colspan="2" scope="col"><input type="checkbox" name="checkbox" value="checkbox">工资编号</th>

</table>
</td>
</tr>
</table>

<table cellpadding=0 cellspacing=0 BORDER=1 width=955 align=center>
<tr VALIGN="top" ALIGN="center"><td width=100% align=center >
<input type="submit" name="Send" value="进入选项" style="border: 1px solid #34BB66; background-color: #B6EBCA; color: #34BB66">
</td></tr></table>

<br>

<%
if not IsEmpty(Request.Form("Send")) then
Response.Write "<table width=100% border=0 bgcolor=#16A84D "_
& "cellspacing=1 cellpadding=2 align=center>"
Response.Write "<tr><td><font color=white><P ALIGN=CENTER>" & TheMessage
Response.Write "</font></td></tr>"
'如果不输出查询结果
if Label=false then
Response.Write "</table>"
else
'如果要输出查询结果
Response.write "<tr bgcolor=white ><td align=center>"
Response.write "<table width=100% bgcolor=#16A84D " _
& "border=0 cellspacing=1 cellpadding=2 align=center>"
Response.write "<tr><td><font color=white>工资编号</font></td>"
Response.write "<td><font color=white>姓名</font></td>"
Response.write "<td><font color=white>性别</font></td>"
Response.write "<td><font color=white>身份证号</font></td>"
Response.write "<td><font color=white>民族</font></td>"
Response.write "<td><font color=white>籍贯</font></td>"
Response.write "<td><font color=white>政治面貌</font></td>"
Response.write "<td><font color=white>出生年月</font></td>"
Response.write "<td><font color=white>工作部门</font></td></tr> "
if not IsEmpty(RSenquiryResult) then
do Until RSEnquiryResult.eof
Response.write "<tr bgcolor=white>"
Response.write "<td>"& RSEnquiryResult("gzbh") &"</td>"
Response.write "<td>" & RSEnquiryResult("xm") & "</td>"
' Response.write "<td><a href=mailto:" & RSEnquiryResult("EmailAddress") & ">"
' Response.write "<font face=arial>" & RSEnquiryResult("EmailAddress") _
' & "</font></a></td>"
Response.write "<td>" & RSEnquiryResult("xb") & "</td>"
Response.write "<td>" & RSEnquiryResult("sfzh") & "</td>"
Response.write "<td>" & RSEnquiryResult("mz") & "</td>"
Response.write "<td>" & RSEnquiryResult("jg") & "</td>"
Response.write "<td>" & RSEnquiryResult("zzmm") & "</td>"
Response.write "<td>" & RSEnquiryResult("csny") & "</td>"
Response.write "<td>" & RSEnquiryResult("gzbm") & "</td></tr>"
RSEnquiryResult.Movenext
Loop
end if
Response.Write "</table></td></tr></table>"
end if
end if
%>


</tr></table>
...全文
159 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
harveywang 2007-06-06
  • 打赏
  • 举报
回复
<td>
<input type="radio" checked name="AllOrder" value="xm" >按姓名排序
<input type="radio" name="AllOrder" value="gzbm" >按部门排序
<input type="radio" name="AllOrder" value="gzbh" >按工资编号排序
</td></tr>
<tr><td width=20%>
<input type="radio" name="SendTo" value="DepartmentEmployeeInformation" >
<font color="#16A84D">查询某部门员工信息</font></td>
<td>
<select name="DepartmentName" >
<%
Do Until RSDepartments.EOF
%>
<option value="<% Response.Write RSDepartments("DepartmentName") %>">
<% Response.Write RSDepartments("DepartmentName") %></option>
<%
RSDepartments.Movenext
loop
%>
</select></td></tr>

<tr><td>
<input type="radio" name="SendTo" value="OneEmployeeInformation" >
<font color="#16A84D">查询某个员工信息</font>
</td><td>

<table width=100% border=1>
<tr><td>
<input type="radio" Checked name="CheckName" value="FromList" ><font color="#16A84D">从列表中选择</font>
</td><td>
<select name="RoleName" >
<%
Do Until RSRoles.EOF
%>
<option value="<% Response.Write RSRoles("xm") %>"><% Response.Write RSRoles("xm") %></option>
<%
RSRoles.Movenext
loop
%>
</select>
</td></tr>
<tr><td>
<input type="radio" name="CheckName" value="Type" ><font color="#16A84D">从输入的名字查询</font>
</td>
<td>
<input type="text" Checked name="TypeName" value="" >
</td></tr></table>
</td></tr>
<tr><td width=20%><input type="radio" name="SendTo" value="DepartmentManager" >
<font color="#16A84D">查询部门主管信息</font></td><td> </td></tr>
<th colspan="2" scope="col"><input type="checkbox" name="checkbox" value="checkbox">工资编号</th>

</table>
</td>
</tr>
</table>

<table cellpadding=0 cellspacing=0 BORDER=1 width=955 align=center>
<tr VALIGN="top" ALIGN="center"><td width=100% align=center >
<input type="submit" name="Send" value="进入选项" style="border: 1px solid #34BB66; background-color: #B6EBCA; color: #34BB66">
</td></tr></table>

<br>

<%
if not IsEmpty(Request.Form("Send")) then
Response.Write "<table width=100% border=0 bgcolor=#16A84D "_
& "cellspacing=1 cellpadding=2 align=center>"
Response.Write "<tr><td><font color=white><P ALIGN=CENTER>" & TheMessage
Response.Write "</font></td></tr>"
'如果不输出查询结果
if Label=false then
Response.Write "</table>"
else
'如果要输出查询结果
Response.write "<tr bgcolor=white ><td align=center>"
Response.write "<table width=100% bgcolor=#16A84D " _
& "border=0 cellspacing=1 cellpadding=2 align=center>"
Response.write "<tr><td><font color=white>工资编号</font></td>"
Response.write "<td><font color=white>姓名</font></td>"
Response.write "<td><font color=white>性别</font></td>"
Response.write "<td><font color=white>身份证号</font></td>"
Response.write "<td><font color=white>民族</font></td>"
Response.write "<td><font color=white>籍贯</font></td>"
Response.write "<td><font color=white>政治面貌</font></td>"
Response.write "<td><font color=white>出生年月</font></td>"
Response.write "<td><font color=white>工作部门</font></td></tr> "
if not IsEmpty(RSenquiryResult) then
do Until RSEnquiryResult.eof
Response.write "<tr bgcolor=white>"
Response.write "<td>"& RSEnquiryResult("gzbh") &"</td>"
Response.write "<td>" & RSEnquiryResult("xm") & "</td>"
' Response.write "<td><a href=mailto:" & RSEnquiryResult("EmailAddress") & ">"
' Response.write "<font face=arial>" & RSEnquiryResult("EmailAddress") _
' & "</font></a></td>"
Response.write "<td>" & RSEnquiryResult("xb") & "</td>"
Response.write "<td>" & RSEnquiryResult("sfzh") & "</td>"
Response.write "<td>" & RSEnquiryResult("mz") & "</td>"
Response.write "<td>" & RSEnquiryResult("jg") & "</td>"
Response.write "<td>" & RSEnquiryResult("zzmm") & "</td>"
Response.write "<td>" & RSEnquiryResult("csny") & "</td>"
Response.write "<td>" & RSEnquiryResult("gzbm") & "</td></tr>"
RSEnquiryResult.Movenext
Loop
end if
Response.Write "</table></td></tr></table>"
end if
end if
%>


</tr></table>
</body></html>
harveywang 2007-06-06
  • 打赏
  • 举报
回复
全部代码 如下:

<%@ Language=VBScript %>
<%
'判断用户是否登录
if isempty(Session("ID")) then
Response.Redirect "../login.asp"
end if
'连接系统数据库
set conn = server.createobject ("adodb.connection")
conn.open "driver={SQL Server};server=xxbwjh;database=ASPData;uid=sa;pwd=sa"
'判断用户是否提交了表单
if not IsEmpty(Request.Form("Send")) then
'如果用户希望查询全部员工信息
if Request.Form("SendTo") = "AllEmployeeInformation" then
Set RSEnquiryResult = conn.Execute("select * from yuangong order by " & Request.Form("AllOrder"))
TheMessage = "全体员工信息按" & Request.Form("AllOrder") & "排序如下"
label=true
'如果用户希望查询某个部门员工信息
elseif Request.Form("SendTo") = "DepartmentEmployeeInformation" then
Set RSEnquiryResult = conn.Execute("select * from yuangong where gzbm = '" _
& Request.Form("DepartmentName") &"' order by zw" )
TheMessage = Request.Form("DepartmentName") & "全部员工信息如下"
label=true
'如果用户希望进入修改个人信息页面
elseif Request.Form("SendTo") = "ModifyPersonalInformation" then
Response.Redirect "ModifyPersonalInformation.asp"
'如果用户希望进入系统管理员页面
elseif Request.Form("SendTo") = "SystemManager" then
if Session("IsSystemManager")=true then
Session("SystemOrder")=Request.Form("SystemOrder")
Response.Redirect "SystemManager.asp"
else
TheMessage=" 对不起,您不是系统管理员,没有此项权限"
Label=false
end if
'如果用户希望查询某个员工信息
elseif Request.Form("SendTo") = "OneEmployeeInformation" then
Label=true
if Request.Form("CheckName")="FromList" then
Set RSEnquiryResult = conn.Execute("select * from yuangong where xm = '" _
& Request.Form("RoleName") &"' " )
TheMessage ="查询员工 '"&Request.Form("RoleName") & "' 信息结果如下"
else
Set RSEnquiryResult = conn.Execute("select * from yuangong where xm = '" _
& Request.Form("TypeName") &"' " )
TheMessage ="查询员工 '"&Request.Form("TypeName") & "' 信息结果如下"
end if
'如果用户希望查询部门主管信息
else
Set RSEnquiryResult = conn.Execute("select * from yuangong where zw='主管'" )
TheMessage = "各部门主管信息如下"
label=true
end if
'如果用户是第一次进入页面
else
TheMessage = "请在下面选择员工信息管理选项"
end if
set RSDepartments = conn.Execute("select DepartmentName from Departments order by DepartmentName")
set RSRoles = conn.Execute("select xm from yuangong order by xm")
%>

<html>
<head>
<title>员工信息管理系统</title>
</head>
<body>

<table width=955 border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td align=center ><div align="center"><img src="../ASPLogo3.jpg" width=800 height=123></div></td>
</tr></table>
<table width="955" border="0" bordercolor="#16A84D" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="955" height="12"></td></tr></table>
<br>

<table width=955 border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3>
<font color=white>
<P ALIGN="CENTER">公司内部办公信息管理系统->员工信息管理系统 [当前用户-<% response.write Session("Name") %>]
</font></td></tr>
<tr bgcolor=white >
<td><a href=".././html/home.asp"><font color="#10AD4D">返回内网主页</font></a></td>
<td align=center> <font color="#10AD4D" ><% response.write TheMessage %></FONT></td>
<td align=right><a href=".././html/home.asp"><font color="#10AD4D">返回上一级网页</font></a></td>
</tr></table>

<table width="955" border="0" bordercolor="#16A84D" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="955" height="12"></td></tr></table>

<table width="955" border="0" bordercolor="#16A84D" align="center" cellpadding="3" cellspacing="0">
<tr><td><br>

<form action="./EmployeeInformation.asp" method=post>

<table cellpadding=1 cellspacing=2 border=1 bordercolor="#16A84D" width=955 align=center>
<tr valign="center" align="center">

<td>

<table cellpadding=1 cellspacing=1 border=1 align=center width=100%>
<tr>
<td width=20%><input type="radio" checked name="SendTo" value="AllEmployeeInformation" >
<font color="#16A84D">查询所有员工信息</font></td>

28,391

社区成员

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

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