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

📄 index_inc.asp

📁 好用的贴吧源代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'├========================================┤
'‖             www.fywen.com              ‖
'‖       ╔━═━═━═━═━═━╗       ‖
'‖       ┃   枫叶在线版权所有   ┃       ‖
'‖       ╚━═━═━═━═━═━╝       ‖
'‖         论坛:www.fywen.com/bbs        ‖
'├========================================┤

'----------------------------------------------------------

'‖=======================================================
'‖首页贴吧目录调用
'‖过程名:index_post
'‖参数:NewWindows------是否新窗打开,True为是,False为否
'‖      PostFont--------分类文字长度 默认8
'‖      PostsFont-------子分类文字长度 默认5
'‖=======================================================
    sub index_post(NewWindows,PostFont,PostsFont)
	if NewWindows = true then
    WindowsOpen = "target='_blank'"
    else
    WindowsOpen=""				
    end if
    response.write"<table width='98%' border='0' cellspacing='0' cellpadding='0'  align='center'><tr><td height='10' colspan='3'></td></tr>"
	dim a,b,table
	b=0
    sql1="select * from [post] where [posts] = '0' ORDER by [id] ASC"
  	set rs1=server.createobject("adodb.recordset")
    rs1.open sql1,conn,1,1	
    do while not rs1.bof and not rs1.eof
	response.Write "<tr>"
	For a = 1 to 3
	if not rs1.eof then
	posttitle=rs1("posttitle")
	Post=Server.URLEncode(posttitle)
	if len(posttitle)>PostFont then
	posttitle=left(posttitle,PostFont)
	end if
	response.write"<td width='237'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td><a href='Fywen_Post.Asp?searchname="&Post&"' "&WindowsOpen&" class='index_titlesize'>"&posttitle&"</a></td></tr><tr><td height='20'>"
	sql2="select top 4 * from [post] where [posttitle] = '"&rs1("posttitle")&"' and [posts] <> '0' ORDER by [id] DESC"
	set rs2=server.createobject("adodb.recordset")
	rs2.open sql2,conn,1,1
	response.Write "<table width='90%' border='0' cellspacing='0' cellpadding='0'><tr>"
	do while not rs2.bof and not rs2.eof
	posts=rs2("posts")
	if len(posts)>PostsFont then
	posts=left(posts,PostsFont)
	end if
	response.Write"<td><a href=""SearchPost.Asp?searchname="&Server.URLEncode(rs2("posts"))&""" "&WindowsOpen&" class='index_titlesize_1'>"&posts&"</a></td>"
	rs2.movenext
	loop
	response.write"</tr></table>"
	if  rs2.bof and rs2.eof then
	response.write"<span class='index_titlesize_2'>目前没有分类</span>"
	end if
	response.Write"</td></tr></table></td>"
	else 
	response.write"<td width='237'></td>"
	end if
	if not rs1.eof then 
	rs1.movenext
	end if
	Next
	response.Write "</tr>"
	loop 
	if rs1.bof and rs1.eof then
    response.write"<tr><td><div align='center' class='index_titlesize_2'>目前没有任何分类</div></td></tr>"
	end if
	response.Write "</table>"
	set rs1=nothing
	set rs2=nothing
	end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================          
'‖优化搜索引擎
'‖过程名:serach
'‖参数:  (无)
'============================================
   Sub Serach()
	BotList = "Google,Isaac,SurveyBot,Baiduspider,yahoo,yisou,3721,ia_archiver,P.Arthur,FAST-WebCrawler,Java,Microsoft-ATL-Native,TurnitinBot,WebGather,Sleipnir"
	Botlist = Split(Botlist,",")
	For i = 0 To Ubound(Botlist)
	If InStr(Lcase(Request.ServerVariables("HTTP_USER_AGENT")),Lcase(Botlist(i))) > 0 Then
	   response.write" - Powered By FYPost - 枫叶贴吧"
	Exit For
	End If
	Next
   End Sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================   
'‖首页贴吧会员人数调用
'‖过程名:vip_number
'‖参数:  (无)
'============================================
    sub vip_number()
	sql="select * from [user]"
  	set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1	
	response.write rs.recordcount
	end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================   
'‖首页贴吧新会员调用
'‖过程名:vip_name
'‖参数:  (无)
'============================================
    sub vip_name()
    sql="select top 1 * from [user] ORDER by [id] DESC"
 	set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
	if not rs.bof and not rs.eof then
	response.write "<font class='index_titlesize_2'>"&rs("username")&"</font>"'<a href='Fywen_Passport.Asp' class='size'>"&&"</a>"
	else
	response.write "<span class='index_titlesize_2'>目前没有会员</span>"
	end if
	end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================   
'‖首页会员登陆框调用
'‖过程名:vip_name
'‖参数:  (无)
'============================================
    sub uesr_login()
	if session("uesrname") = "" then
    Post_url="http://"&Request.ServerVariables("HTTP_HOST")&Request.ServerVariables("URL")   
    If Request.ServerVariables("Query_String")<>"" then 
    Post_url = Post_url& "?"&Request.ServerVariables("Query_String")
    End If'/*获得真实Url地址*/
    %>
	<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table_3">
		 <form action="Fywen_login.Asp?Url=<%=Server.URLEncode(Post_url)%>" method="post" name="Login">
          <tr>
            <td width="97%" height="12"></td>
          </tr>
          <tr>
            <td><div align="center">用户名:
              <input name="username" class="user_input" value="" >
            </div></td>
          </tr>
          <tr>
            <td height="30"><div align="center">密&nbsp;&nbsp;码:
                  <input name="userpassword" class="pwd_input" type="password" >
            </div></td>
          </tr>
          <tr>
            <td height="34">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src="image/login.gif">&nbsp;<a href="Fywen_Passport.Asp" class="size">注册</a>&nbsp;<a href="User_Password.Asp" class="size">忘记密码</a></td>
          </tr>
		  <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;目前共有 <font color="#FF0000"><%call vip_number()%></font> 位会员</td></tr>
		  <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新会员:<%call vip_name()%></td></tr>
		  </form>
      </table>
	 <%
	 else
	 %>
	 <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table_3">
          <tr>
            <td width="220" height="12" colspan="2"></td>
          </tr>
          <tr>
            <td colspan="2"><div align="center" >您好:<font  class="index_titlesize"><%=session("uesrname")%></font></div></td>
          </tr>
          <tr>
            <td height="28" colspan="2"><div align="center">共发布帖子:<font color="#FF0000"><%call Vip_post()%>
            </font> 篇</div></td>
          </tr>
		  <tr><td colspan="2" height="28"><div align="center">共回复帖子:<font color="#FF0000"><%call Vip_Repost()%> 
		  </font>篇</div></td></tr>
          <tr>
            <td height="28" colspan="2"><div align="center">上次登陆时间:<font  class="index_titlesize"><%call Vip_Firsttime()%></font></div></td>
          </tr>
		  <tr><td height="28"><div align="center">&nbsp;&nbsp;&nbsp;&nbsp;<a href="Usermanager.Asp" class="size">个人中心</a></div></td>
		    <td><div align="center"><a href="Login_Out.Asp" class="size">退出登陆</a>&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
		  </tr>
      </table>
	  <%
	  end if
	  end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================   
'‖首页贴吧分类个数调用
'‖过程名:post_number
'‖参数:  (无)
'============================================
    sub post_number()
	sql="select * from [post] where [posts] = '0'"
  	set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1	
	response.write rs.recordcount
	end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================   
'‖首页贴吧子分类个数调用
'‖过程名:posts_number
'‖参数:  (无)
'============================================
    sub posts_number()
	sql="select * from [post] where [posts] <> '0'"
  	set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1	
	response.write rs.recordcount
	end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================
'‖首页贴吧主题帖子调用
'‖过程名:post_title
'‖参数:  (无)
'============================================
    sub post_title()
	sql="select * from [title]"
  	set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1	
	response.write rs.recordcount
	end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================  
'‖首页贴吧回复主题帖子调用
'‖过程名:post_retitle
'‖参数:  (无)
'=============================================
    sub post_retitle()
	sql="select * from [retitle]"
  	set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1	
	response.write rs.recordcount
	end sub
'===========================================
'        ╔━═━═━═━═━═━╗          
'        ┃   枫叶在线版权所有   ┃            
'        ╚━═━═━═━Fywen ━╝ 
'============================================   
'‖首页会员上次登陆时间调用
'‖过程名:Vip_Firsttime
'‖参数:  (无)
'============================================
    sub Vip_Firsttime()

⌨️ 快捷键说明

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