标题:本人在做ASP网页过程遇到些问题,请各位高手相助
取消只看楼主
zhenmei
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-4-12
结帖率:0
已结贴  问题点数:20 回复次数:0 
本人在做ASP网页过程遇到些问题,请各位高手相助
本人在做ASP网页过程遇到些问题,请各位高手相助




<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001" LCID="2052"%>
<%Response.CodePage="65001":Response.Charset="utf-8":Response.LCID="2052"%>
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="function.asp"-->
<!--#include file="pager.class.asp"-->
<!--#include file="mail.class.asp"-->
<%
call OpenConn("")

'系统配置信息加载
set rscon=server.CreateObject("adodb.recordset")
sqlcon="select * from Admin_Setting where ID=1"
rscon.open sqlcon,conn,1,1
NewsPXMethod = rscon("NewsPXMethod")
ProductPXMethod = rscon("ProductPXMethod")
MailSend_con = rscon("MailSend")
MailSendApp_con = rscon("MailSendApp")
rscon.close
set rscon=nothing

'邮件配置信息加载
set rs=server.CreateObject("adodb.recordset")
sql="select * from Mail_Setting where ID=1"
rs.open sql,conn,1,1
Mailhostserver_con = rs("Mailhostserver")
MailUser_con = rs("MailUser")
MailPwd_con = rs("MailPwd")
MailSMTP_con = rs("MailSMTP")
MailPort_con = rs("MailPort")
MailTLS_con = rs("MailTLS")
MailAccept_con = rs("MailAccept")
MailOpen_con = rs("MailOpen")
rs.close
set rs=nothing

'创建分页全局对象
set pageObj=new pager
pageObj.perNum=10
pageObj.lang_PageTotal="共"
pageObj.lang_Page="页"
pageObj.lang_PageLocation="当前第"
pageObj.lang_PageHome="首页"
pageObj.lang_PageEnd="末页"
pageObj.lang_PagePre="上一页"
pageObj.lang_PageNext="下一页"
pageObj.lang_PageGo="转至第"
pageObj.lang_Total="条记录"
pageObj.lang_Pagenum="页次"
pageObj.img_path="image/"

const prevLink_lang="上一页"  '详细内容内附加上下文章跳转
const nextLink_lang="下一页"  '详细内容内附加上下文章跳转
const backLink_lang="返回"  '详细内容尾部返回按钮Alt文字
const printLink_lang="打印"  '详细内容尾部打印按钮Alt文字
const Publisher_lang="发布者:"  '文章发布者lang
const AddDate_lang="&nbsp;&nbsp;发布时间:"  '文章发布时间lang
const Hits_lang="&nbsp;&nbsp;点击:"  '文章点击率lang

sub CheckCode(str)
    if CStr(session("CheckCode"))="" then
        alert("验证码失效,返回重新获取。")
        goBack()
        response.end()
    end if
    if trim(str)<>CStr(session("CheckCode")) then
        alert("您输入的确认码和系统产生的不一致,请重新输入。")
        goBack()
        response.end()
    end if
end Sub

'首页新闻--Start
sub indexnews(showCount,titleChrNum)'首页新闻列表'
set rs=server.CreateObject("adodb.recordset")
sql="select top "&showCount&" * from News order by "&NewsPXMethod
rs.open sql,conn,1,1
if titleChrNum="" then titleChrNum=38
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%   
for i=1 to showCount
if rs.eof then exit for
%>
              <tr>
                <td height="17" class="zhengwen"><img src="images/dot.jpg" width="8" height="7"><a href="news.asp?nlt=<%=rs("ID")%>" title="<%=rs("Title")%>"><%=gotTopic(rs("Title"),titleChrNum)%></a> <%if i=1 then%><img src="images/jmnfe.jpg" width="17" height="14" align="absmiddle"> <%end if%>
                </td>
              </tr>

<%
rs.movenext
next
%>
</table>
<%
rs.close
set rs=nothing
end sub
'首页新闻--End
sub indexanli(showCount,titleChrNum)'首页新闻列表'
set rs=server.CreateObject("adodb.recordset")
sql="select top "&showCount&" * from anli order by "&NewsPXMethod
rs.open sql,conn,1,1
if titleChrNum="" then titleChrNum=38
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%   
for i=1 to showCount
if rs.eof then exit for
%>
              <tr>
                <td height="17" class="zhengwen"><img src="images/dot.jpg" width="8" height="7"><a href="anli.asp?lt=<%=rs("ID")%>" title="<%=rs("Title")%>"><%=gotTopic(rs("Title"),titleChrNum)%></a>
                </td>
              </tr>

<%
rs.movenext
next
%>
</table>
<%
rs.close
set rs=nothing
end sub

sub newsclass
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <%
set rs=server.createobject("adodb.recordset")
sql="select * from newsclass where parentclassid=0 order by px desc"
rs.open sql,conn,1,1
do while not rs.eof
%> <tr>
    <td style="padding:8px 15px; background-color:#efefef">
    <span style="float:left"><a href="?None=<%=rs("id")%>" style="font-weight:bold"><%=rs("classname")%></a></span>
    <span style="float:right"><a href="?None=<%=rs("id")%>" style="font-weight:bold">+MORE</a></span>
    </td>
  </tr>
  <tr>
    <td style="padding:5px" valign="top" height="180">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <%
set rss=server.createobject("adodb.recordset")
sqls="select * from news where oneclassid="&rs("id")&" order by "&NewsPXMethod
rss.open sqls,conn,1,1
for i=1 to 6
if rss.eof then exit for
%>
     <tr>
        <td height="25"><a href="?nlt=<%=rss("ID")%>" title="<%=rss("Title")%>">· <%=gotTopic(rss("Title"),80)%></a></td>
        <td width="100" align="right"><%=year(rss("adddate"))%>-<%=month(rss("adddate"))%>-<%=day(rss("adddate"))%></td>
      </tr>
      <tr>
        <td height="1" colspan="2" bgcolor="#e7e7e7"></td>
      </tr>
<%
rss.movenext
next
rss.close
set rss=nothing
%>  
</table>
   
   
    </td>
  </tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>  
</table>
<%
end sub

'新闻--Start
sub news(None,Ntwo)'显示新闻'
set rs=server.CreateObject("adodb.recordset")
sql="select * from News where ID>0 "
if None <> "" then sql=sql&"and OneClassID="&clng(None)&" "
if Ntwo <> "" then sql=sql&"and TwoClassID="&clng(Ntwo)&" "
if Nthree <> "" then sql=sql&"and ThreeClassID="&clng(Nthree)&" "
sql=sql&"order by "&NewsPXMethod
rs.open sql,conn,1,1
titleChrNum=50
rs.pagesize =12
page=clng(request("page"))
if page<=0 then page=1
if page > rs.pagecount then page=rs.pagecount
if not rs.eof then rs.AbsolutePage=page
if rs.eof and rs.bof then
    response.Write("<a href=#>No Information</a>")
else
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <%
    for i=1 to rs.pagesize
    if rs.eof then exit for
    %>
        <tr>
          <td><a href="?nlt=<%=rs("ID")%>" title="<%=rs("Title")%>"><span class="bottom" style="font-weight:bold"><%=gotTopic(rs("Title"),titleChrNum)%></span></a><br>
<%=gotTopic(RemoveHTML(rs("content")),300)%></td>
        </tr>
        <tr>
          <td height="20"><img src="images/xian.jpg" width="600" height="1"></td>
        </tr>
    <%
    rs.MoveNext
    Next
    %>
</table>

<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="60" align="center">
<%
if None<>"" then qryString=qryString&"&None="&None
if Ntwo<>"" then qryString=qryString&"&Ntwo="&Ntwo
if Nthree<>"" then qryString=qryString&"&Nthree="&Nthree
pageObj.pageskin=4
response.Write pageObj.link(rs.recordcount,rs.pagesize,page,"?page=",qryString)
%>
    </td>
    </tr>
</table>
<%
end if
rs.close
set rs=nothing
end sub
'新闻--End


'显示详细新闻--Start
sub shownews(nlt)'显示新闻内容'
dim arrLink()
dim arrTitle()
set rs=server.CreateObject("adodb.recordset")
sql="select * from News where ID>0 "
if request("None")<>"" then sql=sql&"and oneclassid="&clng(request("None"))&" "
sql=sql&"order by "&NewsPxMethod
rs.open sql,conn,1,1
for i=1 to rs.recordcount
  ReDim Preserve arrLink(i-1)
  arrLink(i-1)=rs("ID")
  ReDim Preserve arrTitle(i-1)
  arrTitle(i-1)=rs("Title")
rs.movenext
next
rs.close
set rs=nothing
set rs=server.CreateObject("ADODB.Recordset")   
sql="select * from News where ID>0 "
if nlt<>"" then sql=sql&"and ID="&clng(nlt)&" "
sql=sql&"order by "&NewsPxMethod
rs.Open sql,Conn,1,3
rs("Hits")=rs("Hits")+1
rs.update
strTemp="<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>"
strTemp=strTemp&"<tr><td height='30' align='center'><strong style='font-size:14px'>"&rs("Title")&"</strong></td></tr>"
if rs("subtitle")<>"" then
    strTemp=strTemp&"<tr><td height='30' align='center'><b>"&rs("SubTitle")&"</b></td></tr>"
end if
strTemp=strTemp&"<tr><td height='30' align='center'>"&Publisher_lang&rs("Publisher")&AddDate_lang&rs("AddDate")&Hits_lang&rs("Hits")&"</td></tr>"
strTemp=strTemp&"<tr><td style='border-top:1px solid #cccccc; padding:10px'>"
strContent=rs("Content")
ContentLen=len(strContent)
CurrentPage=trim(request("page"))
if Instr(strContent,"[NextPage]")<=0 then
    strTemp=strTemp&strContent
else
    arrContent=split(strContent,"[NextPage]")
    pages=Ubound(arrContent)+1
    if CurrentPage="" then
        CurrentPage=1
    else
        CurrentPage=Cint(CurrentPage)
    end if
    if CurrentPage<1 then CurrentPage=1
    if CurrentPage>pages then CurrentPage=pages
    strTemp=strTemp&arrContent(CurrentPage-1)
    strTemp=strTemp&"<p align='center'>"
    pageObj.pageskin=4
    strTemp=strTemp&pageObj.link(pages,1,CurrentPage,"?page=","&nlt="&rs("ID")&"")
    strTemp=strTemp&"</p>"
end if
strTemp=strTemp&"</td></tr><tr><td height='30'>"
for o=0 to ubound(arrLink)
  if arrLink(o)=rs("id") then
      if o>0 then
        strTemp=strTemp&"<a href='?nlt="&arrLink(o-1)&"&None="&request("None")&"'>"&prevLink_lang&":"&arrTitle(o-1)&"</a>"
      end if
      strTemp=strTemp&"<br>"
      if o<ubound(arrLink) then
        strTemp=strTemp&"<a href='?nlt="&arrLink(o+1)&"&None="&request("None")&"'>"&nextLink_lang&":"&arrTitle(o+1)&"</a>"
      end if
  end if
next
strTemp=strTemp&"</td></tr><tr><td height='30' align='right'><a href='#' onclick='history.back();return false;' title='"&backLink_lang&"'><img src='image/back_c.gif' border='0'></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='#' onclick='window.print();return false;' title='"&printLink_lang&"'><img src='image/print_c.gif' border='0'></a></td></tr></table>"
response.write strTemp
rs.close
set rs=nothing
end sub
'显示详细新闻--End


'显示页面信息--Start
sub information(Ititle,Ilt,Ione)'显示页面内容'
set rs=server.CreateObject("ADODB.RecordSet")   
sql="select * from Information where ID>0 "
if Ititle<>"" then sql=sql&"and Title='"&Ititle&"' "
if Ilt<>"" then sql=sql&"and ID="&clng(Ilt)&" "
if Ione<>"" then sql=sql&"and OneClassID="&clng(Ione)&" "
sql=sql&"order by px desc,ID desc"
rs.Open sql,Conn,1,3
rs("Hits")=rs("Hits")+1
rs.update
strTemp="<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>"
strTemp=strTemp&"<tr><td>"
strContent=rs("Content")
ContentLen=len(strContent)
CurrentPage=trim(request("page"))
if Instr(strContent,"[NextPage]")<=0 then
    strTemp=strTemp&strContent
else
    arrContent=split(strContent,"[NextPage]")
    pages=Ubound(arrContent)+1
    if CurrentPage="" then
        CurrentPage=1
    else
        CurrentPage=Cint(CurrentPage)
    end if
    if CurrentPage<1 then CurrentPage=1
    if CurrentPage>pages then CurrentPage=pages
    strTemp=strTemp&arrContent(CurrentPage-1)
    strTemp=strTemp&"<p align='center'>"
    pageObj.pageskin=4
    strTemp=strTemp&pageObj.link(pages,1,CurrentPage,"?page=","&Ilt="&rs("ID")&"&Ione="&rs("OneClassID")&"&Ititle="&rs("Title")&"")
    strTemp=strTemp&"</p>"
end if
strTemp=strTemp&"</td></tr></table>"
response.write strTemp
rs.close
set rs=nothing
end sub
'显示页面信息--End



'显示首页产品--Start
sub indexProduct()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
set rs = server.CreateObject("ADODB.RECORDSET")
sql = "select * from Product where show = 1 order by "&ProductPXMethod
rs.Open sql,conn,1,1
%>
  <tr>
<%
do while not rs.eof
%>
        <td>
            <table width="100%"  align="center" cellpadding="0" cellspacing="2" >
                <tr>
                    <td align="center">
                      <a href="product.asp?plt=<%=rs("ID")%>"><img src="<%=rs("pic")%>" width="138" height="104" border="0"></a>
                    </td>
                </tr>
                <tr>
                    <td height="20" align="center">
                      <a href="product.asp?plt=<%=rs("ID")%>"><%=rs("Title")%></a>
                    </td>
                </tr>
            </table>
        </td>
<%
rs.movenext
loop
%>   
 </tr>
<%
rs.close
set rs=nothing
%>
</table>
<%
end sub
'显示首页产品--End

'显示产品--Start
sub product(Pone,Ptwo)'产品系统'
set rs = server.CreateObject("ADODB.RECORDSET")
sql = "SELECT * from Product where ID>0 "
if Pone<>"" then sql =sql&"and OneClassID="&clng(Pone)&" "
if Ptwo<>"" then sql =sql&"and TwoClassID="&clng(Ptwo)&" "
if Pthree<>"" then sql =sql&"and ThreeClassID="&clng(Pthree)&" "
if Pfour<>"" then sql =sql&"and FourClassID="&clng(Pfour)&" "
if Pfive<>"" then sql =sql&"and FiveClassID="&clng(Pfive)&" "
if key<>"" then sql =sql&"and Title like '%"&key&"%' "
sql =sql&"order by "&ProductPXMethod&" "
rs.Open sql,conn,1,1
rows=3
cols=3
rs.PageSize=rows*cols  '每页显示的记录数 '显示标题时               
page=clng(request("page"))
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
if not rs.eof then rs.AbsolutePage=page
if rs.RecordCount>0 then
%>
<table width='100%' border='0' cellpadding='0' cellspacing='2' align='center'>
<%
for i = 1 to rows
If rs.EOF Then Exit For
%>
  <tr>
    <%
    for j = 1 to cols
    If rs.EOF Then Exit For
    %>
    <td style="padding:8px">
   
   
<table width="209" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
              <td><a href='?plt=<%=rs("ID")%>'><img src="<%=trim(rs("pic"))%>" width="245" height="163" border="0"></a></td>
        </tr>
            <tr>
              <td height="15">&nbsp;</td>
              </tr>
            <tr>
              <td height="39" background="images/juzhao_bj.jpg"><div align="left"><a href='?plt=<%=rs("ID")%>'><%=rs("Title")%></a></div></td>
              </tr>
          </table>
              
    </td>
    <%
    rs.MoveNext
    next
    %>
  </tr>
<%
next
%>
</table>
<%
else
response.Write("<p align='center'><font color='red'>No Information</font></p>")
end if
%>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="60" align="center">
<%
qryString=""
if Pone<>"" then qryString=qryString&"&Pone="&Pone
if Ptwo <> "" then qryString=qryString&"&Ptwo="&Ptwo
if Pthree <> "" then qryString=qryString&"&Pthree="&Pthree
if Pfour <> "" then qryString=qryString&"&Pfour="&Pfour
if Pfive <> "" then qryString=qryString&"&Pfive="&Pfive
if key<>"" then qryString=qryString&"&key="&key
pageObj.pageskin=1
response.Write pageObj.link(rs.recordcount,rs.pagesize,page,"?page=",qryString)
%>
       </td>
    </tr>
</table>
<%
rs.close
set rs=nothing
end sub
'显示产品--End



'显示详细产品--Start
sub showproduct(plt)'显示新闻内容'
set rs = server.CreateObject("ADODB.RECORDSET")
sql = "SELECT * from  product where id="&plt
rs.Open sql,conn,1,1
response.Write("<span style='font-size:14px; font-weight:bold;display:block; text-align:center'>"&rs("title")&"</span><hr style='height:1px; color:cccccc'>")
rs.close
set rs=nothing
set rs = server.CreateObject("ADODB.RECORDSET")
sql = "SELECT * from  PImage where parentid="&plt&" order by px desc,ID desc"
rs.Open sql,conn,1,1
rows=3
cols=3
rs.PageSize=rows*cols  '每页显示的记录数 '显示标题时               
page=clng(request("page"))
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
if not rs.eof then rs.AbsolutePage=page
if rs.RecordCount>0 then
%>
<table width='100%' border='0' cellpadding='0' cellspacing='2' align='center'>
<%
for i = 1 to rows
If rs.EOF Then Exit For
%>
  <tr>
    <%
    for j = 1 to cols
    If rs.EOF Then Exit For
    %>
        <td>
            <table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
               <tr>
                 <td align='center'>
                 <a href='<%=rs("bigpic")%>'  rel='lightbox[plants]' title="<%=rs("Title")%>"><img src="<%=trim(rs("pic"))%>" align='absmiddle' width='245' height='163' border='0'></a>                 </td>
               </tr>
               <tr style="display:<%=showtitle%>">
                 <td height="25" align="center" style="padding-bottom:8px">
                 <%=rs("Title")%>
                 </td>
                </tr>
            </table>
        </td>
    <%
    rs.MoveNext
    next
    %>
    </tr>
<%
next
%>
</table>
<%
else
response.Write("<p align='center'><font color='red'>No information</font></p>")
end if
%>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="60" align="center">
<%
qryString=""
if plt<>"" then qryString=qryString&"&plt="&plt
pageObj.pageskin=1
response.Write pageObj.link(rs.recordcount,rs.pagesize,page,"?page=",qryString)
%>
      </td>
    </tr>
</table>
<%
rs.close
set rs=nothing
end sub
'显示详细产品--End

sub info(dismode,tablename,strurl,imgwidth,imgheight,rowsnum,colsnum,chrnum,linkclass,showtitle,imagezoom,Ione,Itwo)
'显示模式,表名,链接页面,图宽,图高,行,列,截取字数,链接样式,显示标题否,放大效果图,一级类,二级类
set rs = server.CreateObject("ADODB.RECORDSET")
sql = "SELECT * from  "&tablename&" where ID>0 "
if Ione<>"" then sql=sql&"and OneClassID="&clng(Ione)&" "
if Itwo<>"" then sql=sql&"and TwoClassID="&clng(Itwo)&" "
sql=sql&"order by px desc,ID desc"
rs.Open sql,conn,1,1
rows=rowsnum
cols=colsnum
rs.PageSize=rows*cols  '每页显示的记录数 '显示标题时               
page=clng(request("page"))
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
if not rs.eof then rs.AbsolutePage=page
if rs.RecordCount>0 then
%>
<%if imagezoom<>"" then%>
    <link rel="shortcut icon" type="image/ico" href="/images/favicon.gif" />   
    <link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
   
    <script src="js/prototype.js" type="text/javascript"></script>
    <script src="js/scriptaculous.js?load=effects" type="text/javascript"></script>
    <script src="js/lightbox.js" type="text/javascript"></script>
<%end if%>
<table width='100%' border='0' cellpadding='0' cellspacing='2' align='center'>
<%
for i = 1 to rows
If rs.EOF Then Exit For
%>
  <tr>
    <%
    for j = 1 to cols
    If rs.EOF Then Exit For
    %>
        <td>
        <%if dismode="pic" then%>
            <table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
               <tr>
                 <td align='center'>
                 <a <%if imagezoom="imagezoom" then response.Write("href='"&rs("defaultpicurl")&"' rel='lightbox[plants]' ") else response.Write("href='"&strurl&"?lt="&rs("ID")&"'") end if%> class='<%=linkclass%>' title="<%=rs("Title")%>"><img src="<%=trim(rs("pic"))%>" align='absmiddle' width='<%=imgwidth%>' height='<%=imgheight%>' border='0'></a>
                 </td>
               </tr>
               <tr style="display:<%=showtitle%>">
                 <td height="25" align="center" style="padding-bottom:8px">
                 <a href='<%=strurl%>?lt=<%=rs("ID")%>' class='<%=linkclass%>'><%=rs("Title")%></a>
                 </td>
                </tr>
            </table>
        <%elseif dismode="title" then%>
            <table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
               <tr>
                 <td height="25">
                 <a href='<%=strurl%>?lt=<%=rs("ID")%>' class='<%=linkclass%>' title="<%=rs("Title")%>">·<%=rs("Title")%></a>
                 </td>
                </tr>
            </table>
        <%elseif dismode="title-date" then%>
            <table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
               <tr>
                 <td height="25">
                 <a href='<%=strurl%>?lt=<%=rs("ID")%>' class='<%=linkclass%>' title="<%=rs("Title")%>">·<%=rs("Title")%></a>
                 </td>
                 <td width="100" align="center"><%=year(rs("addDate"))%>-<%=month(rs("addDate"))%>-<%=day(rs("addDate"))%>
                 </td>
                </tr>
            </table>
        <%elseif dismode="pic-title-intro" then%>
        <table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
           <tr>
             <td align="center" valign="top" width="1" style="padding-right:8px">
             <a <%if imagezoom="imagezoom" then response.Write("href='"&rs("defaultpicurl")&"' rel='lightbox[plants]' ") else response.Write("href='"&strurl&"?lt="&rs("ID")&"'") end if%> class='<%=linkclass%>' title="<%=rs("Title")%>"><img src="<%=trim(rs("pic"))%>" align='absmiddle' width='<%=imgwidth%>' height='<%=imgheight%>' border='0'></a>
             </td>
             <td align="center" valign="top">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><a href='<%=strurl%>?lt=<%=rs("ID")%>' class='<%=linkclass%>' title="<%=rs("Title")%>"><b><%=rs("Title")%></b></a></td>
                  </tr>
                  <tr>
                    <td><%=gotTopic(RemoveHTML(rs("Content")),chrnum)%></td>
                  </tr>
                </table>
             </td>
            </tr>
        </table>
        <br>
        <%end if%>
        </td>
    <%
    rs.MoveNext
    next
    %>
    </tr>
<%
next
%>
</table>
<%
else
response.Write("<p align='center'><font color='red'>No information</font></p>")
end if
%>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="60" align="center">
<%
qryString=""
if Ione<>"" then qryString=qryString&"&Ione="&Ione
if Itwo<>"" then qryString=qryString&"&Itwo="&Itwo
pageObj.pageskin=1
response.Write pageObj.link(rs.recordcount,rs.pagesize,page,"?page=",qryString)
%>
      </td>
    </tr>
</table>
<%
rs.close
set rs=nothing
end sub
'显示模块信息--End

'显示详细模块信息--Start
sub showinfo(tablename,lt,linkclass,showtitle)'表名,id,链接样式,显示标题否
dim arrLink()
dim arrTitle()
set rs=server.CreateObject("adodb.recordset")
sql="select * from "&tablename&" where id>0 "
if request("Ione")<>"" then sql=sql&"and oneclassid="&clng(request("Ione"))&" "
sql=sql&"order by px desc,id desc"
rs.open sql,conn,1,1
for i=1 to rs.recordcount
  ReDim Preserve arrLink(i-1)
  arrLink(i-1)=rs("id")
  ReDim Preserve arrTitle(i-1)
  arrTitle(i-1)=rs("title")
rs.movenext
next
rs.close
set rs=nothing
set rs=server.CreateObject("ADODB.Recordset")   
sql="select * from "&tablename&" where ID>0 "
if lt<>"" then sql=sql&"and ID="&clng(lt)&" "
sql=sql&"order by px desc,ID desc"
rs.Open sql,Conn,1,3
rs("Hits")=rs("Hits")+1
rs.update
strTemp="<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>"
strTemp=strTemp&"<tr style='display:"&showtitle&"'><td height='30' align='center' style='border-bottom:1px solid #cccccc;'><strong style='font-size:14px'>"&rs("Title")&"</strong></td></tr>"
strTemp=strTemp&"<tr><td style=' padding:10px'>"
strContent=rs("Content")
ContentLen=len(strContent)
CurrentPage=trim(request("page"))
if Instr(strContent,"[NextPage]")<=0 then
    strTemp=strTemp&strContent
else
    arrContent=split(strContent,"[NextPage]")
    pages=Ubound(arrContent)+1
    if CurrentPage="" then
        CurrentPage=1
    else
        CurrentPage=Cint(CurrentPage)
    end if
    if CurrentPage<1 then CurrentPage=1
    if CurrentPage>pages then CurrentPage=pages
    strTemp=strTemp&arrContent(CurrentPage-1)
    strTemp=strTemp&"<p align='center'>"
    pageObj.pageskin=4
    strTemp=strTemp&pageObj.link(pages,1,CurrentPage,"?page=","&amp;lt="&lt&"")
    strTemp=strTemp&"</p>"
end if
strTemp=strTemp&"</td></tr><tr><td height='30'>"
for o=0 to ubound(arrLink)
  if arrLink(o)=rs("id") then
      if o>0 then
        strTemp=strTemp&"<a href='?lt="&arrLink(o-1)&"&Ione="&request("Ione")&"'>"&prevLink_lang&":"&arrTitle(o-1)&"</a>"
      end if
      strTemp=strTemp&"<br>"
      if o<ubound(arrLink) then
        strTemp=strTemp&"<a href='?lt="&arrLink(o+1)&"&Ione="&request("Ione")&"'>"&nextLink_lang&":"&arrTitle(o+1)&"</a>"
      end if
  end if
next
strTemp=strTemp&"</td></tr><tr><td height='30' align='right'><a href='#' onclick='history.back();return false;' title='"&backLink_lang&"'><img src='image/back_c.gif' border='0'></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='#' onclick='window.print();return false;' title='"&printLink_lang&"'><img src='image/print_c.gif' border='0'></a></td></tr></table>"
response.write strTemp
rs.close
set rs=nothing
end sub
'显示详细模块信息--End

sub showanli(lt)'表名,id,链接样式,显示标题否
dim arrLink()
dim arrTitle()
set rs=server.CreateObject("adodb.recordset")
sql="select * from anli where id>0 "
if request("Ione")<>"" then sql=sql&"and oneclassid="&clng(request("Ione"))&" "
sql=sql&"order by px desc,id desc"
rs.open sql,conn,1,1
for i=1 to rs.recordcount
  ReDim Preserve arrLink(i-1)
  arrLink(i-1)=rs("id")
  ReDim Preserve arrTitle(i-1)
  arrTitle(i-1)=rs("title")
rs.movenext
next
rs.close
set rs=nothing
set rs=server.CreateObject("ADODB.Recordset")   
sql="select * from anli where ID>0 "
if lt<>"" then sql=sql&"and ID="&clng(lt)&" "
sql=sql&"order by px desc,ID desc"
rs.Open sql,Conn,1,3
rs("Hits")=rs("Hits")+1
rs.update
strTemp="<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>"
strTemp=strTemp&"<tr><td height='30' align='center' style='border-bottom:1px solid #cccccc;'><strong style='font-size:14px'>"&rs("Title")&"</strong></td></tr>"
strTemp=strTemp&"<tr><td style=' padding:10px'><div align=center>"
strTemp=strTemp&"<object type='application/x-shockwave-flash' data='vcastr3.swf' width='500' height='360' id='vcastr3'>"
strTemp=strTemp&"<param name='movie' value='vcastr3.swf'/> "
strTemp=strTemp&"<param name='allowFullScreen' value='true' />"
strTemp=strTemp&"<param name='FlashVars' value='xml="
strTemp=strTemp&"<vcastr>"
strTemp=strTemp&"<channel>"
strTemp=strTemp&"<item>"
strTemp=strTemp&"<source>"&rs("fileurl")&"</source>"
strTemp=strTemp&"<duration></duration>"
strTemp=strTemp&"<title></title>"
strTemp=strTemp&"</item>"
strTemp=strTemp&"</channel>"
strTemp=strTemp&"<config>"
strTemp=strTemp&"<bufferTime>4</bufferTime> "
strTemp=strTemp&"<isAutoPlay>false</isAutoPlay> "
strTemp=strTemp&"<isRepeat>true</isRepeat> "
strTemp=strTemp&"<isLoadBegin>true</isLoadBegin> "
strTemp=strTemp&"<isShowAbout>true</isShowAbout> "
strTemp=strTemp&"</config>"
strTemp=strTemp&"</vcastr>'/>"
strTemp=strTemp&"</object></div>"
strContent=rs("Content")
ContentLen=len(strContent)
CurrentPage=trim(request("page"))
if Instr(strContent,"[NextPage]")<=0 then
    strTemp=strTemp&strContent
else
    arrContent=split(strContent,"[NextPage]")
    pages=Ubound(arrContent)+1
    if CurrentPage="" then
        CurrentPage=1
    else
        CurrentPage=Cint(CurrentPage)
    end if
    if CurrentPage<1 then CurrentPage=1
    if CurrentPage>pages then CurrentPage=pages
    strTemp=strTemp&arrContent(CurrentPage-1)
    strTemp=strTemp&"<p align='center'>"
    pageObj.pageskin=4
    strTemp=strTemp&pageObj.link(pages,1,CurrentPage,"?page=","&amp;lt="&lt&"")
    strTemp=strTemp&"</p>"
end if
strTemp=strTemp&"</td></tr><tr><td height='30'>"
for o=0 to ubound(arrLink)
  if arrLink(o)=rs("id") then
      if o>0 then
        strTemp=strTemp&"<a href='?lt="&arrLink(o-1)&"&Ione="&request("Ione")&"'>"&prevLink_lang&":"&arrTitle(o-1)&"</a>"
      end if
      strTemp=strTemp&"<br>"
      if o<ubound(arrLink) then
        strTemp=strTemp&"<a href='?lt="&arrLink(o+1)&"&Ione="&request("Ione")&"'>"&nextLink_lang&":"&arrTitle(o+1)&"</a>"
      end if
  end if
next
strTemp=strTemp&"</td></tr><tr><td height='30' align='right'><a href='#' onclick='history.back();return false;' title='"&backLink_lang&"'><img src='image/back_c.gif' border='0'></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='#' onclick='window.print();return false;' title='"&printLink_lang&"'><img src='image/print_c.gif' border='0'></a></td></tr></table>"
response.write strTemp
rs.close
set rs=nothing
end sub

%>

原来是启动 vcastr3.0 播放器的, 但我现在想调用 优酷,不知在那里播入,还有 是  &rs("fileurl")&  


<embed src="http://player. allowFullScreen="true" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>
搜索更多相关主题的帖子: 信息 set include 网页 file 
2013-04-12 20:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-404015-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.067064 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved