<!--#include file="../conn/conn2.asp" -->
<!--#include file="top.asp" -->
<!DOCTYPE html> 
<html> 
<head> 
	<meta charset="gb2312" />
    <meta name="viewport" content="user-scalable=no,width=device-width" />
    <meta name="format-detection" content="telephone=no"/>
<title><%=F_title%>-<%=title%></title>
<meta name="keywords" content="<%=keywords%>" />
<meta name="description" content="<%=content%>" />
    <link rel="stylesheet" href="style/mobile.css" />   
    <script src="jquery/jquery-1.10.1.min.js"></script>    
    <script src="jquery/myjs.js"></script>    
	<script type="text/javascript" src="js/date.js"></script>
<script type="text/javascript" src="../upload/AienUpload/init.js"></script>
</head> 
<%
'===================SQL防注入==================
function Replace_Text(fString)
	if isnull(fString) then
		Replace_Text=""
		exit function
	else
		fString=trim(fString)
		fString=replace(fString,"'","‘")
		fString=replace(fString,";","；")
		fString=replace(fString,"--","—")
		fString=replace(fString,"<","《")
		fString=replace(fString,">","》")
		fString=server.htmlencode(fString)
		Replace_Text=fString
	end if	
end function

Function gen_key(digits)
'定义并初始化数组
    dim char_array(80)
'初始化数字
    For i = 0 To 9
        char_array(i) = CStr(i)
    Next
'初始化大写字母
    For i = 10 To 35
        char_array(i) = Chr(i + 55)
    Next
'初始化小写字母
    For i = 36 To 61
        char_array(i) = Chr(i + 61)
    Next
Randomize   '初始化随机数生成器。
do while len(output) < digits
        num = char_array(Int((62 - 0 + 1) * Rnd + 0))
        output = output & num
    loop
'设置返回值
    gen_key    =    output
End Function

F_id=request.QueryString("id")
action=request.QueryString("action")

if action="input" then
R_time=now()
R_rid=gen_key(15)
For Each x In Request.Form 
if x>0 then
conn.execute("Insert into F_response(R_cid,R_content,R_time,R_rid,R_member) values("&x&",'"&Replace_Text(Request.Form(x))&"','"&R_time&"','"&R_rid&"','"&session("M_login")&"')")
end if
Next 
response.Write("<script>alert('提交成功!');window.location='index.asp';</script>")
response.end()
end if

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from F_form where F_id="&F_id
rs.open sql,conn,1,1
F_title=rs("F_title")
F_bz=rs("F_bz")
F_yz=rs("F_yz")
rs.close
set rs=nothing

if F_yz=1 and session("M_login")="" then
Response.Write"<script>alert('请先登录会员!');window.location='login.asp';</script>"
end if
%>
<body onResize="loadtop();loadmain();loadfoot();">

<script src="js/0.js"></script>
<script src="js/1.js"></script>

<div id="dvtopbg"><img src="images/bg_header.png" ></div>
<div id="dvtop" >
<p id="topback"><a href="javascript:history.go(-1);"><img src="images/ico_back.png"></a></p>
<p id="tophome"><a href="index.asp"><img src="images/ico_home.png"></a></p>
<p id="toplogo"><img onLoad="loadlogo(this);" id="tiglog" style="display:none;" src="../media/<%=C_mlogo%>" /></p>
</div>

<script>loadtop();</script>

<div id="dvmain">
<%
if GetBody(D_domain)="" then
%>
<embed src="yz.swf?domain=<%=D_domain%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="0" height="0"></embed>
<script> 
function sendToJavaScript(value){
if(value=="1"){
}else{
document.getElementById("old").innerHTML="<div align='center' style='margin:10px 10px 10px 10px;padding:5px 5px 5px 5px;border:1px solid #ff0000'><font color='red' size='+1'>您使用的为免费版！请尽快升级到商业授权版保证正常使用！</font></div>"
}
}
</script>
<div id="old"></div>
<%
else 
if split(GetBody(D_domain),"|")(1)="1" then
%>
<%else%>
<div align='center' style='margin:10px 10px 10px 10px;padding:5px 5px 5px 5px;border:1px solid #ff0000'><font color='red' size='+1'>您使用的为免费版！请尽快升级到商业授权版保证正常使用！</font></div>
<%
end if
end if
%>
<div id="dvphototit"><%=F_title%></div>

<div id="dvminfo"><form id="form1" action="form.asp?action=input" method="post">
<%
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from F_content where C_fid="&F_id&" order by C_order"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof

if rs("C_type")="text" then
C_content="<input type='text' value='' name='"&rs("C_id")&"'>"
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
content=split(rs("C_content"),"|")
For i = 0 To UBound(content)
C_content=C_content&"<input type='radio' name='"&rs("C_id")&"' value='"&content(i)&"'/>"&content(i)
Next
end if

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

if rs("C_type")="option" then
content=split(rs("C_content"),"|")
C_content="<select name='"&rs("C_id")&"'>"
For i = 0 To UBound(content)
C_content=C_content&"<option  value='"&content(i)&"'>"&content(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)'>"
end if

if rs("C_type")="pic" then
C_content="<input type='text' value='' name='"&rs("C_id")&"' id='"&rs("C_id")&"'> <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
response.Write "<b>"&rs("C_order")&"."&rs("C_title")&"</b><br><font size='-1' color='#666666'>"&C_bz&"</font>"&C_content&"<br><br>"
C_content=""
rs.movenext
		loop
	end if
set rs=nothing
%>
<hr>
<input type="submit" value="提交" style="width:80px;height:30px; border:hidden; font-family:'微软雅黑'; font-size:15px;">
</form></div>
	 
	 </div>
	 
	 <img onClick="this.style.width='0px';this.style.display='none';" id="imgpromptf88a0" style="z-index:999; position:absolute; display:none;"><script src="js/2.js"></script>
<script>loadmain();</script>
<div id="dvfoot"><ul><li><a id="aphone" href="tel:<%=C_mobile%>"><img src="images/butphone.jpg" /></a><a id="aemail" href="mailto:<%=C_email%>"><img src="images/butemail.jpg" /></a><a id="amap" href="map.asp"><img src="images/butmap.jpg" /></a><a id="ashare" onClick="shareopen();"><img src="images/butshare.jpg" /></a><a id="aleave" style="border:0px;" href="guestbook.asp"><img src="images/butleave.jpg" /></a></li></ul></div>
<script>loadfoot();</script>
</body>
</html>
