<!--#include file="conn.asp"-->
<!--#include file="../../inc/function.asp"-->
<!--#include file="_html_fun.asp"-->
<!--#include file="../../../include/Lebi_Db_cls.asp"-->
<!--#include file="../../../include/lebi_cache_cls.asp"-->
<!--#include file="../../../include/lebi_cache.asp"-->
<!--#include file="_html_lang.asp"-->
<!--#include file="../../../include/lebi_main.asp"-->
<%
'**************************************
'* 最后更新 2012-05-19 by 56770.kingdge
'* copyright www.56770.com
'**************************************
server.scripttimeout =99999
html_page="1"
eshop_url = replace(eshop_url,"/tohtml/","/")
mes_type = request("mes_type")
if not isnumeric(mes_type) or isempty(mes_type) then mes_type = 0
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<style type="text/css">
body{margin-top:0px;margin-left:0px;position:absolute;background-color:#ffffff;font-size:11px;}
td{font-size:11px;}
</style>
<body>
<!--#include file="../../../include/lebi_function.asp"-->
<%
admin_flag=",12.6,"
if request.cookies(cookiesname)("admin_name")="" or instr(","&request.cookies(cookiesname)("flag")&",",admin_flag)=0 then
		response.write("没有操作此功能的权限！")
		response.end
end if
if show_html <> 1 And request("type") <> "1" then
		response.write("请先选择静态模式(HTML)！")
		response.end
end if
s_text=loadfile("../../text/lebi_default"& LangTxt &".text")
sitename = trim(split(s_text,"$$$")(0))
strwebtitle = trim(split(s_text,"$$$")(1))
description = trim(split(s_text,"$$$")(2))
keywords = trim(split(s_text,"$$$")(3))

select case request("do")
	   case "delete" delete()
	   case else
	        save()
end select

sub save()
        if mes_type = 1 then
                write_lebi_eshop("<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"" class=""classtd"">")
                write_lebi_eshop("<tr>")
                write_lebi_eshop("<td width=""300"" align=""left"">")
                write_lebi_eshop("<table width=""300"" border=""0"" cellspacing=""1"" cellpadding=""1"" height=""8"" bgcolor=""#b2b2a6""><tr><td bgcolor=ffffff height=""8""><img src=""../../images/bar.gif"" width=0 height=8 id=bar_p_img name=bar_p_img align=absmiddle></td></tr></table>")
                write_lebi_eshop("</td><td><span id=bar_p_txt2 name=bar_p_txt2 style=""font-size:9pt;color:red;""></span><span id=bar_p_txt1 name=bar_p_txt1 style=""font-size:9pt"">0</span><span style=""font-size:9pt"">%</span></td></tr>")
                write_lebi_eshop("</table>")
		end if
		showpath = ""
		skin_body = LoadFile("../../../skins/"& template &"/template/default.htm")
		Set fso=Nothing
		HtmlName = "../../../"& LangPath &"default."& Sys_Ext
		HtmlBody = html_splits(skin_body)
		savehtml HtmlName,HtmlBody
		if mes_type = 0 then
	            write_lebi_eshop("<script>alert('已完成！');</script>")
		else
				write_lebi_eshop("<script>bar_p_img.width=300;bar_p_txt2.innerHTML='';bar_p_txt1.innerHTML=""100"";</script>")
		end if
end sub

sub delete()
        if mes_type = 1 then
                write_lebi_eshop("<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"" class=""classtd"">")
                write_lebi_eshop("<tr>")
                write_lebi_eshop("<td width=""300"" align=""left"">")
                write_lebi_eshop("<table width=""300"" border=""0"" cellspacing=""1"" cellpadding=""1"" height=""8"" bgcolor=""#b2b2a6""><tr><td bgcolor=ffffff height=""8""><img src=""../../images/bar.gif"" width=0 height=8 id=bar_p_img name=bar_p_img align=absmiddle></td></tr></table>")
                write_lebi_eshop("</td><td><span id=bar_p_txt2 name=bar_p_txt2 style=""font-size:9pt;color:red;""></span><span id=bar_p_txt1 name=bar_p_txt1 style=""font-size:9pt"">0</span><span style=""font-size:9pt"">%</span></td></tr>")
                write_lebi_eshop("</table>")
		end if
		path = server.mappath("../../../"& LangPath &"default."& Sys_Ext)
        set objfso = server.createobject("scripting.filesystemobject")
        if objfso.fileexists(path) then
                objfso.deletefile(path)
		else
		        if mes_type = 0 then
	                    write_lebi_eshop("<script>alert('当前无静态首页！');javascript:history.back()</script>")
		        else
		        		write_lebi_eshop("<script>bar_p_img.width=300;bar_p_txt2.innerHTML='';bar_p_txt1.innerHTML=""100"";</script>")
		        end if
		end if
		if error then
		        if mes_type = 0 then
	                    write_lebi_eshop("<script>alert('空间不支持fso组件！');javascript:history.back()</script>")
		        else
		        		write_lebi_eshop("<script>bar_p_img.width=300;bar_p_txt2.innerHTML='';bar_p_txt1.innerHTML=""100"";</script>")
		        end if
		else
		        if mes_type = 0 then
	                    write_lebi_eshop("<script>alert('静态首页已删除！');javascript:history.back()</script>")
		        else
		        		write_lebi_eshop("<script>bar_p_img.width=300;bar_p_txt2.innerHTML='';bar_p_txt1.innerHTML=""100"";</script>")
		        end if
		end if
		set objfso = nothing
end sub
%>
</body>
</html>