displayformdate.asp

来自「OFFICE办公自动化」· ASP 代码 · 共 151 行

ASP
151
字号
<%
sub displayformdate(date_id)
 dim rs
 dim sql

 set rs=server.createobject("adodb.recordset")
 sql="select * from workflow_date_id where date_id=" & date_id
 rs.open sql,oConn,1
 if not rs.eof and not rs.bof then
  form_name=rs("form_name")
  name=rs("name")
  inputdate=rs("inputdate")
 end if
 rs.close
 set rs=nothing
 set rs=server.createobject("adodb.recordset")
 sql="select * from workflow_form_construction where form_name='" & cString(form_name) & "' order by form_arrno"
 rs.open sql,oConn,1
%>
<table width="500" border=0 cellpadding="2" cellspacing="1" class="tab">
  <%
 while not rs.eof and not rs.bof
%>
  <tr>
<td width="100" height="30" class=tdtop nowrap><%=rs("form_title")%> </td>
<td class=td2 width=400 align="left">
<%
  form_type=rs("form_type")
  form_arrno=rs("form_arrno")
  if form_type="ft_text" then
   set rs1=server.createobject("adodb.recordset")
   sql="select * from workflow_ft_text_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   rs1.open sql,oConn,1
   if not rs1.eof and not rs1.bof then
%>
<%=rs1("content")%>
<%
   end if
   rs1.close
   set rs1=nothing
  end if
  if form_type="ft_textarea" then
   set rs1=server.createobject("adodb.recordset")
   sql="select * from workflow_ft_textarea_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   rs1.open sql,oConn,1
   if not rs1.eof and not rs1.bof then
%>
<%=HtmlOut(rs1("content"))%>
<%
   end if
   rs1.close
   set rs1=nothing
  end if
  if form_type="ft_member" then
   set rs1=server.createobject("adodb.recordset")
   sql="select * from workflow_ft_member_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   rs1.open sql,oConn,1
   if not rs1.eof and not rs1.bof then
   		userlist=split(rs1("content"),",")
		for i=0 to  UBound(userlist)-1
			response.write GetUserName2(userlist(i))&" "
		next
   end if
   rs1.close
   set rs1=nothing
  end if
  if form_type="ft_group" then
   set rs1=server.createobject("adodb.recordset")
   sql="select * from workflow_ft_group_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   rs1.open sql,oConn,1,1
   if not rs1.eof and not rs1.bof then
%>
<%=rs1("content")%>
<%
   end if
   rs1.close
   set rs1=nothing
  end if
  if form_type="ft_date" then
   set rs1=server.createobject("adodb.recordset")
   sql="select * from workflow_ft_date_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   rs1.open sql,oConn,1
   if not rs1.eof and not rs1.bof then
%>
<%=rs1("content")%>
<%
   end if
   rs1.close
   set rs1=nothing
  end if
  
  if form_type="ft_number" then
   set rs1=server.createobject("adodb.recordset")
   sql="select * from workflow_ft_number_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   rs1.open sql,oConn,1
   if not rs1.eof and not rs1.bof then
	 Response.Write rs1("content")
	 end if
   rs1.close
   set rs1=nothing
  end if
  
  if form_type="ft_dictionary" then
   set rs1=server.createobject("adodb.recordset")
   'sql="select * from workflow_ft_dictionary_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   'Response.Write sql
   sql="SELECT workflow_ft_dictionary_content.*,tbioa_dictionary.word AS content FROM workflow_ft_dictionary_content INNER JOIN tbioa_dictionary ON workflow_ft_dictionary_content.content = tbioa_dictionary.id WHERE (workflow_ft_dictionary_content.date_id = " & date_id & ") AND (workflow_ft_dictionary_content.form_arrno = " & form_arrno &")"
   rs1.open sql,oConn,1
   if not rs1.eof and not rs1.bof then
	 Response.Write rs1("content")
   end if
   rs1.close
   set rs1=nothing
  end if
  
  
  
  if form_type="ft_file" then
   set rs1=server.createobject("adodb.recordset")
   sql="select id,filename from workflow_ft_file_content where date_id=" & date_id & " and form_arrno=" & form_arrno
   rs1.open sql,oConn,1
   if not rs1.eof and not rs1.bof then
%>
<a href="show.asp?filename=<%=rs1("filename")%>" target="_blank"><font color=red>查看</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="download.asp?filename=<%=rs1("filename")%>" target="_blank"><font color=red>保存</font></a>
<%
   else
    response.write "&nbsp;"
   end if
   rs1.close
   set rs1=nothing
  end if
%>  </td>
</tr>
<%
  rs.movenext
 wend
 rs.close
 set rs=nothing
%>
<tr>
<td class=tdtop height="30" nowrap>表单提交人:</td>
<td class=td2 height="30" nowrap><%=name%> </td>
</tr>
<tr>
<td class=tdtop>提交时间:</td>
<td class=td2><%=inputdate%> </td>
</tr>
</table>
<%
end sub
%> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?