<!--#include file="../Include/Const.Asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="../Include/System_Language.asp" -->
<!--#include file="../Include/Version.Asp" -->
<!--#include file="CheckAdmin.Asp"-->
<!--#include file="../Generate/SC_Config.Asp" -->
<%
'*********************************************
'软件名称：电家企业网站内容管理系统（DianJiaCMS）
'软件开发：电脑家园工作室
'网   址：http://www.537600.cn
'服务QQ：530051328
'服务邮箱：bbfhq@163.com
'微信公众号：diannaojiayuan
'*********************************************
%>
<%
Call SiteInfo()
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<%=DianJiaCMS_Lang_Copyright(13)%>">
<meta name="author" content="<%=DianJiaCMS_Lang_Copyright(3)%>">
<title><%=DianJiaCMS_Lang_Copyright(1)%> <%=Soft_Version%></title>
<!--#Include file="DianJiaCMS_Css.Asp"-->
</head>
<body>
<!--#Include file="DianJiaCMS_Top.Asp"-->
<!--#Include file="DianJiaCMS_Meun.Asp"-->
<div id="wrap">
    <%
	If InStr(CompanyAdminPurview, "|25,") = 0 Then
		response.Write ("<br /><br /><div style='height:100%; text-align:center' class='main'><font style='color:red; font-size:14px;')>"&DianJiaCMS_Lang_System(26)&"</font></div>")
		response.End
	End If
	Dim Result,action,mtype,mbtype,DataForm,mbname,TemplateName,TemplatePath_A,author,SmallPic,Text,Version
    Result = request.QueryString("Result")
	action = request.QueryString("action")
	mtype=request.QueryString("mtype")
	DataForm = Request("DataForm")
	TemplateName=Request.Form("TemplateName")
    TemplatePath_A=Request.Form("TemplatePath_A")

author=Request.Form("author")
SmallPic=Request.Form("SmallPic")
Text=Request.Form("Text")
Version=Request.Form("Version")

If mtype="P" Then
mbtype="PC"
else
mbtype="Wap"
End If
If DataForm="Index" Then mbname="首页"
If DataForm="Top" Then mbname="头部"
If DataForm="End" Then mbname="尾部"
If DataForm="Search" Then mbname="搜索"
If DataForm="Message" Then mbname="留言"
If DataForm="Contact" Then mbname="联系"
If DataForm="Css" Then mbname="Css"
If DataForm="About" Then mbname="企业信息频道首页"
If DataForm="AboutView" Then mbname="企业信息频道详细"
If DataForm="News" Then mbname="新闻频道首页"
If DataForm="NewsList" Then mbname="新闻频道列表"
If DataForm="NewsView" Then mbname="新闻频道详细"
If DataForm="Product" Then mbname="产品频道首页"
If DataForm="ProductList" Then mbname="产品频道列表"
If DataForm="ProductView" Then mbname="产品频道详细"
If DataForm="Case" Then mbname="案例频道首页"
If DataForm="CaseList" Then mbname="案例频道列表"
If DataForm="CaseView" Then mbname="案例频道详细"
If DataForm="RecruitmentList" Then mbname="招聘频道列表"
If DataForm="RecruitmentView" Then mbname="招聘频道详细"
If DataForm="Download" Then mbname="下载频道首页列表"
If DataForm="DownloadList" Then mbname="下载频道列表"
If DataForm="DownloadView" Then mbname="下载频道详细"
If DataForm="Video" Then mbname="视频频道首页列表"
If DataForm="VideoList" Then mbname="视频频道列表"
If DataForm="VideoView" Then mbname="视频频道详细模板"
If DataForm="VideoView2" Then mbname="视频频道详细模板2"%>
    <div class="main">
        <div class="row">
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i> <%=DianJiaCMS_Lang_Copyright(14)%></li>
                <li><%=DianJiaCMS_Lang_Copyright(2)%></li>                
				<li class="active"><%If Result = "Add" then%>添加<%ElseIf Result = "Edit" then%>修改<%End If%>模板</li>
            </ol>	
        </div>
        <div class="row">
            <div class="col-lg-12 hideInIE8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-edit"></i><span class="break"></span><strong>模板管理</strong></h2> 
                    </div>
                    <div class="panel-body">
                        <a class="ShortCut2" href="DianJiaCMS_Template.Asp">  
                            <i class="fa fa-qrcode"></i>
                            <div class="title">模板方案</div>
                        </a>	
                        <a class="ShortCut1" href="DianJiaCMS_TemplateEdit.Asp?Result=Add">  
                            <i class="fa fa-download"></i>
                            <div class="title">添加方案</div>
                        </a>					
                        <a class="ShortCut2" href="DianJiaCMS_TemplateEdit.Asp?Result=Edit">  
                            <i class="fa fa-gear"></i>
                            <div class="title">模板修改</div>
                        </a>	
                        <a class="ShortCut3" href="DianJiaCMS_TemplateInout.Asp?Result=in">  
                            <i class="fa fa-mail-reply"></i>
                            <div class="title">模板导入</div>
                        </a>
                        <a class="ShortCut4" href="DianJiaCMS_TemplateInout.Asp?Result=out">  
                            <i class="fa fa-mail-forward "></i>
                            <div class="title">模板导出</div>
                        </a>												
                        </div>
					</div>
				</div>
			</div>
<%If Result = "Add" then%>
        <div class="row">
            <div class="col-lg-12 hideInIE8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-edit"></i>添加模板方案（添加模板方案时将从当前默认模板方案中复制有关代码和参数，新建后进行置换或修改即可）</h2> 
                    </div>

            <div class="panel-body">	
			<img src='/mfb/01.jpg'><br>
         <a href="http://www.537600.cn" target="_blank" class="nav-header" ><img src='/mfb/mfb.png' width='500' height='100'></a>
             </div>
                </div>
            </div>
        </div>
<%ElseIf Result = "Edit" then%>	
        <div class="row">
            <div class="col-lg-12 hideInIE8">
                <div class="panel panel-default">
                    <div class="panel-heading">

        <div class="row">
            <div class="col-lg-12 hideInIE8">
                <div class="panel panel-default">
                    <div class="panel-heading">
<img src='/mfb/02.jpg'><br>
         <a href="http://www.537600.cn" target="_blank" class="nav-header" ><img src='/mfb/mfb.png' width='500' height='100'></a>
                    </div>
                </div>
            </div>
        </div>
<%End If
If action="Modify" Then%> 		 
		 <div class="row">
            <div class="col-lg-12 hideInIE8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                       <i class="fa fa-edit"></i><span class="break"></span><%=mbname%>模板（<%=mbtype%>）－－<%=DataForm%>.html 
                    </div>
					<form name="editForm" method="post" action="?action=SaveEdit&mtype=<%=mtype%>&DataForm=<%=DataForm%>" class="form-horizontal">
                    <div class="panel-body">
                        <div class="form-group">                            
                            <div class="col-md-6">
        <%set rs = server.createobject("adodb.recordset")
		sql = "select * from DianJiaCMS_Template where UseFlag=True and SortName='"&mbtype&"'"
		rs.open sql, conn, 1, 1
		if rs.bof and rs.eof then
			response.write ("<center>数据库记录读取错误！</center>")
			response.end
		end if%>
                                <textarea name="Template" id="Template"  rows="20" cols="120"><%=rs(""&mtype&"_"&DataForm&"")%></textarea>
                                <span class="help-block"></span>
								<input name="SaveEdit" type="submit" id="SaveEdit" class="btn btn-danger btn-lg" value="保存">
								</form>
                            </div>
                        </div>	
                    </div>
                </div>
            </div>
        </div>
<%Call CloseRs(rs)
End If%>        
    </div>
	<!--#Include file="DianJiaCMS_End.Asp"-->
</div>
<!--#Include file="DianJiaCMS_Js.Asp"-->
</body>
</html>
