  <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="103"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
  <!--#include file="../rolecheck.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站HTML模版信息设置</title>
<LINK href="../css/style.css" rel=stylesheet type=text/css>
</head>
<body>
<SCRIPT language=javascript>
<!--
function admin_Size(num,objname)
{
	var obj=document.getElementById(objname)
	if (parseInt(obj.rows)+num>=3) {
		obj.rows = parseInt(obj.rows) + num;	
	}
	if (num>0)
	{
		obj.width="90%";
	}
}
//-->
function isok()
{
var str=document.Form.yx_tempname.value;
if(str.replace(/^\s+|\s+$/g,'')=="")
{
alert("请输入模版名称");
document.Form.yx_tempname.focus();
return false;
}

} 
</SCRIPT>
<table border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder"> 
  <tr> 
    <th height=25 colspan="2" class="tableHeaderText">网站HTML模板管理</th> 
  </tr> 
  <tr> 
    <td colspan="2" class="forumRowHighlight"><p><B>注意</B>：<BR> 
        ①在这里，您可以修改模板，可以编辑风格，操作时请按照相关页面提示完整填写表单信息。<BR> 
        ②执行删除时要慎重，任何的删除操作都是不可逆的。<br> 
        </td> 
  </tr> 
  <tr>
	 <td width="30%" class="forumRowHighlight"><strong>操作选项：</strong></td> 
     <td width="70%" class="forumRowHighlight"><a href="yx_index.asp">返回总类模板</a> | [<a href="javascript:location.reload()">刷新页面</a>] </td>
  </tr>
</table>
<%
If request("action")="" Then
%>  

<form name="Form" action="?action=saveadd&LogName=164" method=post onSubmit="return isok();"> 
  <table border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder"> 
    <tr> 
      <th class="tableHeaderText" colspan=3 height=25>模板风格管理</th> 
    </tr> 
	<tr>
	  <td class="forumRowHighlight" height=30 align=left>模版名称：</td>
	  <td class="forumRowHighlight" height=25 align=left><label>
	    <input name="yx_tempname" type="text"  onblur="this.value=this.value.replace(/\s/igm,'')" id="yx_tempname" size="50" maxlength="50">
	  </label></td>
	  <td class="forumRowHighlight">&nbsp;</td>
    </tr>
	<tr> 
      <td class="forumRowHighlight" width=33% height=40 align=left>网站首页模版：<br></td> 
      <td class="forumRowHighlight" width=64% height=25 align=left><textarea name="home_index" id="home_index" cols="100" rows="5"></textarea></td> 
      <td width="3%" class="forumRowHighlight"><a href="javascript:admin_Size(-5,'tradeinfo_sort')"><img src="../images/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'tradeinfo_sort')"><img src="../images/plus.gif" width="20" height="20" border='0' unselectable="on"></a>        </td> 
    </tr> 
	<tr> 
      <td class="forumRowHighlight" width=33% height=40 align=left>供应首页模版：<br></td> 
      <td class="forumRowHighlight" width=64% height=25 align=left><textarea name="tradeinfo_index" id="tradeinfo_index" cols="100" rows="5"></textarea></td> 
      <td class="forumRowHighlight"><a href="javascript:admin_Size(-5,'tradeinfo_type')"><img src="../images/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'tradeinfo_type')"><img src="../images/plus.gif" width="20" height="20" border='0' unselectable="on"></a>        </td> 
    </tr> 
	<tr> 
      <td class="forumRowHighlight" width=33% height=40 align=left>求购首页模版：<br></td> 
      <td class="forumRowHighlight" width=64% height=25 align=left><textarea name="seller_index" id="seller_index" cols="100" rows="5"></textarea></td> 
      <td class="forumRowHighlight"><a href="javascript:admin_Size(-5,'tradeinfo_type2')"><img src="../images/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'tradeinfo_type2')"><img src="../images/plus.gif" width="20" height="20" border='0' unselectable="on"></a>        </td> 
    </tr> 
	<tr> 
      <td class="forumRowHighlight" width=33% height=40 align=left>公司库首页模版：<br></td> 
      <td class="forumRowHighlight" width=64% height=25 align=left><textarea name="corporation_index" id="corporation_index" cols="100" rows="5"></textarea></td> 
      <td class="forumRowHighlight"><a href="javascript:admin_Size(-5,'tradeinfo_detail')"><img src="../images/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'tradeinfo_detail')"><img src="../images/plus.gif" width="20" height="20" border='0' unselectable="on"></a>        </td> 
    </tr>
	<tr>
      <td class="forumRowHighlight" height=40 align=left>产品库首页模版：<br></td>
	  <td class="forumRowHighlight" height=25 align=left><textarea name="productshow_index" cols="100" rows="5"></textarea></td>
	  <td class="forumRowHighlight"><a href="javascript:admin_Size(-5,'tradeinfo_type2')"><img src="../images/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'tradeinfo_type2')"><img src="../images/plus.gif" width="20" height="20" border='0' unselectable="on"></a> </td>
    </tr>
	<tr>
      <td class="forumRowHighlight" height=40 align=left>以商会友首页模版：<br></td>
	  <td class="forumRowHighlight" height=25 align=left><textarea name="info_index" cols="100" rows="5"></textarea></td>
	  <td class="forumRowHighlight"><a href="javascript:admin_Size(-5,'tradeinfo_detail')"><img src="../images/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'tradeinfo_detail')"><img src="../images/plus.gif" width="20" height="20" border='0' unselectable="on"></a> </td>
    </tr>
	 
    <tr> 
      <td height="25" colspan="3" align="center" class="forumRowHighlight"><input type="submit" name="B1" value="增加模版"></td> 
    </tr> 
  </table> 
</form>  
<%
end if
If request("action")="saveadd" Then
home_index=Request.Form("home_index")
tradeinfo_index=Request.Form("tradeinfo_index")
seller_index=Request.Form("seller_index")
corporation_index=Request.Form("corporation_index")
productshow_index=Request.Form("productshow_index")
vipinfo_index=Request.Form("vipinfo_index")
info_index=Request.Form("info_index")
expo_index=Request.Form("expo_index")
yx_tempname=Request.Form("yx_tempname")
feedback_index=Request.Form("feedback_index")

sql="select * from Yixiang_worldec_Temp"
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,3
rs.addnew
rs("help_index")=help_index
rs("tradeinfo_index")=tradeinfo_index
rs("seller_index")=seller_index
rs("corporation_index")=corporation_index
rs("productshow_index")=productshow_index
rs("vipinfo_index")=vipinfo_index
rs("info_index")=info_index
rs("expo_index")=expo_index
rs("feedback_index")=vipinfo_index
rs("yx_tempname")=yx_tempname

rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing

response.write"<br><table cellpadding=2 cellspacing=1 border=0 width=400 class=tableBorder align=center>"
response.write"<TR>"
response.write"<TH class=tableHeaderText colSpan=2 height=25>保存网站模板信息</TH>"
response.write"<TR><tr><td height=85 valign=top class=forumRow><div align=center><br><br> 模板保存成功！</div></td></tr>"
response.write"<tr align=center><td height=30 class=forumRowHighlight><a href='yx_index.asp'>&lt;&lt; 返回上一页</a></td>"
response.write"</tr>"
response.write"</table>"
response.write"<br><br>"
end if
%>
 
</body>
</html>
 