<!--#include file="../conn/conn2.asp" -->
<!--#include file="../conn/function.asp" -->
<!--#include file="member_check.asp" -->
<%
Function MoveR(Rstr,f) 
Dim i,SpStr 
SpStr = Split(Rstr,f) 
For i = 0 To Ubound(Spstr) 
If I = 0 then 
MoveR = MoveR & SpStr(i) & f
Else 
If instr(MoveR,SpStr(i))=0 and i=Ubound(Spstr) Then 
MoveR = MoveR & SpStr(i) 
Elseif instr(MoveR,SpStr(i))=0 Then 
MoveR = MoveR & SpStr(i) & f
End If 
End If 
Next 
End Function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>表单管理</title>
<style type="text/css">

			html {
				overflow:auto;
			}
			body {
			margin:0px;
				font-size:12px;
				line-height:180%;
				font-family:"微软雅黑";
				background:url(images/login_bgx.gif);
				
			}
			a img {border:none;}
			a{ font-size:12px; color:#000000; text-decoration:none;}
			a:hover {color:#0066ff;text-decoration: underline}
.container{width:1100px; height:600px; position:absolute; top:50%; left:50%; margin-left:-550px; margin-top:-300px; background:#FFFFFF;box-shadow:0px 0px 20px #999999;}
table{ border-collapse:collapse;}
table tr td{ border-bottom:1px solid #dedede; line-height:150%; padding:10px;}
</style>
</head>
<body>
<div class="container">
<!--#include file="left.asp" -->
<div style="position: relative; padding:20px 20px 20px 220px;">
<h2>表单管理</h2>
<hr>

<%
sql2="select R_member,F_id from SL_content,SL_form,SL_response where R_cid=C_id and C_fid=F_id and R_member="&session("M_id")&" order by F_id"
		set rs2=Server.CreateObject("ADODB.RecordSet")
		rs2.open sql2,conn,1,1
		if not rs2.eof then
		Do while Not rs2.eof
		F_id=rs2("F_id")
line=line& "<table width='100%' bgcolor='#eeeeee' style='font-size:12px;'><tr bgcolor='#f7f7f7'><td>会员</td>"
sql="select * from sl_content where C_Fid="&F_id&" order by C_order"
		set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		Do while Not rs.eof
		line=line& "<td>"&rs("C_title")&"</td>"
		rs.movenext
		loop
	end if
line=line& "<td>提交时间</td></tr>"
sql="select R_time,R_rid,R_member from SL_response,SL_content where R_Cid=C_id and C_fid="&F_id&" and R_member="&session("M_id")&" order by R_time"
set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		Do while Not rs.eof
		R_member="未登录"
		if rs("R_member")<>"" then
		R_member=session("M_login")
		end if
line=line& "<tr onmouseout='this.style.backgroundColor=""""' onmouseover='this.style.backgroundColor=""#F7F7F7""' bgcolor='#ffffff'><td>"&R_member&"</td>"
sql1="select * from SL_response,SL_content where R_Cid=C_id and C_fid="&F_id&" and R_rid like '"&rs("R_rid")&"' order by C_order"
set rs1=Server.CreateObject("ADODB.RecordSet")
		rs1.open sql1,conn,1,1
		if not rs1.eof then
		Do while Not rs1.eof
		if right(rs1("R_content"),3)="jpg" or  right(rs1("R_content"),3)="png" or right(rs1("R_content"),3)="gif" then
		R_content="<a href='../media/"&rs1("R_content")&"' target='_blank'><img src='../media/"&rs1("R_content")&"' height='30'> 点击查看大图</a>"
		else
		if right(rs1("R_content"),3)="doc" or right(rs1("R_content"),3)="pdf" or right(rs1("R_content"),3)="ppf" or right(rs1("R_content"),3)="rar" then
		R_content="<a href='../media/"&rs1("R_content")&"' target='_blank'><img src='img/file.gif'> 点击查看附件</a>"
		else
		R_content=rs1("R_content")
		end if
		end if
		line=line&  "<td>"&R_content&"</td>"
		rs1.movenext
		loop
	end if
line=line&  "<td>"&rs("R_time")&"</td></tr>&"
rs.movenext
		loop
end if

line=line& "</table><hr>|"

rs2.movenext
		loop
end if
line=MoveR(line,"&") 
line=replace(line,"&","")
line=MoveR(line,"|") 
line=replace(line,"|","")
response.Write line
%>

</div>
</div>
</body>
</html>