<% int iCountPage = 16; //每页输出的行数 int PageCount = Data.getCount("products|agency product",WEB); int iToPage = SysAPI.StrToInt(request.getParameter("iToPage")); if (iToPage<=0) iToPage = 1; /> GuiYang KaiYuan Biotic Resource Exploitation Ltd
home page about us products contact us
企业简介
<% SQLTxt = "SELECT * FROM orc_webdata_cy WHERE nodeId='products|agency product' AND WEB='" + WEB + "' ORDER BY SortDate DESC"; array = Data.Query(SQLTxt,iToPage,iCountPage); if (array != null) { Iterator iterator = array.iterator(); Wdata wdata = null; try { while (iterator.hasNext()) { wdata = (Wdata)iterator.next(); if (wdata != null) { String dID = wdata.WEB_ID; String dSubject = wdata.WEB_Subject; String dPutDate = wdata.WEB_Putdate; String dContent = wdata.WEB_Content ; String dimg = wdata.WEB_img; int dVisMan = wdata.WEB_VisMan; String dOrigin = wdata.WEB_Origin; String dAuthor = wdata.WEB_Author; dSubject = CHStr.NotHtml(dSubject); //去掉HTML dContent = CHStr.NotHtml(dContent); //去掉HTML if (dSubject.length()>=42) dSubject = dSubject.substring(0,40) + "..."; //限制长度 if (dContent.length()>=102) dContent = dContent.substring(0,100) + "..."; //限制长度 /> <% } // if (wdata != null) } //while }catch(Exception e) { //.. } array.clear(); } />
<% int AllPage = PageCount/iCountPage + 1; int ibpage = iToPage - 16; if (ibpage<=0) ibpage = 1; int iepage = iToPage + 16; if (iepage>AllPage) iepage = AllPage; for (int i=ibpage; i<=iepage; i++) { if (i==iToPage){ /> <%=i /> <% continue; } /> <%=i /> <%} /> all <%=AllPage /> page      
Copyright @ GuiYang KaiYuan Biotic Resource Exploitation Ltd