<!--#include file="Access.asp"  -->
<!-- #include file="inc/functions.asp" -->
<!-- #include file="x_to_html/index_to_html.asp" -->
<%
models_id=cint(request.querystring("id"))

act=Request("act")
If act="save" Then 
models_id1=request.form("models_id")
models_type=trim(request.form("models_type"))
models_memo=trim(request.form("models_memo"))
models_content=trim(request.form("models_content"))
models_time=now()

set rs=server.createobject("adodb.recordset")
sql="select * from web_models where id="&models_id1&""
rs.open(sql),cn,1,3
rs("type")=models_type
rs("memo")=models_memo
rs("content")=models_content
rs("time")=models_time
rs.update
rs.close
set rs=nothing
response.Write "<script language='javascript'>alert('修改成功！');location.href='web_models.asp';</script>"


end if %>
	<%
Call header()

%>
<%set rs=server.createobject("adodb.recordset")
sql="select * from web_models where id="&models_id&""
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
%>
  <form id="form1" name="form1" method="post" action="?act=save">
         <script language='javascript'>
function checksignup1() {
if ( document.form1.models_type.value == '' ) {
window.alert('请输入网站模板名称^_^');
document.form1.models_type.focus();
return false;}

if ( document.form1.models_type_en.value == '' ) {
window.alert('请输入模板引用字符^_^');
document.form1.models_type_en.focus();
return false;}

if ( document.form1.models_content.value == '' ) {
window.alert('请输入模板内容^_^');
document.form1.models_content.focus();
return false;}
return true;}
</script>
	<table cellpadding='3' cellspacing='1' border='0' class='tableBorder' align=center>
	<tr>
	  <th class='tableHeaderText' colspan=2 height=25>修改栏目信息</th>
	<tr>
	<td width="15%" height=23 class='forumRow'>栏目名称 (必填) </td>
	<td width="85%" class='forumRow'><input name='models_type' type='text' id='models_type' value="<%=rs("type")%>" size='30'>
	<input name='models_id' type='hidden' id='models_id' value="<%=rs("id")%>" size='30'>&nbsp;
	<INPUT type=submit value='提交' onClick='javascript:return checksignup1()' name=Submit></td>
	</tr>
	<tr>
	<td class='forumRowHighLight' height=23>标签字符</td>
<td class='forumRowHighLight'><input type='text' id='models_type_en' name='models_type_en' value="<%=rs("type_en")%>" size='30' readOnly=true>
  &nbsp;不可修改</td>
	</tr><tr>
	  <td class='forumRow' height=11>栏目关键字</td>
	  <td class='forumRow'><textarea name='models_memo'  cols="100" rows="3" id="models_memo" ><%=rs("memo")%></textarea></td>
	</tr>
	<tr>
	  <td class='forumRow' height=23>栏目内容 (必填)</td>
	  <td class='forumRow'> <textarea name='models_content' cols="100" rows="80" id="models_content"  ><%=rs("content")%></textarea>
 </td>
	</tr>
	<tr><td height="50" colspan=2  class='forumRow'><div align="center">
	  <INPUT type=submit value='提交' onClick='javascript:return checksignup1()' name=Submit>
	  </div></td></tr>
	</table>
</form>
<%end if %>
<%
Call DbconnEnd()
 %>