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

📄 showres.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="include/ms_setting.asp"-->
<!--#include file="include/ms_page.asp"-->
<%
'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1   Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com      www.maosin.net
'      QQ:57861417  
'电子邮箱:maosin@163.com  maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
catTitle="免费资源中心→正文阅读"
id=request.queryString("id")
dim iserror,iderror
if not isNumeric(id) or id="" then
	iserror=true
else
	iserror=false
	sql="select * from ms_res where id="&id&" and pass=true"
	Set rs=Server.CreateObject("ADODB.RecordSet")
	rs.Open sql,connstr,1,3
	if not rs.eof and not rs.bof then
		dim popedom,jifen,money,keyword
		dim isbuy:isbuy=0
		keyword=rs("res_keyword")
		popedom=cint(rs("popedom"))
		jifen=csng(rs("jifen"))
		money=csng(rs("money"))
		buyUser=trim(rs("buyUser"))
		if session(userVar)=userVal then
			userInfo=session("userinfo")
			if getBuyUser(buyUser,userInfo(1))=true then
				isbuy=1
			else
				isbuy=0
			end if
			if Request("pay")="yes" then
				if cint(userInfo(2))=2 and popedom=2 and csng(userInfo(4))>=money and isbuy=0 then
					rs("buyUser")=rs("buyUser")&","&userinfo(1)
					rs.update
					conn.execute("update ms_user set user_money=user_money-"&money&" where user_id="&userinfo(0))
					userInfo(4)=csng(userInfo(4))-money
					userInfo(4)=replace(FormatNumber(userInfo(4),2,-1),",","")
					session("userinfo")=userInfo
					userInfo=session("userinfo")
				end if
			end if
		end if
		keyword=rs("res_keyword")
		popedom=cint(rs("popedom"))
		jifen=cint(rs("jifen"))
		money=cint(rs("money"))
		buyUser=rs("buyUser")
		iderror=true
	else
		iderror=false
	end if
end if
%>
<!--#include file="ms_start.asp"-->
<!--页面主体开始-->
<script language="JavaScript" src="include/wisdom.js"></script>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" class="mainMiddle_tdble"><tr>
<!--左栏开始-->
<td valign="top" class="mainMiddle_td_left">
		<div class="groupblock">
		<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="ltl"><script type="text/javascript">ico()</script></td><td class="ltc"><span class="tt">会员登录</span></td><td class="ltr"></td></tr></table>
		<div class="lmc"><%Call publiclogonModule()%></div>
		</div>
		<div class="groupblock">
		<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="ltl"><script type="text/javascript">ico()</script></td><td class="ltc"><span class="tt">站内搜索</span></td><td class="ltr"></td></tr></table>
		<div class="lmc"><%Call searchInput("res")%></div>
		</div>
		<div class="groupblock">
		<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="ltl"><script type="text/javascript">ico()</script></td><td class="ltc"><span class="tt">全部排行</span></td><td class="ltr"></td></tr></table>
		<div class="lmc"><%Call hotres()%></div>
		</div>
		<div class="groupblock">
		<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="ltl"><script type="text/javascript">ico()</script></td><td class="ltc"><span class="tt">本类推荐</span></td><td class="ltr"></td></tr></table>
		<div class="lmc">
		 <%
		 if isNumeric(id) and id<>"" then
		 	if iderror then
			 sql="select top "&resOrderNum&" * from ms_res where classID="&rs("classID")&" and res_good=true and pass=true order by res_date desc"
			 resIsGood
			 else
			  response.Write("本类暂时没有推荐文章!")
			 end if
		 else
			 response.Write("本类暂时没有推荐文章!")
		 end if
		 %>
		</div>
		</div>
</td>
<td class="mainMiddle_td_middle" onClick="switchCol(this)" title="关闭左栏"><img src="images/closeL.gif"></td>
<td width="*" valign="top" class="mainMiddle_td_right">
<%	if iserror then
		Call showmsg("<li>参数必须为数字型参数,且不能为空</li>","参数出错")
	else
		if iderror then
		pltype="res"
		Call showresBody()
		rs.close
		Set rs=Nothing
		conn.execute("UPDATE ms_res SET res_clicks=res_clicks+1 WHERE id="&id)
		else
			showmsg "<li>您要查找的 ID 编号资源不存在或者已经被删除了!</li>","系统返回信息"
		end if
	end if%>
<!--中间部分结束-->
</td></tr></table>
<!--#include file="ms_end.asp"-->
<%
Sub hotres()
	sql="select top "&resOrderNum&" * from ms_res where res_clicks>0 and pass=true order by res_clicks desc"
	Set hrs=conn.execute(sql)
	If Not hrs.Eof and not hrs.Bof Then
	Do While Not hrs.Eof%>
		<div class="rlineX">☉<a href="showres.asp?id=<%=hrs("id")%>" target="_blank" title="资源标题:<%=hrs("res_title")%>&#10;发布时间:<%=hrs("res_date")%>&#10;浏览次数:<%=hrs("res_clicks")%>"><%=cutStr(hrs("res_title"),12)%></a></div>
<%
		hrs.MoveNext
	Loop
	else
		Response.Write("暂无热点资源!")
	end if
hrs.Close
Set hrs=Nothing
End Sub
Sub resIsGood()
	Set grs=conn.execute(sql)
	If Not grs.Eof and not grs.Bof Then
	Do While Not grs.Eof%>
		<div class="rlineX">☉<a href="showres.asp?id=<%=grs("id")%>" target="_blank" title="资源标题:<%=grs("res_title")%>&#10;发布时间:<%=grs("res_date")%>&#10;浏览次数:<%=grs("res_clicks")%>"><%=cutStr(grs("res_title"),12)%></a></div>
<%
		grs.MoveNext
	Loop
	else
		Response.Write("暂无推荐资源!")
	end if
grs.Close
Set grs=Nothing
End Sub
Sub showresBody()%>
<script language="javascript" src="include/scrollwindow.js"></script>
		<table cellspacing="0" class="naviTable"><tr><td class="naviL"></td><td class="naviM"><span class="rtt">当前位置:<a class="classNavig" href="index.asp">本站首页</a>→<a class="classNavig" href="res.asp">免费资源</a>→正文阅读</span></td><td class="naviR"></td></tr></table>
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="bodyTable">
		  <tbody id="bg">
		  <tr> 
			<td width="100%" height="20" valign="middle" class="resUrl">相关链接:
			<%
			if isNull(rs("apply_url")) then
				response.Write("没有相关地址&nbsp;&nbsp;")
			  else
				response.write("<a href="""&rs("apply_url")&""" target=""_blank"">申请地址</a>&nbsp;&nbsp;")
			 end if
			if isNull(rs("demo_url")) then
				response.Write("没有演示地址")
			  else
				response.write("<a href="""&rs("demo_url")&""" target=""_blank"">演示地址</a>")
			 end if%>
			</td>
		  </tr>
		  <tr> 
			<td width="100%" height="60" valign="middle" align="center" style="font-size:20px;font-weight:bold;"><font color="<%=rs("titlecolor")%>"><%=rs("res_title")%></font></td>
		  </tr>
		  <tr> 
			<td height="24" valign="middle" align="center" class="cA1">作者:<%=rs("res_authors")%> | 来源:<%=rs("res_from")%> | 时间:<%=rs("res_date")%> | 浏览:<%=rs("res_clicks")%> 查看权限:
			<%if rs("popedom")=1 then
				response.write("会员级别")

⌨️ 快捷键说明

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