关于本站
	
	“最难不过坚持”
本人承接扒站仿站,php网站维护,病毒查杀,网站编辑,网站改版,html制作
有需要网站维护,改版,病毒查杀,网站编辑,网站备案,html制作等相关的工作可以联系我。
本人有多年相关工作经验,也可提供免费咨询,交个朋友。
有需要探讨问题的朋友,也可以加我微信,共同探讨!
微信:15011482830 QQ:408917339
		
		 2712
		 39
	
分类目录
	最新评论
	- https://jueru.net/
- 
			评 留言  
- :weixiao:
- 
			评 留言  
- :shuijiao: :weiqu: :zhenbang: :leng:
- 
			评 留言  
- :yiwen: :yiwen: :yiwen: :yiwen:
- 
			评 EasySass: could not generate CSS file. See Output panel for details.  
- 这个业务逻辑多少都有点奇怪了,阅读浏览次数增值在新闻详情页的控制器方法里setInc,这怎么还写进模型事件里了。如果非要用onAfterRead也可以,把新闻文章的内容单独分出来一个news_content表,然后把它和news做关联,然后给news_content表的onAfterRead事件做增值处理,这样点进新闻页内查询到文章内容时才会触发它。
- 
			评 TP6模型事件-查询后onAfterRead不好用  
文章标签更多 
	
效果:
	 
分页函数:
'**************************************************
'函数名:JoinChar
'作  用:向地址中加入 ? 或 &
'参  数:strUrl  ----网址
'返回值:加了 ? 或 & 的网址
'**************************************************
function JoinChar(strUrl)
	if strUrl = "" then
		JoinChar = ""
		exit function
	end if
	if InStr(strUrl,"?") < len(strUrl) then 
		if InStr(strUrl,"?") > 1 then
			if InStr(strUrl,"&") < len(strUrl) then 
				JoinChar = strUrl & "&"
			else
				JoinChar = strUrl
			end if
		else
			JoinChar = strUrl & "?"
		end if
	else
		JoinChar = strUrl
	end if
end function
'**************************************************
'函数名:csPage1
'作  用:显示分页:首页 上一页 1 2 3 4 5 6 7 8 下一页 尾页
'参  数:strfilename   ----网址
'        totalnumber ----总条数
'        maxperpage  ----每页条数
'        currentpage  ----当前页
'返回值:分页html
'**************************************************
function csPage1(strfilename,totalnumber,maxperpage,currentpage)
	dim n,i,strTemp,strUrl
	if totalnumber mod maxperpage = 0 then
    	n = totalnumber \ maxperpage
  	else
    	n = totalnumber \ maxperpage + 1
  	end if
	strUrl = JoinChar(strfilename) '向网址中加入 ? 或  & 
	if currentpage <> 1 then strTemp = "<a href=""" & strUrl & "page=1"">首页</a> <a href=""" & strUrl & "page=" & currentpage-1 & """>上一页</a> "
	if n < 10 or currentpage < 10 then
		istart = 1
		if n < 10 then iend = n else iend = 10
	elseif n-currentpage < 10 then
		istart = n - 10
		iend = n
	else
		istart = currentpage - 4
		iend = currentpage + 5
	end if 
	for i = istart to iend
		if i = currentpage then
			'strTemp=strTemp & "<span class='pnnum1'>" & i & "</span> "
			strTemp = strTemp & "<a class='on' href=""" & strUrl & "page=" & i & """>" & i & "</a> "
		else
			strTemp = strTemp & "<a href=""" & strUrl & "page=" & i & """>" & i & "</a> "
		end if
	next
	if currentpage <> n then strTemp = strTemp & "<a href=""" & strUrl & "page=" & currentpage+1 & """>下一页</a> <a href=""" & strUrl & "page=" & n & """>尾页</a>"
	csPage1 = strTemp
end function
调用:
<div class="page_list"> <%=csPage1(strfilename,num,pagesiz,currentpage)%> </div>css样式:
.page_list{text-align:center;}
.page_list a{display:inline-block;padding:0 10px;background:#ddd;height:30px;line-height:30px;text-align:center;margin-right: 5px;}
.page_list a.on{background:#015F84;color:#ffffff;}
				
							赏
							
								 
				
							
						
						 
				
							 
					
					
				相关推荐
				
				
								asp的Base64加密解密函数
								
								
						<%
OPTION EXPLICIT
const BASE_64_MAP_INIT = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
dim newline
dim Base64EncMap(63)
dim Base64DecMap(127)
'...
							
								请问这个函数是什么意思 CreateObject("MSXML2.XMLHTTP")
								
								
						
private Function getHTTPPage(url)
	On Error Resume Next
	Dim http
	Set http = CreateObject("MSXML2.XMLHTTP")
	http.Open "GET", url, False
	http.send
	If http.readyState ...
							评论加载中...
					
					前一篇: asp实现跳出for循环,执行下一循环				
									
				
							
		