asp网站文章上下篇标题怎么调出来的,代码如下 10
主要是想知道上下篇标题怎么调用的subShowNews_Detail(id,ver)%><%DimtxtAuthor,txtDatetime,txtName,txtCon...
主要是想知道上下篇标题怎么调用的
sub ShowNews_Detail(id,ver)
%>
<%
Dim txtAuthor,txtDatetime,txtName,txtContent
Dim txtId,txtRootId
Dim strAuthor,strAuthorEn,strName,strNameEn,strContent,strContentEn
Dim intVer,tempAuthor,tempBack,tempTime,tempAlert
txtAuthor=""
txtDatetime=""
txtName=""
txtContent=""
strAuthor=""
strAuthorEn=""
strName=""
strNameEn=""
strContent=""
strContentEn=""
select case ver
case "cn"
intVer=1
tempAuthor="作者"
tempBack="返回"
tempTime="发布时间"
tempAlert="错误参数,请返回!"
case "en"
intVer=2
tempAuthor="Author"
tempBack="Back"
tempTime="Time"
tempAlert="Error,Go back!"
end select
if Id="" then
call goback(tempAlert)
elseif not isnumeric(Id) then
call goback(tempAlert)
end if
tid=request.QueryString("tid")
if tid=39 then
if session("LoginMember")<>"" then
else
response.Write("<script>window.location.href='reg.asp';alert('只有会员登录后才能查看!')</script>")
end if
end if
str="select clsid,name,name_en,content,content_en,auther,auther_en,datetime from news where ver="&intVer &" and id=" &Id & " "
set rs=conn.execute(str)
'response.write(str)
if rs.eof or rs.bof then
'call goback(tempAlert)
txtDateTime=""
strAuthor=""
strAuthorEn=""
strName=""
strNameEn=""
strContent=""
strContentEn=""
else
clsid=rs("clsid")
txtDateTime=Rs("datetime")
strAuthor=rs("auther")
strAuthorEn=rs("auther_en")
strName=rs("name")
strNameEn=rs("name_en")
strContent=rs("content")
strContentEn=rs("content_en")
end if
rs.close
set rs=nothing
select case ver
case "cn"
txtAuthor=strAuthor
txtName=strName
txtContent=strContent
txtback="返回"
txtDate="时间"
txtSource="来源"
txtPrint="打印本文"
txtPre="上一条"
txtNext="下一条"
case "en"
txtAuthor=strAuthorEn
txtName=strNameEn
txtContent=strContentEn
txtback="back"
txtDate="date"
txtSource="source"
txtPrint="print"
txtPre="pre"
txtNext="next"
end select
%>
<h3><% =txtName %></h3>
<div align="center"><span><%=txtDate%>:<%=txtDateTime%></span> <span><%=txtSource%>:<%=txtAuthor%></span> <span><a href="javascript:window.print() "><%=txtPrint%></a></span></div>
<p > <% =txtContent %></p>
<%
getprid=getPreId(ver,intVer,clsid,id)
getNextprId=getNextId(ver,intVer,clsid,id)
'response.Write(getNextprId)
%>
<div style="text-align:right; padding-right:20px;"> | < <%if getprid<>0 then%><a href="?newsid=<%=getPreId(ver,intVer,clsid,id)%>&tid=<%=clsid%>" id="Page_Prd" ><%=txtPre%><% =strName %></a><%else%><%=txtPre%><%=titlePre%><%end if%> | <%if getNextprId<>0 then%><a id="Page_Prd" href="?newsid=<%=getNextId(ver,intVer,clsid,id)%>&tid=<%=clsid%>"><%=txtNext%></a><%else%><%=txtNext%><%end if%></div>
</div> 展开
sub ShowNews_Detail(id,ver)
%>
<%
Dim txtAuthor,txtDatetime,txtName,txtContent
Dim txtId,txtRootId
Dim strAuthor,strAuthorEn,strName,strNameEn,strContent,strContentEn
Dim intVer,tempAuthor,tempBack,tempTime,tempAlert
txtAuthor=""
txtDatetime=""
txtName=""
txtContent=""
strAuthor=""
strAuthorEn=""
strName=""
strNameEn=""
strContent=""
strContentEn=""
select case ver
case "cn"
intVer=1
tempAuthor="作者"
tempBack="返回"
tempTime="发布时间"
tempAlert="错误参数,请返回!"
case "en"
intVer=2
tempAuthor="Author"
tempBack="Back"
tempTime="Time"
tempAlert="Error,Go back!"
end select
if Id="" then
call goback(tempAlert)
elseif not isnumeric(Id) then
call goback(tempAlert)
end if
tid=request.QueryString("tid")
if tid=39 then
if session("LoginMember")<>"" then
else
response.Write("<script>window.location.href='reg.asp';alert('只有会员登录后才能查看!')</script>")
end if
end if
str="select clsid,name,name_en,content,content_en,auther,auther_en,datetime from news where ver="&intVer &" and id=" &Id & " "
set rs=conn.execute(str)
'response.write(str)
if rs.eof or rs.bof then
'call goback(tempAlert)
txtDateTime=""
strAuthor=""
strAuthorEn=""
strName=""
strNameEn=""
strContent=""
strContentEn=""
else
clsid=rs("clsid")
txtDateTime=Rs("datetime")
strAuthor=rs("auther")
strAuthorEn=rs("auther_en")
strName=rs("name")
strNameEn=rs("name_en")
strContent=rs("content")
strContentEn=rs("content_en")
end if
rs.close
set rs=nothing
select case ver
case "cn"
txtAuthor=strAuthor
txtName=strName
txtContent=strContent
txtback="返回"
txtDate="时间"
txtSource="来源"
txtPrint="打印本文"
txtPre="上一条"
txtNext="下一条"
case "en"
txtAuthor=strAuthorEn
txtName=strNameEn
txtContent=strContentEn
txtback="back"
txtDate="date"
txtSource="source"
txtPrint="print"
txtPre="pre"
txtNext="next"
end select
%>
<h3><% =txtName %></h3>
<div align="center"><span><%=txtDate%>:<%=txtDateTime%></span> <span><%=txtSource%>:<%=txtAuthor%></span> <span><a href="javascript:window.print() "><%=txtPrint%></a></span></div>
<p > <% =txtContent %></p>
<%
getprid=getPreId(ver,intVer,clsid,id)
getNextprId=getNextId(ver,intVer,clsid,id)
'response.Write(getNextprId)
%>
<div style="text-align:right; padding-right:20px;"> | < <%if getprid<>0 then%><a href="?newsid=<%=getPreId(ver,intVer,clsid,id)%>&tid=<%=clsid%>" id="Page_Prd" ><%=txtPre%><% =strName %></a><%else%><%=txtPre%><%=titlePre%><%end if%> | <%if getNextprId<>0 then%><a id="Page_Prd" href="?newsid=<%=getNextId(ver,intVer,clsid,id)%>&tid=<%=clsid%>"><%=txtNext%></a><%else%><%=txtNext%><%end if%></div>
</div> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询