功能强大的一个b/s工作站

源代码在线查看: guestbook_body.asp

软件大小: 4313 K
上传用户: WUYUEASDF
关键词: 工作站
下载地址: 免注册下载 普通下载 VIP

相关代码

								rem ------------------
				rem -----留言显示-----
				rem ------------------
				sub showgb_body()
				dim totalgb,Currentpage,totalpages,i
				opengb
				sql="SELECT * FROM gb ORDER BY gb_id DESC"
				if request("key")"" and request("colname")"" then
				sql="select * from gb where "& request("colname") &" like '%"& request("key") &"%' order by gb_id desc"
				end if
				set rs=server.createobject("adodb.recordset")
				rs.open sql,conn,1,1
				%>
				
				   
				     
				      
				         
						
						  
						
				         
				          				      onFocus=if(this.blur)this.blur() 
				      href="New_gb.asp?action=gb" target=_self>发表留言  				      target=_self>站点首页 
				           
				            
				              				      title=" You can search the entire guestbook 
 To leave search mode 
 Search an empty string or 
 Click the ALL link that will show up below " 
				      name=key>
				              
				              
				                留言者
				                留言内容
				              
				            
				          
				        
				        				rs.movefirst
				rs.pagesize=gbperpage
				if trim(request("page"))"" then
				   currentpage=clng(request("page"))
				   if currentpage>rs.pagecount then
				      currentpage=rs.pagecount
				   end if
				else
				   currentpage=1
				end if
				   totalgb=rs.recordcount
				   if currentpage1 then
				       if (currentpage-1)*gbperpage					       rs.move(currentpage-1)*gbperpage
						   dim bookmark
						   bookmark=rs.bookmark
					   end if
				   end if
				   if (totalgb mod gbperpage)=0 then
				      totalpages=totalgb\gbperpage
				   else
				      totalpages=totalgb\gbperpage+1
				   end if
				i=0
				do while not rs.eof and i				sql="select * from reply where gb_id="&rs("gb_id")
				set rsrep=server.createobject("adodb.recordset")
				rsrep.open sql,conn,1,1%>
				         
				          
				             () 
							  
				              
				              
							  
							  
							  
				               
				              
				              
				               
				              
				              
				               
				              
				            
				            				      class=entry2text> 
				              ()   
				            							dim totalrep,Currentreppage,totalreppages,j
				rsrep.movefirst
				rsrep.pagesize=gbrepperpage
				reppage="reppage"&i
				if trim(request(reppage))"" then
				   currentreppage=clng(request(reppage))
				   if currentreppage>rsrep.pagecount then
				      currentreppage=rsrep.pagecount
				   end if
				else
				   currentreppage=1
				end if
				   totalrep=rsrep.recordcount
				   if currentreppage1 then
				       if (currentreppage-1)*gbrepperpage					       rsrep.move(currentreppage-1)*gbrepperpage
						   dim repbookmark
						   repbookmark=rsrep.bookmark
					   end if
				   end if
				   if (totalrep mod gbrepperpage)=0 then
				      totalreppages=totalrep\gbrepperpage
				   else
				      totalreppages=totalrep\gbrepperpage+1
				   end if
				j=0
				do while not rsrep.eof and j				k=j+1%>
				             回复
				            
				            
				            							rsrep.movenext
				loop
				end if
				%>
				 共有条回复 
				              				j=1
				for j=1 to totalreppages%>
								if j=currentreppage then
				%>
				               
				              							  if request("page")"" then
							  %>
				               
							  
							   
				              							  end if
				next
				end if%>
				          
				        
				        				rsrep.close
				set rsrep=nothing
				i=i+1
				rs.movenext
				loop
				else
				if rs.eof and rs.bof then
				%>
				         
				           
				            				      class=entry2text>暂时没有人留言!
				          
				        
				        				end if
				end if
				rs.close
				set rs=nothing
				%>
				         
				           
				            [				      href="admin_gb.asp" target=_self>管理					  sqla="select * from admin"
				  set rsa=conn.execute(sqla)
				  if request.cookies("NGB")("adminname")=rsa("admin_name") and request.cookies("NGB")("adminpwd")=rsa("admin_password") then%>				  gbadmin_cp.asp">更改密码/				      href="gbadmin_logout.asp" target=_self>退出				  rsa.close
				  set rsa=nothing
				  else%>				      href="admin_gb.asp" target=_self>管理				  end if%>] [				      href="" target=_self>主页] 共有条留言|页
				              				i=1
				for i=1 to totalpages
				if i=currentpage then
				%>
				               
				              							  if request("key")"" and request("colname")"" then%>
							  [] 
							  
				              [] 
				              							  end if
				next%>
				               
				          
				        
				         
				      
				    
				  
				
							

相关资源