<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/function.asp" -->
<!-- #include file="inc/formfield.asp" -->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<HTML>
<HEAD>
<TITLE>添加新闻</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<%
'''''''''''''''''''''''''''''''''''''''''''''''
'if(checkIfHasPrevilege(Session("Name"),"p02") or checkIfHasPrevilege(Session("Name"),"pext01")) then
'else
	
'end if
'''''''''''''''''''''''''''''''''''''''''''''''
%>
<script type="text/javascript" src="/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.10/js/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript">
function OpenWindowAndSetValue(Url,Width,Height,WindowObj,SetObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:no;help:no;scroll:no;');
	if (ReturnStr!='') SetObj.value=ReturnStr;
	return ReturnStr;
}
</script>
</HEAD>
<BODY>
<%
dim moduleid,modulename,tablename,id
id=Clng(request.QueryString("id"))
moduleid=Cint(request.QueryString("moduleid"))
set rs=server.createobject("adodb.recordset")
rs.open "select Title,TableName from t_module where id="&moduleid,conn,3,1
if not rs.eof then
	modulename=rs(0)
	tablename=rs(1)
end if
rs.close
set rs=nothing
dim fieldsarr
set rs=server.createobject("adodb.recordset")
rs.open "select FName,FTitle,FormType,FormTitle,FStyle,FormDefault,IsBindTable,BindPara from t_fields where moduleid="&moduleid&" order by FSort",conn,3,1
if not rs.eof then
	fieldsarr=rs.getrows()
end if
rs.close
set rs=nothing
%>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><iframe src="right_top.htm" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" height="30" width="100%"></iframe></td>
  </tr>
</table>
<h2><%=modulename%>-修改内容</h2>
<FORM method="POST" name="form1" action="content_modok.asp?moduleid=<%=moduleid%>&id=<%=id%>" style="margin:0 0 0 0; " onSubmit="return check(this)">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from "&TableName&" where id="&id,conn,3,1
if not rs.eof then
%>
<TABLE width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
<TR bgcolor="#F5F5F5">
  <TD width="17%" bgcolor="#E8F3FF"><div align="right">所属栏目：</div></TD>
  <TD width="83%">
  <select name="classid" onClick="addParentOption();">
  	<option value="<%=rs("ClassId")%>"><%=conn.execute("select title from catalogs where id="&rs("ClassId"))(0)%></option>
  </select></TD></TR>
  <TR bgcolor="#F5F5F5">
  <TD bgcolor="#E8F3FF"><div align="right">标 题：</div></TD>
  <TD bgcolor="#E8F3FF"><input name="title" type="text" size="40" value="<%=rs("Title")%>">
  (<span class="style2">*</span>)</TD>
</TR>
<%
	if isarray(fieldsarr) then
		for j=0 to ubound(fieldsarr,2)
	%>
	<TR bgcolor="#F5F5F5">
		<TD align="right" bgcolor="#E8F3FF"><%=fieldsarr(3,j)%>：</TD>
		<TD align="left"><%=FormatFormFieldWithValue(fieldsarr(0,j),fieldsarr(2,j),fieldsarr(4,j),fieldsarr(5,j),fieldsarr(6,j),fieldsarr(7,j),rs(fieldsarr(0,j)))%></TD>
	</TR>
<%
		next
	end if
end if
%>
<TR bgcolor="#F5F5F5">
  <TD colspan=2 align=right>
    <div align="center">
      <INPUT type=submit name=b1 value="提 交==>"> 
      <INPUT type=reset name=b2 value="重 填"> 	
      </div></TD>
</TR>
</TABLE>
</FORM>
<script language="javascript">
function addParentOption()
{
	var arr = showModalDialog("tree_container.asp", "", "dialogWidth:410px; dialogHeight:420px; status:0");
  	if (arr != null){ 
		for (m=document.form1.classid.options.length-1;m>=0;m--)
		{
	  		document.form1.classid.options[m]=null;
	 	}
   		document.form1.classid.options[0]=new Option(arr[1],arr[0]);
  	}
	
}
</script>
</BODY>
</HTML>
<%
call connclose()
%>