js-pic.asp

来自「Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件」· ASP 代码 · 共 247 行

ASP
247
字号
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<%
'ON ERROR RESUME NEXT
path=finddir(request.servervariables("URL"))

lm=trim(request("lm"))
if lm="" then lm=trim(Request("lm2"))
page=trim(request("page"))
if page="" then page=1
if lm="" then lm=0

if lm2="" then lm2=lm
if lm="" then lm=lm2
if lm2="" then lm2=0

if (not isNumeric(lm)) then
  Response.Write "<Script Language=JavaScript>alert('ID参数错误或有非法字符或没指定参数,请勿随意提交数据!');</Script>"
  response.end  
end if


function pictulist()
			if openwindow="1" then 
				open="_blank"
			else
				open="_top"
			end if
%>
			<table align=center border=0 width=100%>
			<%
			sql="select id,title,pic,sh,lm,lm2,lm3,hit,ontop from [news] where ( pic like '%.jpg%' or pic like '%.JPG%' or pic like '%.gif%' or pic like '%.GIF%' or pic like '%.BMP%'  or pic like '%.bmp%') and sh=1 "
			if lm<>"0" then sql=sql&" and (lm='"&lm&"' or lm2='"&lm&"' or lm3='"&lm&"') "
			sql=sql&" order by ontop desc , updat desc  , id desc"
			set rs = Server.CreateObject("ADODB.RecordSet")
			rs.Open sql,conn,1,1
			if rs.recordcount <>0 then
			
			page=int(request("page"))
			rs.PageSize=xy
			pagecount=rs.pagesize
			if page<=0 then page=1
			if request("page")="" then page=1
			rs.AbsolutePage=page
			
			for i=1 to picy
			
			%>
			<tr>
				<%
					for xxxx=1 to picx
						if pictitle<>0 then
						  ttt="<BR><font color="&pictitlecolor&" style='font-size:"&pictitlesize&"pt'>"&titleb(rs("title"),pictitle)&"</font>"
						end if
						title=rs("title")
						id=rs("id")
				%>
			<td>
			
			<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
                    <TBODY>
                      <TR>
                        <TD height=10><IMG height=10 src="images/bg_0ltop.gif" width=10></TD>
                        <TD background="images/bg_01.gif" height=10></TD>
                        <TD height=10><IMG height=10 src="images/bg_0rtop.gif" width=10></TD>
                      </TR>
                      <TR>
                        <TD width=10 background="images/bg_03.gif">&nbsp;</TD>
                        <TD align="center" bgColor=#ffffff> 
                        <a href=<%=fun_html_url(id)%> target='<%=open%>' title='<%=title%>'><img border=0 width=<%=picw%> height=<%=pich%> src=<%=rs("pic")%>></a>
			           </TD>
                        <TD width=10 background="images/bg_04.gif">&nbsp;</TD>
                      </TR>
                      <TR>
                        <TD height=10><IMG height=10 src="images/bg_0lbottom.gif" width=10></TD>
                        <TD background="images/bg_02.gif" height=10></TD>
                        <TD height=10><IMG height=10 src="images/bg_0rbottom.gif" width=10></TD>
                      </TR>
                      <TR align="center" >
                        <TD colspan="3" valign="top" ><a href=<%=fun_html_url(id)%> target='<%=open%>' title='<%=title%>'><%=ttt%></a></TD>
                      </TR>
                    </TBODY>
              </TABLE>
			</td>
				<%
					rs.movenext
					if rs.eof then exit for
					next
				%>
			</tr>
			<%
			if rs.eof then exit for
			next
			else
			%>
			<tr><td width='100%'  height='15'><font style='font-size:9pt'>暂无图片信息!</font></td></tr>
			<%
			end if
			%>
			</table>			
			<table cellSpacing=5 cellPadding=0 align=center border=0><tr><td style="font-size: 9pt">
			<%if rs.recordcount<>0 then
			if page>1 then
			response.write "<a href="&request.servervariables("URL")&"?page=1&lm="&lm&">首页</a> "
			response.write "<a href="&request.servervariables("URL")&"?page="&page-1&"&lm="&lm&">上一页</a> "
			end if
			if page<rs.pagecount then
			response.write "<a href="&request.servervariables("URL")&"?page="&page+1&"&lm="&lm&">下一页</a> "
			response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&"&lm="&lm&">尾页</a> "
			end if
			response.write "共"&rs.recordcount&"条 每页显示"&pagecount&"条 共"&rs.pagecount&"页 "
			%>
			<script language="JavaScript">
			<!--
			function FP_jumpMenu(el,frm,sel) {//v1.0
			var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
			if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
			}
			// -->
			</script>
			<select size="1" onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
			<%for i=1 to rs.pagecount%>
			<option value="<%=request.servervariables("URL")%>?page=<%=i%>&lm=<%=lm%>" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option>
			<%next%>
			</select>
			<%end if%>
			</td></tr></table>

<%
end function
          dim fddh   '08_09_01 增加$$浮动导航$$标签
         if config("fddh") =0 then
           fddh_x=config("fddh_x")
	       fddh_y=config("fddh_y")
	       fddh_body=config("fddh_body")
	
          fddh="<SCRIPT FOR=window EVENT=onload LANGUAGE=""javascript"">initAd();</SCRIPT>"
          fddh=fddh&"<script language=""javascript"">function initAd() {" & vbcrlf
          fddh=fddh&"           document.all.AdLayer.style.posTop = -250;" & vbcrlf
          fddh=fddh&"            document.all.AdLayer.style.visibility = 'visible'" & vbcrlf
          fddh=fddh& "           MoveLayer('AdLayer');}" & vbcrlf
          fddh=fddh& "        function MoveLayer(layerName) {" & vbcrlf
          fddh=fddh&"            var x = "& fddh_x &";" & vbcrlf
          fddh=fddh&"            var y = "& fddh_y &";" & vbcrlf
          fddh=fddh&"            var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.40;" & vbcrlf
         fddh=fddh&"            var y = document.body.scrollTop + y - diff;" & vbcrlf       
          fddh=fddh&"           eval(""document.all."" + layerName + "".style.posTop = y"");" & vbcrlf
          fddh=fddh&"            eval(""document.all."" + layerName + "".style.posLeft = x"");" & vbcrlf
          fddh=fddh&"            setTimeout(""MoveLayer('AdLayer');"", 10);}" & vbcrlf
          fddh=fddh&"          </script>" & vbcrlf
          fddh=fddh&"<div id=AdLayer style='position:absolute; z-index:20; visibility:hidden;'>"& fddh_body &"</div>"
       else
         fddh=""
       end if

 
 
	set rs = Server.CreateObject("ADODB.RecordSet")
	rs.Open "select * from [lm] where id="&lm&" order by id desc",conn,1,1
	if rs.recordcount<>0 then
		mbid=rs("mb")
		lmname=rs("lm")&rs("lm2")&rs("lm3")
	    ClassKeywords=rs("ClassKeywords")
        ClassDescription=rs("ClassDescription")

	else
		set rs2 = Server.CreateObject("ADODB.RecordSet")
		rs2.Open "select * from [lm] order by id asc",conn,1,1
		if rs2.recordcount<>0 then
			mbid=rs2("mb")
		end if
		rs2.close:set rs2=nothing
	end if
	    if ClassKeywords="" then ClassKeywords=setting("sitekey")
        if ClassDescription="" then ClassDescription=setting("sitedes")

	rs.close:set rs=nothing
	if mbid="" then mbid=0
	
	set rs = Server.CreateObject("ADODB.RecordSet")
	rs.Open "select id,listtumb,picw,pich,picx,picy,pictitle,pictitlecolor,pictitlesize,openwindow from [NewsMB] where id="&mbid&" order by id desc",conn,1,1
	if rs.recordcount<>0 then
		listtumb=rs("listtumb")
		picw=rs("picw")
		pich=rs("pich")
		picx=rs("picx")
		picy=rs("picy")
		pictitle=rs("pictitle")
		pictitlecolor=rs("pictitlecolor")
		pictitlesize=rs("pictitlesize")
		openwindow=rs("openwindow")
		xy=int(picx)*int(picy)
	else
		Response.Write "<BR><BR><BR><center>对不起,系统模版不正确或者没有模版!</center>"
		conn.close:set conn=nothing
		Response.end
	end if
	rs.close:set rs=nothing
	
	if instr(listtumb,"$$图片列表$$")=0 then
		Response.Write "<BR><BR><BR><center>对不起,后台系统模版不正确,没有找到$$图片列表$$!</center>"
	else
			
		Set rs4 = Server.CreateObject("ADODB.RecordSet")   '廖2008-6-1新增,页头页尾调用开始
		rs4.Open "select * from [config]",conn,1,1
		if rs4.recordcount<>0 then
		  top=rs4("top")
		  down=rs4("down")
		  listtumb=replace(listtumb,"$$通用页头$$",top)
		  listtumb=replace(listtumb,"$$通用页尾$$",down)
		rs4.close
		set rs4=nothing 
		end if        '廖2008-6-1新增,页头页尾调用结束
			
						
			
			 listtumb=replace(listtumb,"$$栏目名$$",lmname)
			 listtumb=replace(listtumb,"$$网站目录$$",path)
			 listtumb=replace(listtumb,"$$浮动导航$$",fddh)
			 
			 listtumb=replace(listtumb,"$$网站名$$",setting("sitename"))
             listtumb=replace(listtumb,"$$网站描述$$",ClassDescription)
             listtumb=replace(listtumb,"$$关键字$$",ClassKeywords)
             listtumb=replace(listtumb,"$$版权信息$$",setting("sitecr"))

			 if lm2<>"0" and lm<>"0" then 
                  listtumb=replace(listtumb,"$$路径$$",morepath())
             else
               listtumb=replace(listtumb,"$$路径$$","新闻列表-->所有栏目:")
             end if
			 

			 
			 listtumb=replace(listtumb,"$$LMID$$",lm)
		     listtumb=split(listtumb,"$$图片列表$$")

			 
			 
		     response.write listtumb(0)
		     Response.Write pictulist()
		     Response.Write listtumb(1)		
	end if
%>
<%
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?