yns_cab.asp
资源名称:gov_1.0.rar [点击查看]
上传用户:yjkj1008
上传日期:2020-10-17
资源大小:1496k
文件大小:2k
源码类别:
电子政务应用
开发平台:
HTML/CSS
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
- <!--#include file="Connections/conn_news.asp" --> <% '请尊重作者劳动成果不要删除以上信息 '业一新闻系统3.0正式版 '主页:http://yeyi.net '论坛:http://bbs.yeyi.net '业一网络 承接各种网站制作 '程序开发 软件开发业务 '业务联系 '电话: 13007310512 '联系人:郝亚平 'QQ:24344842 (只谈业务,技术问题请访问论坛) '请尊重作者劳动成果不要删除以上信息 %>
- <%
- Dim rsn__MMColParam
- rsn__MMColParam = "1"
- If (Request.Form("t_id") <> "") Then
- rsn__MMColParam = Request.Form("t_id")
- End If
- %>
- <%
- Dim rsn
- Dim rsn_numRows
- Set rsn = Server.CreateObject("ADODB.Recordset")
- rsn.ActiveConnection = MM_conn_news_STRING
- rsn.Source = "SELECT * FROM t_news WHERE n_tid = " + Replace(rsn__MMColParam, "'", "''") + ""
- rsn.CursorType = 0
- rsn.CursorLocation = 2
- rsn.LockType = 1
- rsn.Open()
- rsn_numRows = 0
- %>
- <%if rsn.eof and rsn.bof then%>
- <script language=javascript>
- alert( "该类别没有新闻!" );
- location.href = "javascript:history.back()"
- </script>
- <% Else %>
- <%
- Dim rsm__MMColParam
- do while not rsn.EOF
- rsm__MMColParam = "1"
- If (Request.Form("m_id") <> "") Then
- rsm__MMColParam = Request.Form("m_id")
- End If
- %>
- <%
- Dim rsm
- Dim rsm_numRows
- Set rsm = Server.CreateObject("ADODB.Recordset")
- rsm.ActiveConnection = MM_conn_news_STRING
- rsm.Source = "SELECT * FROM t_mob WHERE m_id = " + Replace(rsm__MMColParam, "'", "''") + ""
- rsm.CursorType = 0
- rsm.CursorLocation = 2
- rsm.LockType = 1
- rsm.Open()
- rsm_numRows = 0
- pencat = (rsm.Fields.Item("m_content").Value)
- %>
- <%
- dim n_fpath
- dim n_title
- dim n_author
- dim n_content
- dim n_date
- dim n_fname
- n_fpath = request.form("t_id")
- n_title = (rsn.Fields.Item("n_title").Value)
- n_author = (rsn.Fields.Item("n_author").Value)
- n_content = (rsn.Fields.Item("n_content").Value)
- n_date = (rsn.Fields.Item("n_date").Value)
- n_fname = (rsn.Fields.Item("n_fname").Value)
- pencat = replace(pencat,"t_title",n_title)
- pencat = replace(pencat,"t_author",n_author)
- pencat = replace(pencat,"t_content",n_content)
- pencat = replace(pencat,"t_date",n_date)
- Set fso = Server.CreateObject("Scripting.FileSystemObject")
- Set fout = fso.CreateTextFile(server.mappath(n_fpath&""&n_fname),true)
- fout.WriteLine pencat
- fout.close
- response.write("转换文件:"&n_fpath&""&n_fname&"<br>")
- %>
- <%
- rsm.Close()
- Set rsm = Nothing
- %>
- <%
- rsn.MoveNext
- loop
- rsn.Close()
- Set rsn = Nothing
- %>
- <% End If %>
- <script language=javascript>
- alert( "模版转换完成" );
- location.href = "javascript:history.back()"
- </script>
English
