| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 400 人关注过本帖
标题:[求助]重新发:在网上报修系统中出现的问题
只看楼主 加入收藏
lcd2105
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-8-22
收藏
 问题点数:0 回复次数:2 
[求助]重新发:在网上报修系统中出现的问题

因上原有贴子上字体调不了,所以重新发一份.
我的一个上网报修系统,在Windows XP SP2系统界面下,进入管理页面中时可以从数据库出来的数据,显示表格的具体内容。
而我把这个程序放要Windows2003 Server SP1系统界面下,进入管理页面时看不到数据,只显示暂时没有信息!。这是哪里出了错?
这个页面的代码是这样的:
<!--#include file =conn2.asp-->
<%if session("pass")<>"ok" then
Response.Redirect "index.asp"
Response.End
end if
%>
<%
const MaxPerPage=30
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename

if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim sql
dim rs
dim rstype
dim typesql
dim typeid,typename1
if not isEmpty(request("typeid")) then
typeid=request("typeid")
else
typeid=1
end if
%>
<%
user_lib="admin"
Set radmin = Server.CreateObject("ADODB.Recordset")
sql="select * from guestbook order by pubtime desc"'"
radmin.open sql,conn,3,2
%>
<html>
<head>
<title>后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" >
<!--#include file =houtai.asp-->
<table border="0" width="98%" cellspacing="0" cellpadding="0" height="72" align="center">
<tr>
<td width="14%" height="44" align=center>
<td width="63%" height="44" align=center>
<div align="center"> </div>
<td width="23%" height="44" align=center>
<tr>
<td align=center colspan="3">
<%
sql="select * from guestbook order by pubtime desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂时没有信息!</p>"
else
totalPut=rs.recordcount
TotalPage = RS.PageCount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if

end if
if currentPage=1 then
showpage totalput,MaxPerPage,"lyedit.asp"
showContent
showpage totalput,MaxPerPage,"lyedit.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"lyedit.asp"
showContent
showpage totalput,MaxPerPage,"lyedit.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"lyedit.asp"
showContent
showpage totalput,MaxPerPage,"lyedit.asp"
end if
end if
rs.close
end if

set rs=nothing
sub showContent
dim i
i=0

%>
<table cellspacing="0" bordercolorlight="#FFFFFF" width="100%">
<tr align="center">
<td valign="top" colspan="3">
<table width="100%" cellpadding="0" cellspacing="1" border="0" bordercolordark="#FFFFFF" bordercolorlight="#808080" bgcolor="#66CCCC" >
<tr bgcolor="#66FFCC" >
<td width="79" height="25" > <div align="center">编号</div></td>
<td width="360" height="25" > <div align="center">维修反馈</div></td>
<td width="158" height="25" ><div align="center">维修人员</div></td>
<td width="212" height="25" ><div align="center">维修时间</div></td>
<td width="96" height="25" ><div align="center">修复与否</div></td>
<td width="73" height="25" ><div align="center">删除</div></td>
</tr>
<%do while not rs.eof
id=rs("id")
pubname=rs("pubname")
pubtime=rs("pubtime")
pubmain=rs("pubmain")
publink=rs("publink")
cap=server.urlencode(id)
%>
<tr bgcolor="#FFFFFF" >
<td width="79" height="25" >
<div align="center"><font color="#FF0000"><%=id%></font></div></td>
<td width="360" height="25" > <div align="center"><font color="#0000FF"><%=rs("pubmain")%></font></div></td>
<td width="158" height="25" ><div align="center"><font color="#0000FF"><%=rs("pubname")%></font></div></td>
<td width="212" height="25" ><div align="center"><font color="#0000FF"><%=rs("pubtime")%></font> </div></td>
<td width="96" height="25" ><div align="center"><font color="#0000FF"><%=rs("publink")%></font></div></td>
<td width="73" height="25" ><div align="center"><font color="#333333" ><a href="dele_ly.asp?id=<%=id%>">删除</a></font></div></td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<%
end sub

function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action='lyedit.asp?user="&username&"'>"
response.write "<p align='center' vAlign='bottom'>"
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font>&nbsp;"
else
response.write "<a href="&filename&"?page=1&typename="&typename&"&keyword="&keyword&">首页</a>&nbsp;"
response.write "<a href="&filename&"?page="&CurrentPage-1&"&typename="&typename&"&keyword="&keyword&">上一页</a>&nbsp;"
end if
if n-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&CurrentPage+1&"&typename="&typename&"&keyword="&keyword&">下一页</a>&nbsp;"
response.write "<a href="&filename&"?page="&n&"&typename="&typename&"&keyword="&keyword&">尾页</a>"
end if
response.write "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write "&nbsp;共<b>"&totalnumber&"</b>条信息 <b>"&maxperpage&"</b>条信息/页 "
response.write " &nbsp;转到:"
%>
<select name="Page" <% if totalpage = 0 then Response.Write("disabled")%> size=1 class=smallselsect style="BACKGROUND-COLOR:#BBE3FF;font-family: verdana; font-size:7pt;">
<% for I = 1 to n %>
<option value="<%=I%>" <% if I = CInt(CurrentPage) then Response.write("selected") end if %>><%=I%></option>
<% Next %>
</select>
<%
response.write "&nbsp;<input class=buttonface type='submit' value='ENTER' name='cndok' style='border: 1px #333333 solid; background-color: #BBE3FF; font-family:verdana; font-size: 7pt;'></span></p></form>"
end function
%>
</td>
</tr>
</table>
</table>

<%
radmin.close
set radmin=nothing%>


[此贴子已经被作者于2006-9-21 16:11:01编辑过]

搜索更多相关主题的帖子: 系统 数据库 报修 Response 
2006-09-21 16:09
islet
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:89
帖 子:6548
专家分:0
注 册:2005-1-28
收藏
得分:0 
那可能是权限问题
2006-09-21 16:20
lcd2105
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-8-22
收藏
得分:0 
楼上的版主,那是需要增加哪里权限,请指点.
2006-09-22 09:34
快速回复:[求助]重新发:在网上报修系统中出现的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037479 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved