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

📄 share.asp

📁 完整的九洲问吧。优秀的问答网站。由ASP+Access开发。
💻 ASP
字号:
<!--#include file=conn.asp-->
<!--#include file="function.asp"-->
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<%
if gx=1 then
if request("id")<>"" then
if not IsNumeric(request("id")) then
		Response.Write ("<script>alert('友情提示!\n\参数错误!');history.back();</script>")
		Response.end
	end if
id=CLNG(request("id"))
rs.open"select * from Share where flid="&id,conn,1,1
	if rs.eof then
	Response.Write ("<script>alert('友情提示!\n\此分类还没有共享资料!');history.back();</script>")
	Response.end
	end if
	rs.close
rs2.open"select * from assort where id="&id,conn,1,1
topic1=rs2("topic")
rs2.close
end if
%>
<html>
<head>
<title><%=webname%>-共享资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="iknow.css" rel="stylesheet" type="text/css">
</head>
<body class="bgbdy" topmargin="0">
<center>
<!--#include file=top.asp-->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" nowrap><a href="<%=weburl%>"><%=webname%></a> &gt; <a href="share.asp">共享资料</a> &gt; <%=topic1%></td>
  </tr>
</table>
<div id="cDiv">
<table border="0" align="right" cellpadding="0" cellspacing="0">
<tr><td width="170" valign="top" class="padL12">
	<!--出现登陆框-->
	 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
<tr> 
<td class="bgtle" nowrap><%if session("person")<>"" then%>用户信息<%else%>用户登录<%end if%></td>
</tr>
<tr> 
  <td class="bgcntBor3">
    <%if request("login")="登录" then
jiance=request("name")
if InStr(jiance,"or")<>0 or InStr(jiance,"'")<>0 or InStr(jiance,"`")<>0 or InStr(jiance,"=")<>0 or InStr(jiance,"-")<>0 or InStr(jiance,",")<>0 or InStr(jiance,"and")<>0 then 
Response.Write "<script language=JavaScript>{alert('用户名非法!');history.back();}</script>"
Response.End 
end if
		if not IsNumeric(request("verifycode")) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码必须是数字!');history.back();</script>")
		Response.end
	end if
	if (int(session("SafeCode"))<>int(request("verifycode"))) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码输入错误!');history.back();</script>")
		Response.end
	end if
	  if request("name")="" then
	  response.write"<script>alert('用户名不能为空!');history.back();</script>"
	  elseif request("pwd")="" then
	  response.write"<script>alert('密码不能为空!');history.back();</script>"
	  else
	  name=request("name")
	  pwd=request("pwd")
	  rs.open"select * from person where name='"&name&"' and pwd='"&md5(pwd)&"'",conn,1,1
	  if rs.eof then
	  response.write"<script>alert('用户名或密码错误!');history.back();</script>"
	  else
	  rs3.open"select * from person where name='"&name&"'",conn,1,3
	  rs3("logintime")=now
	  rs3.update
	  rs3.close
	  session("person")=name
	  %>
	  <%end if
	  rs.close
	  end if
	  end if%>
	  
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="zhtable"><%if session("person")<>"" then%>
              <tr> 
                <td  class="f14">您好:<%=session("person")%> </td>
              </tr>
              <tr> 
                <td><%rs.open"select * from person where name='"&session("person")&"'",conn,1,1%> 
                  <a href="help.asp#n5" target=_blank><%=rs("touxian")%></a> ( <%=rs("jifen")%> )</td>                 
              </tr>
      </table>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
  <tr>
    <td height=22>&#8226; <a href="user.asp?lei=mywen" target="_blank">我的提问</a></td>                
    <td>&#8226; <a href="user.asp" target="_blank">个人中心</a></TD>                
  </tr>
  <tr>
    <td>&#8226; <a href="user.asp?lei=myda" target="_blank">我的回答</a></td>                
    <td>&#8226; <a href="exit.asp">退出</a><%rs.close%></td>           
  </tr>
  <%end if%><%if session("person")="" then%><tr><form method=post action=share.asp?id=<%=id%>><td align="center" valign="top">
	<p>用&nbsp;&nbsp;&nbsp;&nbsp;户: <input name="name" type="text" id="name" size="12"><br>密&nbsp;&nbsp;&nbsp;&nbsp;码: <input name="pwd" type="password" id="pwd" size="12"><br>验证码:<input type="text" size=3 maxlength=4 name=verifycode> <%Call GetSafeCode%><br><FONT color=#666666>(请输入图中数字)</FONT><br><input name="login" type="submit" id="login" value="登录">&nbsp;&nbsp;          
    <a href="reg.asp">注册</a>
</td></form><%end if%></tr>
</table>
<tr>
                    <td width="100%" height="10"></td>
                  </tr>
                </table>
<!--结束登陆框--></td></tr></table>
<table width="588" border="0" align="center" cellpadding="0" cellspacing="0" class="zhtable">
  <tr>
    <td class="bgtleL">&nbsp;  
共享资料</td>
    <%
    if id="" then
rs.open"select * from Share order by uptime desc",conn,1,1
else
rs.open"select * from Share where flid="&id&" order by uptime desc",conn,1,1
end if
totalquestion=rs.recordcount
%> 
    <td height="24" class="bgtleR"><div align="right" class="f12we"><a href="userupfile.asp" target="_blank">我要上传</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共有资料 <%=totalquestion%>   
        项</div></td>
  </tr> 
  <tr> 
    <td class="bgcnt" colspan="2"><table width="100%" border="0" cellspacing="0" class=zhtable>
        <tr> 
<td nowrap><strong>资料名称</strong></td>
<td width="50" nowrap align=center><strong>发布者</strong></td>
<td width="80" nowrap><div align="center"><strong>文件格式</strong></div></td>
<td width="55" nowrap><div align="center"><strong>发布时间</strong></div></td>  
        </tr>
		<%if rs.eof then%>
<tr>
          <td height="34" colspan=6>暂时没有贡献资料!</td>
</tr>
<%else
		rs.pagesize=MaxPerPage
		maxnum=rs.recordcount
		maxpage=rs.pagecount
		if request("p")="" then
		p=1
		else
		p=cint(request("p"))
		end if
		if p>maxpage then
		p=maxpage
		end if
		if p=0 then
		p=1
		end if
		if p<>1 then
		rs.move (p-1)*rs.pagesize
		end if
		for i=1 to rs.pagesize
		nian=year(rs("uptime"))
		yue=Month(rs("uptime"))
		ri=day(rs("uptime"))
		if rs("lei")="doc" then
geshi="<img border=0 src=img/doc_icon.gif> [Word]"
elseif rs("lei")="xls" then
geshi="<img border=0 src=img/excel_icon.gif> [Excel]"
elseif rs("lei")="txt" then
geshi="<img border=0 src=img/txt_icon.gif> [Txt]"
elseif rs("lei")="zip" then
geshi="<img border=0 src=img/zip_icon.gif> [Zip]"
elseif rs("lei")="rar" then
geshi="<img border=0 src=img/rar_icon.gif> [Rar]"
end if
rs2.open"select * from assort where id="&rs("flid"),conn,1,1
topic=rs2("topic")
rs2.close
		%>
		<tr>
<td class="ln28"><span class="f14ln20"><a href=sharev.asp?id=<%=rs("id")%> target=_blank><%if len(rs("ftitle"))>26 then%><%=left(rs("ftitle"),26)&"..."%><%else%><%=rs("ftitle")%><%end if%></a> <%if request("id")="" then%>[<a href=share.asp?id=<%=rs("flid")%> class=lgy><%=topic%></a>]<%end if%></span></td>  
<td align=center valign="middle" class="ln28"><%=rs("upuser")%></td>
<td align="center" valign="middle" class="ln28"><%=geshi%></td>
<td align="center" valign="middle" class="ln28" nowrap><%=nian%>-<%=yue%>-<%=ri%></td>
</tr>
<%rs.movenext
		if rs.eof then exit for
		next%>
      </table></td>
  </tr>
</table>
&nbsp;

<br><div style="width:588px;" align="center"> 
<table width="90%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" class="bgpagLn">问题数:<font color=red><%=maxnum%></font> | 每页数:<font color=green><%=rs.pagesize%></font> | 总页数:<font color=green><%=maxpage%></font> | 当前页:<font color=red><%=p%></font>                                                                                                                                  
		  <a href=share.asp?id=<%=id%>>首页</a>                                                                                                                                   
		  <a href=share.asp?id=<%=id%>&p=<%=p-1%>>上页</a>                                                                                                                                   
		  <a href=share.asp?id=<%=id%>&p=<%=p+1%>>下页</a>                                                                                                                                   
		  <a href=share.asp?id=<%=id%>&p=<%=maxpage%>>尾页</a></td> 
  </tr>
</table></div>
<%end if
		rs.close
%>
<br>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" style="clear:both;">
  <tr> 
    <td class="bgdsrh" align="center">
      <table  border="0" cellspacing="0" cellpadding="0" height="55">
       <tr>
        <form name=fbop method=post action=searchs.asp>
          <td nowrap height="26"><input name="content" type="text" id="content" value="" size="47">
            &nbsp;<input type="submit" name="Submit" value="搜索资料"></td> 
        </tr>
       </form>
      </table></td>
  </tr>
</table>
<br>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" style="clear:both;">
  <tr> 
    <td height="25"><div align="right"><a href="#top">返回页首</a></div></td>
  </tr>
  <tr> 
    <td height="30" align=center><!--#include file=end.asp--></td> 
  </tr>
</table></center>
</body>
<%
Set rs=nothing
Set rs1=nothing
Set rs2=nothing
Set rs3=nothing
conn.Close
set conn=nothing
else
Response.Write ("<script>alert('对不起,共享资料功能未启用!');history.back();</script>")
		Response.end
	end if
%>


⌨️ 快捷键说明

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