⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscode.asp

📁 大榕树网络文章管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
             strbig=strbig + "<li>"
             strbig=strbig + "<a href='Art_bigshow.asp?bigclass="&rsbig("bigclass")&"' title='"&rsbig("bigintr")&"'>"&rsbig("bigclass")&"</a>"
        set rssma=server.createobject("ADODB.Recordset")
            rssma.open"select * from smallclass where bigclass='"&rsbig("bigclass")&"'",conn,1,1
	       if rssma.eof or rssma.bof then
	          strbig=strbig + "<ul><li>没有小类</li></ul>"
		   else
		      strbig=strbig + "<ul>"
		      do while not rssma.eof 
		         strbig=strbig + "<li><a href='Artsmallshow.asp?bigclass="&rsbig("bigclass")&"&smallclass="&rssma("smallclass")&"' title='"&rssma("smallintr")&"'>"&rssma("smallclass")&"</a></li>"
			     rssma.movenext
			  loop
		         strbig=strbig + "</ul>"
			     rssma.close
			     set rssma=nothing
			 end if
    strbig=strbig + "</li>"
rsbig.movenext
loop
    response.write strbig
rsbig.close
set rsbig=nothing
end if
end sub
'=======================================================
'功能:显示主页收藏
'参数:无
'=======================================================
sub indexemail()
dim strindex
    strindex=strindex + "<li><a href='Index.asp#' onClick=this.style.behavior='url(#default#homepage)';this.setHomePage('"& webUrl & "');>设为主页</a></li>"          
    strindex=strindex + "<li><a href=javascript:window.external.addFavorite('" & webUrl & "','" & webname & "')>加入收藏</a></li>"            
    strindex=strindex + "<li><a href='mailto:" & webManagerEmail & "'>联系我们</a></li>"            
    response.write strindex
end sub
'======================================================
'功能:显示本站调查
'参数:无
'======================================================
sub VoteShow()
dim strvote,rsvote,i
    set rsvote=server.createobject("ADODB.Recordset")
        rsvote.open"select * from vote where isnew=true",conn,1,1
        if rsvote.eof or rsvote.bof then
           strvote=strvote + "<li>还没有任何调查</li>"
           rsvote.close
           set rsvote=nothing
        else
           strvote=strvote + "<form name='form1' method='post' action='votelist.asp'>"
           strvote=strvote + "<table width='98%'  border='0' align='center' cellpadding='0' cellspacing='4'>"
           strvote=strvote + "<tr><td><strong>主题:</strong>"&rsvote("title")&"</td></tr>"
           strvote=strvote + "<tr><td>"
          if rsvote("votetype")=1 then
            for i=1 to 8
               if rsvote("sele"&i)<>"" then	
                   strvote=strvote + "<li>&nbsp;"&i&".<input type='radio'  name='options' value='"&i&"'>"&rsvote("sele"&i)&"</li>"
              end if
            next
                 strvote=strvote + "<input name='voteadd1' type='hidden' id='voteadd1' value='add1'>"
                 strvote=strvote + "<input name='voteid' type='hidden' id='voteid' value='"&rsvote("voteid")&"'>"
         else
            if rsvote("votetype")=2 then
               for i=1 to 8
                  if rsvote("sele"&i)<>"" then
                      strvote=strvote + "<li>&nbsp;"&i&".<input type='checkbox' name='options' value='"&i&"'>"&rsvote("sele"&i)&"</li>"
                  end if
               next
         end if
             strvote=strvote + "<input name='voteadd2' type='hidden' id='voteadd2' value='add2'>"
             strvote=strvote + "<input name='voteid' type='hidden' id='voteid' value='"&rsvote("voteid")&"'>"
 end if
             strvote=strvote + "</td></tr>"                 
             strvote=strvote + "<tr><td align='center'><input name='Submit' type='submit' class='buton' value='投票'>&nbsp;&nbsp;<input name='Submit2' type='button' class='buton' onclick='javascript:votelist()' value='结果'></td></tr>"
             strvote=strvote + "</table></form>"                      
        rsvote.close
        set rsvote=nothing  
end if
      response.write strvote    
end sub                                                 
%>
<SCRIPT language="JavaScript" type="text/javascript">
    // Begin votelist
      function votelist(votelist)
      {
        url = 'votelist.asp';
        window.open(url,votelist);
      }
    // End votelist-->
	</script>

<%
'==================================================
'功能:文章内容分页
'参数:无
'==================================================
sub autopages()
dim Maxpagelen,page,content,PageNumber
dim contentlen,i
dim BeginPoint,EndPoint
     Maxpagelen=int(ArticleCount)
     content=rsread("content")
     contentlen=len(content)
     page=request.QueryString("page")
    if contentlen<=Maxpagelen then 
       response.Write content
    else 
    if page="" then
        page=1
    else
        page=Cint(page)
   end if 
   if pageNumber*MaxPagelen<contentlen then
      PageNumber=PageNumber+1
   end if
     PageNumber=int(contentlen/Maxpagelen)+1
    if page<1 then page=1
       if page>PageNumber then page=PageNumber
          if page=1 then
             BeginPoint=1
          else
             BeginPoint=MaxPagelen*(page-1)
          end if
       if page=PageNumber then
          EndPoint=contentlen
         else
           EndPoint=MaxPagelen*page 
          if EndPoint>=ContentLen then
                 EndPoint=ContentLen
           end if
       end if
          content=Mid(content,BeginPoint,EndPoint-BeginPoint) 
           response.Write content
           response.Write"<br>"
           response.Write"<br>"
           response.Write"<br>"
   end if
   if PageNumber>1 then
        response.Write "<div align='right'><span class='voteshowlist'>"&int(ArticleCount)&"</span>字/页&nbsp;共"
      for i=1 to PageNumber
        response.Write "<a href=Userartview.asp?ArticleID=" & ArticleID &"&page=" & i & "> "& i &"</a>"
     next
        response.Write "&nbsp;分页</div></span>"
 end if
end sub
'========================================================
'功能:本站作家分页显示
'参数:l---显示方式:1:直向,2:横向(现已取消); i---显示作家数; w---作家照片宽; h---作家照片高; mor---显示分页 1:分页 2:显示more...
'========================================================
sub showauthorphoto(l,i,w,h,mor)
dim rsau,austring,j,page,filepath
    set rsau=server.createobject("ADODB.Recordset")
	    rsau.open"select * from reguser where authorphoto<>'' and workerclass>0 and articles>4 order by userid desc",conn,1,1
   austring=austring + "<div id='authorshow'>" 
	if rsau.eof and rsau.bof then
		   austring=austring + "<li>暂时还没有本站作家</li>"
		   else
if mor=1 then
   filepath=request.servervariables("path_info")
   page=request.querystring("page")
  rsau.pagesize=i
  if not isempty(page) then
   if not isnumeric(page) then
    page=1
	 else
	 page=cint(page)
	 end if
	 if page>rsau.pagecount then
	   rsau.absolutepage=rsau.pagecount
		elseif page<=0 then
		rsau.absolutepage=1
		else
		 rsau.absolutepage=page
		end if
		else
	rsau.absolutepage=1
	end if
	page=rsau.absolutepage
end if	
dim ss
if mor=1 then
   ss=rsau.pagesize
else 
   ss=i
end if
   for j=1 to ss
		     if rsau.eof then
		        exit for
			 end if
    austring=austring + "<li><a href='workershow.asp?userid="&rsau("userid")&"' target='_blank'><img src='"&rsau("authorphoto")&"' width='"&w&"' height='"&h&"' border='0' /></a>"
    austring=austring + "<a href='workershow.asp?userid="&rsau("userid")&"' target='_blank'>"&rsau("usid")&"</a>&nbsp;&nbsp;"
	if rsau("sex")="1" then
    austring=austring + "男孩<br>"
	else
	austring=austring + "女孩<br>"
	end if
	select case rsau("workerclass")
	     case 1
    austring=austring + "高级作家"
	    case 2
	austring=austring + "中级作家"
		case 3
	austring=austring + "初级作家"
	end select
	austring=austring + "&nbsp;&nbsp;文章数:"&rsau("articles")&""
	austring=austring + "</li>"
	rsau.movenext
	next
	end if
	austring=austring + "</div>"
	response.write austring
    if mor=1 then
      call pagination(rsau.pagecount,rsau.pagesize,page,rsau.recordcount)
   else
   if mor=2 then
      response.write "<div align='right'><a href='worker.asp' title='更多本站作家'>more...</a></div>"
	  end if
	  end if		
	rsau.close
	set rsau=nothing
end sub
%>

⌨️ 快捷键说明

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