<!DOCTYPE html>
<%@ language="vbscript" codepage="936" %>
<%
'========================================================================================
' 文 件 名: admin_makejs.asp
' 版    本: 岭峰网行业专用留言系统3.10.0 (LFMessS 2020 - 3.10.0.F Build 200604)
' 说    明: js文件生成器 | 
' 文件日期: 2020-06-04
' 设 计 者: 疾风之狼
'========================================================================================
' 郑州文达岭峰网络科技有限公司.
'========================================================================================
' Copyright (C) 2001-2020 岭峰网. All rights reserved.
' 网    站: http://www.lfmesss.com
' 电子邮件: support@lfmesss.com
' 联系ＱＱ: 85112407
'======================================================================================== 
%>
<!-- #include file="../common/sub_inc.asp" -->
<!-- #include file="../common/commfun.asp" -->
<!-- #include file="../common/ip_purview.asp" -->
<!-- #include file="../common/connect.asp" -->
<%flg = "man"%>
<!-- #include file="../common/purview.asp" -->
<head>
<title></title>
<%  
  Call htmlmeta() 
%> 
<link rel="stylesheet" href="../style/css/<%= LingFengNet_MS_web_css %>.css" type="text/css">
<link rel="shortcut icon" href="../pic/favicon.ico" type="image/x-icon">
<link rel="bookmark" href="../pic/favicon.ico" type="image/x-icon">
</head>
<body>
<%IF request.form("set") <> "ok" Then%>
<form action="admin_makejs.asp" method="post" name="makejs"><br>
<table width="99%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30"><input name="jsname" type="text" readonly value="add_js.js">
      <input name="js_button" type="submit" value="<%= LingFengNet_MS_language_w3c_04 %>">
      <input type="hidden" name="set" value="ok"></td>
  </tr>
</table>
</form>
</body>
</html>
<%
Else
	On Error Resume Next
	Server.ScriptTimeout = 9999999
			
	Path = "http://"&Request.ServerVariables("server_name") & Replace(Request.ServerVariables("Script_name"), "admin_makejs.asp", "")
	url = "" & Path & "addnew.asp"
	wstr = getHTTPPage(url)
	
	start_inc = Newstring(wstr, "<!--openjs-->")
	over_inc = Newstring(wstr, "<!--endjs-->")
	body_inc = Mid(wstr, start_inc, over_inc)
	
	IF IsObjInstalled("Scripting.FileSystemObject") Then
		writeStr_inc = body_inc
		toppath_inc = Server.Mappath("config/temp.LFW")
		Set fs = CreateObject("Scripting.FileSystemobject")
		
		IF Not Fs.FILEEXISTS(toppath_inc) Then 
			Set Ts_inc = fs.CreateTextFile(toppath_inc, True)
			Ts_inc.close
		End IF
		Set Ts_inc = Fs.OpenTextFile(toppath_inc, 2)
		Ts_inc.writeline(writeStr_inc)
		Ts_inc.Close
		Set Ts_inc = Nothing		
			
		IF fs.FileExists(server.mappath("config/temp.LFW")) Then
			Set ts = fs.OpenTextFile(Server.Mappath("config/temp.LFW")) 
			Do until ts.AtEndOfStream
				str = str & "document.writeln("""&ts.readLine &""");"& chr(13) & chr(10)
			loop		
			ts.close 
			str = Replace(str, "\", "\\")
			str = Replace(str, "/", "\/")
			str = Replace(str, """", "\""")
			str = Replace(str, "document.writeln(\""", "document.writeln(""")
			str = Replace(str, "\"");", """);")
		Else 
			Response.Write ""& LingFengNet_MS_language_w3c_12 &"&ensp;&ensp;&ensp;&ensp;<a href=""admin_makejs"&Get_Suffix()&""">"& LingFengNet_MS_language_w3c_06 &"</a>" 
			Response.End 
		End IF 
	
		writeStr = str
		jsname = Trim(Request.Form("jsname"))
		toppath = Server.Mappath(""& jsname &"")
	
		IF Not Fs.FILEEXISTS(toppath) Then 
			Set Ts = fs.CreateTextFile(toppath, True)
			Ts.close
		End IF
		Set Ts= Fs.OpenTextFile(toppath,2)
		Ts.writeline (writeStr)
		Ts.close
		
		Set file = fs.getfile(toppath_inc)
		file.delete
		Set file = Nothing
		
		Set Ts = Nothing
		Set Fs = Nothing
		html_web = Chr(60)&"script charset=""GB2312"" src="""&Path&jsname&""""&chr(62)&chr(60)&"/script"&chr(62)
		html_web = Server.HtmlEncode(html_web)
		logstr = LingFengNet_MS_language_w3c_14
		Call logtodo(logstr, 1, "ok")
		Response.Write ""& LingFengNet_MS_language_w3c_09 &"&ensp;&ensp;" &html_web& "&ensp;&ensp;"& LingFengNet_MS_language_w3c_10 &"<br><a href=""admin_makejs"&Get_Suffix()&""">"& LingFengNet_MS_language_w3c_06 &"</a>"
	else
		logstr = LingFengNet_MS_language_w3c_15
		Call logtodo(logstr, 1, "err")
		Response.Write ""& LingFengNet_MS_language_w3c_11 &"&ensp;&ensp;&ensp;&ensp;<a href=""admin_makejs"&Get_Suffix()&""">"& LingFengNet_MS_language_w3c_06 &"</a>"
	End IF
End IF	
%>