<!--#include file="../Include/Head.asp"-->

	<%
	ctype=replace(trim(Request.QueryString("t")) ,"'","")
	If ctype="" then ctype="Simple"		'默认添加简单文本
    %>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="../Main/Right.asp">首页</a></li>
    <li><a href="Custom.asp">自定义信息设置</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>自定义信息设置</span><i>(右侧选择信息类型，<font color="red">字段名必须以Cust_开头！</font>)</i>
    <b><a href="?t=Multi_line" <%If ctype="Multi_line" Then%>class="c_first"<%End If%>>多行文本</a></b>
    <b><a href="?t=Simple" <%If ctype="Simple" Then%>class="c_first"<%End If%>>简单文本</a></b>
    </div>
    
    
    
    <table class="tablelist">
    	<thead>
    	<tr>
        <th>ID</th>
        <th>字段名</th>
        <th>内容一</th>
        <th>内容二</th>
        <th>备注内容</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>    
		<%
		If ctype<>"" Then wherestr="where Ctype='"&ctype&"'" Else wherestr=""
        set rs=Server.CreateObject("ADODB.recordset")
        rs.open "select * from [Jin_Custom] "&wherestr&"",conn,1,2,1
		for i=1 to rs.Recordcount
        %>
        <tr>
        <td><%=rs("SysID")%></td>
        <td><input name="Cname" type="text" class="dfinput Cname" id2="<%=rs("SysID")%>" value="<%=rs("Cname")%>"  style="width:150px;"/></td>
        <td>
		<%Select Case ctype%>   
		<%Case "Simple"%>
        <input name="Ccontent" type="text" class="dfinput Ccontent" id2="<%=rs("SysID")%>" value="<%=rs("Ccontent")%>"  style="width:300px;"/>
		<%Case "Multi_line"%>
        <textarea class="textinput Ccontent" id2="<%=rs("SysID")%>" style="width:300px; height:70px; overflow:hidden;"><%= rs("Ccontent") %></textarea>
        <%End Select %>
        </td>
        <td>
		<%Select Case ctype%>   
		<%Case "Simple"%>
        <input name="Ccontent_en" type="text" class="dfinput Ccontent_en" id2="<%=rs("SysID")%>" value="<%=rs("Ccontent_en")%>"  style="width:300px;"/>
		<%Case "Multi_line"%>
        <textarea class="textinput Ccontent_en" id2="<%=rs("SysID")%>" style="width:300px; height:70px; overflow:hidden;"><%= rs("Ccontent_en") %></textarea>
        <%End Select %>
        </td>
        <td>
        <input name="CRemark" type="text" class="dfinput CRemark" id2="<%=rs("SysID")%>" value="<%=rs("Remark")%>"  style="width:150px;"/>
        </td>
        <td><a href="javascript:;" class="CustomDel" id2="<%=rs("SysID")%>" >删除</a></td>
        </tr> 
		<%
        rs.movenext
        next
		rs.close
		set rs=nothing
        %>        
        <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td><a href="javascript:;" class="CustomAdd" id2="<%=Ctype%>">添加</a></td>
        </tr>
            
        </tbody>
    </table>
   
    <div class="formtext"><br /><b>请勿随意删除此处内容！字段名不可修改！谢谢！</b></div>
    
    </div>



<%Call BackFoot()%>

<script>
$(document).ready(function(e){
autoAdd("CustomAdd");
autoSave("Cname");
autoSave("Ccontent");
autoSave("Ccontent_en");
autoSave("CRemark");
autoDel("CustomDel");
});
</script>
