<!--#include file="conn/conn.asp" -->
<!--#include file="conn/function.asp" -->
<!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>
body{ font-family:"微软雅黑"; line-height:200%; color:#666666; }
.container{width:600px; margin:0 auto;padding:50px; background:#FFFFFF;}
</style>
<script type="text/javascript"> function refresh1(){ var vcode=document.getElementById('vcode'); vcode.src ="conn/code_1.asp?nocache="+new Date().getTime();}</script>
</head>

<%
S_id=request.QueryString("S_id")
template=request.QueryString("template")
%>

<body>
<div <%if WAPstr()=false then%>class="container"<%end if%>>
<%
SL_form="<form id='form1' action='"&C_dir&"formsave.asp?action=input' method='post' target='_parent'>"
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from SL_content,SL_form where C_fid=F_id and C_fid="&S_id&" order by C_order asc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
F_title=rs("F_title")
F_id=rs("F_id")
F_yz=rs("F_yz")

if session("M_id")="" and F_yz=1 then
session("from")=Server.URLEncode("http://"&request.servervariables("HTTP_HOST")&C_dir&"index.asp?type=form&S_id="&S_id)
Response.Write"<script>alert('请先登录会员!');top.location.href='"&C_dir&"member/member_login.asp';</script>"
response.End()
end if
if rs("C_type")="text" then
C_content="<input type='text' value='' name='"&rs("C_id")&"' style='border-top:1px solid #ABADB3;border-left:1px solid #ABADB3;border-right:1px solid #ddd;border-bottom:1px solid #ddd;height:24px;width:300px;padding:0 5px;'>"
end if

if rs("C_type")="area" then
C_content="<textarea name='"&rs("C_id")&"' cols='80' rows='3' ></textarea>"
end if

if rs("C_type")="radio" then
content1=split(rs("C_content"),"|")
For i = 0 To UBound(content1)
C_content=C_content&" <input type='radio' id='"&rs("C_id")&"_"&i&"' name='"&rs("C_id")&"' value='"&content1(i)&"'/> <label for='"&rs("C_id")&"_"&i&"'>"&content1(i)&"</label>"
Next
end if

if rs("C_type")="checkbox" then
content1=split(rs("C_content"),"|")
For i = 0 To UBound(content1)
C_content=C_content&" <input type='checkbox' name='"&rs("C_id")&"' value='"&content1(i)&"'/> "&content1(i)
Next
end if

if rs("C_type")="option" then
content1=split(rs("C_content"),"|")
C_content="<select name='"&rs("C_id")&"'>"
For i = 0 To UBound(content1)
C_content=C_content&"<option  value='"&content1(i)&"'>"&content1(i)&"</option>"
Next
C_content=C_content&"</select>"
end if

if rs("C_type")="date" then
C_content="<input type='text' value='' name='"&rs("C_id")&"' onfocus='HS_setDate(this)' style='border-top:1px solid #ABADB3;border-left:1px solid #ABADB3;border-right:1px solid #ddd;border-bottom:1px solid #ddd;height:24px;width:300px;padding:0 5px;'>"
end if

if rs("C_type")="pic" then
C_content="<input type='text' value='' name='"&rs("C_id")&"' id='"&rs("C_id")&"' style='border-top:1px solid #ABADB3;border-left:1px solid #ABADB3;border-right:1px solid #ddd;border-bottom:1px solid #ddd;height:24px;width:300px;padding:0 5px;'> <input type='button' value='上传文件' onclick=""showUpload('"&rs("C_id")&"','"&rs("C_id")&"','',1,null,'','');"" />"
end if

if rs("C_bz")<>"" then
C_bz=rs("C_bz")&"<br>"
end if

SL_form=SL_form&"<b>"&rs("C_order")&"."&rs("C_title")&"</b><br><font size='-1' color='#666666'>"&C_bz&"</font>"&C_content&"<br><br>"
C_content=""
C_bz=""
rs.movenext
		loop
	end if
set rs=nothing
SL_form=SL_form&"<b>验证码</b><br><input type='text' value='' name='code' style='border-top:1px solid #ABADB3;border-left:1px solid #ABADB3;border-right:1px solid #ddd;border-bottom:1px solid #ddd;height:24px;width:300px;padding:0 5px;'> <img id='vcode' src='conn/code_1.asp' style='margin-bottom:-5px;' onclick='refresh1()'><br><br>"
SL_form=SL_form&"<input type='submit' value='提交' style='width:80px;height:30px; border:hidden; font-family:""微软雅黑""; font-size:15px;'></form>"
SL_form=SL_form&"<script type='text/javascript' src='"&C_dir&"js/date.js'></script><script type='text/javascript' src='"&C_dir&"upload/AienUpload/init.js'></script>"
response.Write SL_form
%>
</div>
</body>
</html>