<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="../include/Lebi_Config.asp"-->
<!--#include file="../include/Lebi_temp_cls.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_print_tpl.asp
'* 最后更新 2013-03-01 by 56770.kingdge
'*****************************************
Dim admin_flag
admin_flag=",9.7,"
Server.ScriptTimeout =999999
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_tpl.inc"
CurrentId = 6
CurrentUrl = "Admin_print_tpl.asp"
LB_Head()
LB_Menu()
htmlstate = checknum(request("htmlstate"),1)
%>
<div class="tabmenu mainwidth">
	  <ul>
		<li <%If htmlstate = 0 Then response.write("class=""current""") End If%>><a href="Admin_print_tpl.asp?htmlstate=0"><span><%=Lang_sys(104)%></span></a></li>
		<li <%If htmlstate = 1 Then response.write("class=""current""") End If%>><a href="Admin_print_tpl.asp?htmlstate=1"><span><%=Lang_sys(105)%></span></a></li>
	  </ul>
</div>
<%
Response.Write("<div class=""tab-mainbody"">")
Response.Write("<div class=""tab-mainbody2"">")
If Eshop_Lebi_name="" Or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
		adminflag()
Else
		If OutSubmit = 1 Then CheckOutSubmit()
		Select Case Request("action")
			    Case "update" :update()
				Case Else
					main()
		End Select
End If
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

Sub update()
        If OnlyRead = 1 Then OnlyReadMessage()
		content = StyleSafereplace(Trim(request("content")))
		Savehtml "../include/Lebi_Data/print.data",content
		For LangT = LangI To TotalLang
			Set Tpl = New Cache_Tpl
			Tpl.Template = Eshop_url
			Tpl.LangTxt = LanguageTxt(LangT)
			Tpl.LangFile = LanguageFile(LangT)
			Tpl.LangName = LanguageName(LangT)
			Tpl.LangPath = LanguagePath(LangT)
			Tpl.DisPlay LanguageSkin(LangT),content,"basket/print.asp"
			Set Tpl = Nothing
		Next 
		ManageLog Lang_Tpl(24)
		Call Up_mes(Lang_sys(48),"·"& Lang_sys(47),0,"?htmlstate="& htmlstate,0,0,2,1)
End sub

Sub main()
%>
		<script language="javascript" type="text/javascript" src="ckeditor/ckeditor.js"></script>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable">
		<form name="form2" method="post" action="?action=update">
		<tr>
		  <td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"><input type="hidden" name="htmlstate" value="<%=htmlstate%>"></td>
		  <td height="30" align="right" class="classhead"><%=QuickMenu("admin_sms_tpl.asp|"& Lang_Menu(161) &"","admin_common.asp|"& Lang_Menu(162) &"")%></td>
		 </tr>
		   <tr>
			 <td class="classtop" colspan="2" height="30"><%=Lang_Menu(196)%></td>
		  </tr>
		<tr class="classrow">
		<td class="classrow" colspan="2">
			<textarea cols="102" rows="24" id="content" name="content" class="html"><%=server.htmlencode(LoadStyle("../include/Lebi_Data/print.data"))%></textarea>
			<%If htmlstate = 0 Then%>
			<script type="text/javascript">
			CKEDITOR.replace('content',{height:400});
			CKEDITOR.config.fullPage = true;
			</script>
			<%Else%>
			 <br /><a href="javascript:u_Size(-10,'content')"><img src="lang/<%=LangFilePath%>/images/tab/bt_close.gif" border='0'></a>
			 <a href="javascript:u_Size(10,'content')"><img src="lang/<%=LangFilePath%>/images/tab/bt_open.gif" border='0'></a>
			<%End If%>
		</td>
		</tr>
		<tr>
		<td class="classfooter" colspan="2" height="30">
		<input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> ">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;">
		</td>
		</tr>
		</form>
		</table>
<%
End Sub
Function LoadStyle(strFile)
		On Error Resume Next
		Dim strTempPath,objFSO,objStm
		strTempPath = Server.MapPath(strFile)
		Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
		Set objStm = Server.CreateObject("ADODB.Stream")
			If objFso.FileExists(strTempPath) Then
				objStm.charset = "UTF-8"
				objStm.open
				objStm.LoadFromFile strTempPath
				LoadStyle = objStm.ReadText
			End If
		Set objStm = Nothing
		Set objFSO = Nothing
		If Err Then
			    Err.Clear
		End If
End Function
%>