<!--#include file="../Include/conn.asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="../Include/Form_board .asp"-->
<!--#include file="CheckAdmin.asp"-->
<%
'=====================================
'天天企业网站管理系统  TianTianCMS
'天天网络科技工作室版权所有
'官方客服中心 http://www.ip126.com
'微信公众号 ip126com
'QQ:530051328 mail:bbfhq@163.com
'=====================================
if Instr(session("AdminPurview"),"|47,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限！</font></div>")
  response.end
end If

Dim Action,ID,fso,Ts,Data,Moldboard,i,Temp,M_,M(53),TextFile,Text'当前最大变量
ID=strint(request.QueryString("ID"))

IF Request.Form("Submit")<>"" Then
For i=0 to 53'当前最大变量,从0开始算
IF i=100 Then'过滤一些字符
m(i)=ReplaceBadChar(Request.Form("M"&i))
Else
m(i)=strint(Request.Form("M"&i))'对数字参数格式为数字
End IF
Temp=Temp&m(i)
IF i<>53 Then Temp=Temp&"|"'当前最大变量,从0开始算
Next

Set Rs=server.createobject("adodb.recordset")
Sql="Select ID,M_ArticleCh,M_ArticleEn,M_Productstr From TianTianCMS_Template Where ID="&ID
Rs.Open Sql,conn,1,3
Rs(3)=Temp
Rs.Update

MoldboardCh=Rs(1)
MoldboardEn=Rs(2)
session("Temp")=Temp
CodeCh=M_Recommend(MoldboardCh,session("Temp"))
FileNameCh = Server.MapPath("../Ch/Recommend.asp")
Call WriteToFile(FileNameCh,CodeCh,"utf-8")'用函数方式
CodeEn=M_Recommend(MoldboardEn,session("Temp"))
FileNameEn = Server.MapPath("../En/Recommend.asp")
Call WriteToFile(FileNameEn,CodeEn,"utf-8")'用函数方式

response.write "<script language='javascript'>	alert('推荐产品模板参数设置成功，并已生成新的推荐产品动态页面\n\n如果开启生成静态页面功能，请重新生成推荐产品静态页！');location.href='javascript:history.go(-1)';</script>"
End IF

Set Rs=Conn.Execute("Select M_Name,M_ArticleCh,M_ArticleEn,M_Productstr From TianTianCMS_Template Where ID="&ID)
IF Not Rs.Eof Then Data=Rs.GetRows
Rs.close:Set Rs=Nothing
Call CloseDB
M_=Split(Data(3,0),"|")
%>
<HTML>
<HEAD>
<link rel="stylesheet" href="Images/Admin.css">
<SCRIPT language="javascript" src="admin.js"></SCRIPT>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META name="GENERATOR" content="Microsoft FrontPage 6.0">
<META name="ProgId" content="FrontPage.Editor.Document">
<TITLE>推荐产品模板参数</title>
<style type="text/css">
<!--
body {
	background-color: #D6DFF7;
}
body,td,th {
	color: #135294;
}
-->
</style></HEAD>
<BODY background="images/background.gif">                                                               
  <TABLE width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#799AE1">
    <TR>
      <TD height="20" align="center" bgcolor="#799AE1"><FONT color="#FFFFFF" style="font-size:14px">推 荐 产 品 模 板 参 数 管 理</FONT></TD>
    </TR>
    <TR>
      <TD bgcolor="#FFFFFF">
            <TABLE width="98%" border="0"  align=center cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
  <FORM name="form1" method="post" action="">

<!--<TR bgcolor="#FFFFFF">
      <TD height="26" align="right">最新产品显示设置：</TD>
      <TD colspan="2">
	        分类ID号：<INPUT name="m0" type="text" value="<%=m_(0)%>" size="5">	        
			显示类型：
            <SELECT name="m1" id="m1">
              <OPTION value="0" <%IF strint(m_(1))=0 Then%>selected<%End IF%>>全部</OPTION>
              <OPTION value="1" <%IF strint(m_(1))=1 Then%>selected<%End IF%>>最新</OPTION>			 
			  <OPTION value="2" <%IF strint(m_(1))=2 Then%>selected<%End IF%>>推荐</OPTION>
			  <OPTION value="3" <%IF strint(m_(1))=3 Then%>selected<%End IF%>>热门</OPTION>	
            </SELECT>
            显示条数：<INPUT name="m2" type="text" value="<%=m_(2)%>" size="5">
			显示列数：<INPUT name="m3" type="text" value="<%=m_(3)%>" size="6">
			标题长度：<INPUT name="m4" type="text" value="<%=m_(4)%>" size="5">
			字体大小：<INPUT name="m5" type="text" value="<%=m_(5)%>" size="5">px<br>
			行距：<INPUT name="m6" type="text" value="<%=m_(6)%>" size="5">px
			信笺背景：<INPUT name="m7" type="checkbox" value="1" <%IF strint(m_(7))=1 Then%>checked<%End IF%>>
			推荐标志：<INPUT name="m8" type="checkbox" value="1" <%IF strint(m_(8))=1 Then%>checked<%End IF%>>            
			固顶标志：<INPUT name="m9" type="checkbox" value="1" <%IF strint(m_(9))=1 Then%>checked<%End IF%>>
			图片标志：<INPUT name="m10" type="checkbox" value="1" <%IF strint(m_(10))=1 Then%>checked<%End IF%>>
           	前缀图标：<INPUT name="m11" type="checkbox" value="1" <%IF strint(m_(11))=1 Then%>checked<%End IF%>>
			日期样式(0-14)：<INPUT name="m12" type="text" value="<%=m_(12)%>" size="5">
			标题颜色：<INPUT name="m13" type="checkbox" value="1" <%IF strint(m_(13))=1 Then%>checked<%End IF%>>			
			点击数量：<INPUT name="m14" type="checkbox" value="1" <%IF strint(m_(14))=1 Then%>checked<%End IF%>>
			</TD>
    </TR>-->
    <TR bgcolor="#FFFFFF">
      <TD height="26" align="right">本站推荐显示设置：</TD>
      <TD colspan="2">
	        分类ID号：<INPUT name="m15" type="text" value="<%=m_(15)%>" size="5">	        
			显示类型：
            <SELECT name="m16" id="m16">              	 
			  <OPTION value="2" <%IF strint(m_(16))=2 Then%>selected<%End IF%>>推荐</OPTION>			  
            </SELECT>
            显示条数：<INPUT name="m17" type="text" value="<%=m_(17)%>" size="5">
			显示列数：<INPUT name="m18" type="text" value="<%=m_(18)%>" size="6">
			标题长度：<INPUT name="m19" type="text" value="<%=m_(19)%>" size="5">
			字体大小：<INPUT name="m20" type="text" value="<%=m_(20)%>" size="5">px<br>
			行&nbsp;&nbsp;&nbsp;&nbsp;距：<INPUT name="m21" type="text" value="<%=m_(21)%>" size="5">px
			信笺背景：<INPUT name="m22" type="checkbox" value="1" <%IF strint(m_(22))=1 Then%>checked<%End IF%>>
			推荐标志：<INPUT name="m23" type="checkbox" value="1" <%IF strint(m_(23))=1 Then%>checked<%End IF%>>            
			固顶标志：<INPUT name="m24" type="checkbox" value="1" <%IF strint(m_(24))=1 Then%>checked<%End IF%>>
			图片标志：<INPUT name="m25" type="checkbox" value="1" <%IF strint(m_(25))=1 Then%>checked<%End IF%>>
           	前缀图标：<INPUT name="m26" type="checkbox" value="1" <%IF strint(m_(26))=1 Then%>checked<%End IF%>>
			日期样式(0-14)：<INPUT name="m27" type="text" value="<%=m_(27)%>" size="5">
			标题颜色：<INPUT name="m28" type="checkbox" value="1" <%IF strint(m_(28))=1 Then%>checked<%End IF%>>			
			点击数量：<INPUT name="m29" type="checkbox" value="1" <%IF strint(m_(29))=1 Then%>checked<%End IF%>>
			</TD>
    </TR>
    <TR bgcolor="#FFFFFF">
      <TD height="26" align="right" bgcolor="#BDDEEF">点击热门显示设置：</TD>
      <TD colspan="2" bgcolor="#BDDEEF">
	        分类ID号：<INPUT name="m30" type="text" value="<%=m_(30)%>" size="5">	        
			显示类型：
            <SELECT name="m31" id="m31">
              <OPTION value="0" <%IF strint(m_(31))=0 Then%>selected<%End IF%>>全部</OPTION>
              <OPTION value="1" <%IF strint(m_(31))=1 Then%>selected<%End IF%>>最新</OPTION>			 
			  <OPTION value="2" <%IF strint(m_(31))=2 Then%>selected<%End IF%>>推荐</OPTION>
			  <OPTION value="3" <%IF strint(m_(31))=3 Then%>selected<%End IF%>>热门</OPTION>
            </SELECT>
            显示条数：<INPUT name="m32" type="text" value="<%=m_(32)%>" size="5">
			显示列数：<INPUT name="m33" type="text" value="<%=m_(33)%>" size="6">
			标题长度：<INPUT name="m34" type="text" value="<%=m_(34)%>" size="5">
			字体大小：<INPUT name="m35" type="text" value="<%=m_(35)%>" size="5">px<br>
			行&nbsp;&nbsp;&nbsp;&nbsp;距：<INPUT name="m36" type="text" value="<%=m_(36)%>" size="5">px
			信笺背景：<INPUT name="m37" type="checkbox" value="1" <%IF strint(m_(37))=1 Then%>checked<%End IF%>>
			推荐标志：<INPUT name="m38" type="checkbox" value="1" <%IF strint(m_(38))=1 Then%>checked<%End IF%>>            
			固顶标志：<INPUT name="m39" type="checkbox" value="1" <%IF strint(m_(39))=1 Then%>checked<%End IF%>>
			图片标志：<INPUT name="m40" type="checkbox" value="1" <%IF strint(m_(40))=1 Then%>checked<%End IF%>>
           	前缀图标：<INPUT name="m41" type="checkbox" value="1" <%IF strint(m_(41))=1 Then%>checked<%End IF%>>
			日期样式(0-14)：<INPUT name="m42" type="text" value="<%=m_(42)%>" size="5">
			标题颜色：<INPUT name="m43" type="checkbox" value="1" <%IF strint(m_(43))=1 Then%>checked<%End IF%>>			
			点击数量：<INPUT name="m44" type="checkbox" value="1" <%IF strint(m_(44))=1 Then%>checked<%End IF%>>
			</TD>
    </TR>

    <TR bgcolor="#FFFFFF">
      <TD height="26" align="right">产品图文显示设置：</TD>
	  <TD colspan="2">
			分类父类数字路径(0为全部)：<INPUT name="m45" type="text" id="m45" value="<%=m_(45)%>" size="5">
			显示栏目名称：<INPUT name="m46" type="checkbox" id="m46" value="1" <%IF strint(m_(46))=1 Then%>checked<%End IF%>>
			显示推荐标志：<INPUT name="m47" type="checkbox" id="m47" value="1" <%IF strint(m_(47))=1 Then%>checked<%End IF%>>
			显示固顶标志：<INPUT name="m48" type="checkbox" id="m48" value="1" <%IF strint(m_(48))=1 Then%>checked<%End IF%>>
			显示标题颜色：<INPUT name="m49" type="checkbox" id="m49" value="1" <%IF strint(m_(49))=1 Then%>checked<%End IF%>><br>
			标题长度：<INPUT name="m50" type="text" id="m50" value="<%=m_(50)%>" size="5">			
			图片宽度：<INPUT name="m51" type="text" id="m51" value="<%=m_(51)%>" size="5">
			图片高度：<INPUT name="m52" type="text" id="m52" value="<%=m_(52)%>" size="5">
			每行显示个数：<INPUT name="m53" type="text" id="m53" value="<%=m_(53)%>" size="5"><br>
			<FONT color="#ff0000">注：图片宽度、图片高度、每行显示个数与系统管理－网站信息设置－产品模块单页调用条数要互相配合才能确保版面美观。</font>
			</TD>
    </TR>
    <TR bgcolor="#FFFFFF"> 
      <TD height="30" colspan="3" align=center>	  
      <input name="Submit" type="submit" id="Submit" value="确定">
	  <input name="Submit1" type="button" id="Submit1" value="返回" onClick="location='M_Template_Management.asp?id=<%=ID%>'"/></TD>
      </TR>
  </FORM>
</TABLE>
      <BR></TD>
    </TR>
</TABLE>
</BODY>                    
                    
</HTML>                    
