<!--#include file="../inc/Yidacms_gbk.asp" -->
<!--#include file="../inc/conn.asp" -->
<!--#include file="../inc/inc.asp" -->
<style type="text/css">* { font-family:Arial, Helvetica, sans-serif;}</style>
<%
Dim steps
steps = Request("steps")
If steps = "" Then steps = "step9" End If
Select Case steps
    Case "step1"
        session("step1") = "step1"
        Call step1
    Case "step2"
        session("step2") = "step2"
        Call step2
    Case "step3"
        session("step3") = "step3"
        Call step3	
    Case "step4"
        session("step4") = "step4"
        Call step4		
    Case "step5"
        session("step5") = "step5"
        Call step5		
    Case "step6"
        session("step6") = "step6"
        Call step6	
    Case "step7"
        session("step7") = "step7"
        Call step7		
    Case "step8"
        session("step8") = "step8"
        Call step8
    Case "step9"
        session("step9") = "step9"
        Call step9			
End Select
 Sub step9()
	if actoms = 1 then
%>
<p>感谢使用易达企业建站系统(YIDACMS)</p>
<p>当前默认安装为ASP+ACCESS版，如果您是MSSQL版客户请用记事本方式打开 /inc/db.asp</p>
<p>把actoms = 1  改为 actoms = 2 并配置MSSQL数据库信息。</p>
<p>配置好后回来刷新这个页面。</p>
<p><a href="install.asp?steps=step8">开始安装ASP+ACCESS版</a></p>
<%
	elseif actoms = 2 then
%>
<p>感谢使用易达企业建站系统(YIDACMS)</p>
<p>当前默认安装为ASP+MSSQL版，如果您是ACCESS版客户请用记事本方式打开 /inc/db.asp</p>
<p>把actoms = 2  改为 actoms = 1 </p>
<p>配置好后回来刷新这个页面。</p>
<p><a href="install.asp?steps=step8">开始安装ASP+MSSQL版</a></p>
<%
	end if
 End Sub
 Sub step8()

Dim yidacms_ym,yidacms_bh
set rs = server.createobject("adodb.recordset")
sql="select yidacms_ym,yidacms_bh from shuaiweb_impower where id = 1"
rs.open sql,dbok,1,1
yidacms_bh = rs(1)
rs.close
%>

<div style="font-size:12px; line-height:16px;">
<p>使用协议</p>
<p>首先感谢您使用易达CMS企业建站系统软件，当前版本为：<%=Version%> 更新日期为：<%=Versiondate%></p>
<p>请遵守以下协议:
<p>一、易达企业建站系统在没有授权下，页面及网页标题中的Powered by YidaCms版权标志不可以删除。</p>
<p>二、易达企业建站系统在没有授权下，不可以用于商业用途中。一但发现将侵害易达版权，后果自负。</p>
<p>三、易达企业建站系统在没有授权下，可以用于个人使用但要履行第一条规定。</p>
<p>四、使用本产品进行商业用途或去掉前后台版权标志的用户，需要购买商业授权。</p>
<p>五、如果你使用本程序进行2次开发或者制作模版等，必须遵循国际LGPL开源协议，也就是说，你没有购买我们的商业授权的话，你是需要公开这些代码和模版，供大家使用交流的。</p>
<p>六、免费开源不等于让你拿去随意使用，我们不是慈善事业。请尊重知识产权(软件著作权登记号:2012SR001955)!</p>
<p>七、免责声明</p>
<p>1.本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。</p>
<p>2.用户出于自愿而使用本软件，您必须了解使用本软件的风险，我们不承担任何因使用本软件而产生问题的相关责任。</p>
<p><font color="red">注意：如果你不同意以上协议，请不要使用我们的建站系统。并立刻删除!</font></p>

<%if actoms = 1 then%>
<a href="install.asp?steps=step1"><img src="images/01.gif" border="0" /></a>
<%else%>
<a href="install_sql.asp?steps=step6"><img src="images/01.gif" border="0" /></a>
<%
end if
End Sub
Sub step1()
		dim rs,sql
		set rs = server.createobject("adodb.recordset")
		sql="select Webtitle,weburl from shuaiweb_system where id = 1"
		rs.open sql,dbok,1,1
		
		Webtitle=rs(0)
		weburl=rs(1)

		Dim Url,Key,WwwName 
		Url=Request.ServerVariables("SERVER_NAME") 
		If InStr(Url,"")>0 Then 
		Key=Split(Url,"") 
		WwwName=Key(0) 
		WwwName=Replace(WwwName,"http://","www")
		end if
        qqemail = request("qqemail")
        banben= request("banben")
%>

<form id="form1" name="form1" method="POST" action="install.asp?steps=step2">
<table width="100% "border="0" cellpadding="10" cellspacing="0" style="border-collapse:collapse; font-size:12px;" align="center" style="margin-top:50px;">
  <tr>
    <td colspan="2">第一步：创建网站名称和地址</td>
  </tr>
		  <tr style="border-top:#CCCCCC solid 1px;">
			<td>网站标题<br /><input name="webtitle" type="text" id="webtitle" value="<%=webtitle%>" style="width:400px; height:30px; line-height:30px;"/> <font color=red>(必填)</font></td>
		  </tr>
		  <tr style="border-top:#CCCCCC solid 1px;">
			<td>网站地址<br /><input name="weburl" type="text" id="weburl" value="<%=weburl%>" style="width:400px; height:30px; line-height:30px;"/><font color="#ff0000"> * (很重要)(必填)</font><br />1.请以 http:// 开头 — 用 / 结尾 <br />2.当前的域名是：http://<%=WwwName%>/<br />3.注：( 如果程序放在二级目录使用，请输入目录名以 / 结尾。例如:http://<%=WwwName%>/demo/ )<br /><br /><br  /></td>
		  </tr>
  <tr style="border-top:#CCCCCC solid 1px;">
    <td>
      <input type="submit" name="Submit" value="" style=" background:URL(images/02.gif); border:0px; width:91px; height:27px;" /></td>
  </tr>
</table>
</form>

<%
End Sub
Sub step2()

		if len(trim(request.Form("webtitle")))<1 then
		response.write ("<script language=javascript> alert('网站标题必填且不能少于1个字符！');history.go(-1);</script>")
		response.end
		end if
		  
		if len(trim(request.Form("weburl")))<1 then
		response.write ("<script language=javascript> alert('网站网址不能为空，且不少于1个字符！');history.go(-1);</script>")
		response.end
		end if
%>
<table width="800" border="0" align="center" cellpadding="10" cellspacing="10" style="font-size:14px;">
  <tr>
    <td><p align="center" style="font-size:16px; color:#FF0000; font-weight:600;">安装失败！</p>
      <p>原因可能是你所存放网站程序的硬盘是NTFS分区，最简单的解决办法是用记事本打开/inc/db.asp文件，</p>
      <p>把TXW_install = &quot;open&quot;改为TXW_install = &quot;close&quot; 然后关闭浏览器，在从新打开直接进入后台可省略安装这一步，但这不是一个有效的解决办法． </p>
      <p>因为硬盘如果是NTFS分区的话，那么每一个网站目录都要添写IIS权限．这是必须的！只要有这样才能发挥好ASP的作用． </p>
      <p>解决办法1:把程序移动到FAT32分区中，在FAT32分区的硬盘中是不须要写权限的．</p>
    <p>解决办法2:给NTFS分区下的网站目录添写IIS权限！<a href="http://bbs.yidacms.com/thread-816-1-1.html" target="_blank">查看添写权限的方法</a></p></td>
  </tr>
</table>
<%
		exec="select * from shuaiweb_system where id = 1" 
		set rs=server.createobject("adodb.recordset")
		rs.open exec,dbok,1,3
		rs("webtitle")=request.form("webtitle")
		rs("weburl")=request.form("weburl")		
		rs.update
		rs.close
		response.redirect "yidacms_html.asp?html=ok1"
		
End Sub
Sub step3()

		response.write " <table width=""800"" border=""0"" cellpadding=""10"" cellspacing=""0"" style=""border-collapse:collapse; font-size:12px;"" align=""center"">"&vbcrlf
		response.write " <form id=""form1"" name=""form1"" method=""post"" action=""install.asp?steps=step4"">"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "   <td colspan=""2"">第二步：修改管理员目录"&vbcrlf
		response.write "   </td>"&vbcrlf
		response.write "   </tr>"&vbcrlf								
		response.write "   <tr style=""border-top:#CCCCCC solid 1px;"">"&vbcrlf
		response.write "     <td width=""70""><font color=red>*</font>更改为？</td>"&vbcrlf
		response.write "     <td>/<input name=""adminpath"" id=""adminpath"" type=""text"" onkeyup=""value=value.replace(/[^\w\.\/]/ig,'')"">/<br /> <font color=red>+++ 只需要输入新的后台登录目录名，可以为英文或数字或英文数字组合。<br /> 不可以为中文或符号<br />为了网站安全不可以使用 admin 或 admin888 等常用的名称来定义管理员目录！ +++ </font></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   <tr style=""border-top:#CCCCCC solid 1px;"">"&vbcrlf
		response.write "     <td>&nbsp;</td>"&vbcrlf
		response.write "     <td><input type=""submit"" name=""Submit"" value="""" style=""background:URL(images/02.gif); border:0px; width:91px; height:27px;""/></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "  </form>"&vbcrlf
		response.write " </table>"&vbcrlf
		
End Sub
Sub step4()
		if len(trim(request.Form("adminpath")))<1 then
		response.write ("<script language=javascript>alert('目录名必填且不能少于1个字符！');history.go(-1);</script>")
		response.end
		end if

		if trim(request.Form("adminpath"))="admin" then
		response.write ("<script language=javascript>alert('为了网站安全，请不要使用admin来做为新的后台目录');history.go(-1);</script>")
		response.end
		end if
		
		if trim(request.Form("adminpath"))="admin" or trim(request.Form("adminpath"))="bianji" or trim(request.Form("adminpath"))="html" or trim(request.Form("adminpath"))="httpd" or trim(request.Form("adminpath"))="images" or trim(request.Form("adminpath"))="inc" or trim(request.Form("adminpath"))="t" or trim(request.Form("adminpath"))="template" or trim(request.Form("adminpath"))="yidacmsDB" or trim(request.Form("adminpath"))="uploadclass" or trim(request.Form("adminpath"))="uploadimg" or trim(request.Form("adminpath"))="user" or trim(request.Form("adminpath"))="wap" or trim(request.Form("adminpath"))="install" or trim(request.Form("adminpath"))="api" or trim(request.Form("adminpath"))="about" or trim(request.Form("adminpath"))="news" or trim(request.Form("adminpath"))="products" or trim(request.Form("adminpath"))="photo" or trim(request.Form("adminpath"))="video" or trim(request.Form("adminpath"))="book" or trim(request.Form("adminpath"))="down" then
		response.write ("<script language=javascript>alert('"&request.Form("adminpath")&"该目录已存在，请换其它目录名称!');history.go(-1);</script>")
		response.end
		end if

		exec="select * from book_management where id = 1" 
		set rs=server.createobject("adodb.recordset")
		rs.open exec,dbok,1,3
		rs("adminpath") = trim(request.form("adminpath"))
		rs.update
		rs.close

		set fs=server.CreateObject("scripting.filesystemobject")
		set fw=fs.OpenTextFile(server.MapPath("../robots.txt"),2,true)
		fw.write "#"&vbcrlf
		fw.write "# robots.txt for YidaCms! "&Version&"/"&Versiondate&""&vbcrlf
		fw.write "#"&vbcrlf
		fw.write ""&vbcrlf
		fw.write "User-agent: *"&vbcrlf
		fw.write "Disallow: /"&trim(request.form("adminpath"))&"/"&vbcrlf
		fw.write "Disallow: /api/"&vbcrlf
		fw.write "Disallow: /bianji/"&vbcrlf
		fw.write "Disallow: /inc/"&vbcrlf
		fw.write "Disallow: /install/"&vbcrlf
		fw.write "Disallow: /template/"&vbcrlf
		fw.write "Disallow: /uploadclass/"&vbcrlf
		fw.write "Disallow: /yidacmsDB/"&vbcrlf
		fw.write "Disallow: /Shop_cart.asp"&vbcrlf
		fw.write "Disallow: /buy_settlement.asp"&vbcrlf
		fw.close
		set fw=nothing
		
		response.redirect "install.asp?steps=step5&adminurl="&request.Form("adminpath")&""
End Sub
Sub step5()

		adminurl = request("adminurl")
		
		response.write "<table width='100%' border='1' cellpadding='10' bordercolor='#f4f4f4' style='border-collapse:collapse; margin-top:60px;'>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td colspan='2' bgcolor='#f4f4f4'><div align='center'>网站安装成功！</div></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>管理员登录地址：</div></td>"&vbcrlf
		response.write "    <td><p>原来的管理员后台登录地址："&webpath&"admin/index.asp&nbsp;&nbsp;<img src='images/delete_16x16.gif' border='0'></p>"&vbcrlf
 		response.write "   <p style='color:#CC0000;'>您新的管理员登录地址："&webpath&adminurl&"/index.asp&nbsp;&nbsp;<img src='images/ok_16x16.gif' border='0'>&nbsp;&nbsp;<a href='../"&adminurl&"/index.asp' target='_blank'>现在登陆?</a> </p></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>后台默认登录账号密码：</div></td>"&vbcrlf
		response.write "    <td><p>默认登录账号：admin</p>"&vbcrlf
		response.write "    <p>默认登录密码：admin888</p>"&vbcrlf
		response.write "    <p>默认口令码：12345 （口令码可以打开 "&webpath&"inc/db.asp 修改） </p></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>手机访问应用：</div></td>"&vbcrlf
		response.write "    <td>http://你的域名/wap&nbsp;&nbsp;<img src='images/ok_16x16.gif' border='0'></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>微信访问应用：</div></td>"&vbcrlf
		if TXW_weixin = "open" then
		response.write "    <td><img src='images/ok_16x16.gif' border='0'></td>"&vbcrlf
		elseif TXW_weixin = "close" then
		response.write "    <td><img src='images/delete_16x16.gif' border='0'></td>"&vbcrlf
		end if
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>提醒：</div></td>"&vbcrlf
		response.write "    <td>"&webpath&"install/install.asp 安装文件自动删除&nbsp;<img src='images/ok_16x16.gif' border='0'></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>提醒：</div></td>"&vbcrlf
		response.write "    <td>为了安全请您将安装程序目录&nbsp;"&webpath&"install/&nbsp;也删掉！</td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>建议：</div></td>"&vbcrlf
		response.write "    <td>建议系统启动静态模式(后台->全局->条件设置)，可以提升网站速度和安全!</td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "</table>"&vbcrlf

		htm = "install.asp"
		set fso = server.createobject("scripting.FileSystemObject")
		arrFile = split(htm,",")
		
		for i = 0 to ubound(arrFile)
		   if fso.FileExists(server.mappath(arrFile(i)))then
		   fso.DeleteFile(server.mappath(arrFile(i)))
		end if
		next

		Set fso=Server.CreateObject( "scripting.filesystemobject") 
		Set folder=fso.getfolder(Server.Mappath( "../admin")) 
		folder.name = adminurl
		rs.update
		rs.close
End Sub
%>
