📄 questionaddimg.asp
字号:
<!--#include file="../Include/Config.asp"-->
<link rel="stylesheet" href="../Css/Admin.css" type="text/css" />
<%
Survey_id=request.QueryString("Survey_id")
Question_id=request.QueryString("Question_id")
sql="select * from [Survey] where Survey_id="&Survey_id
rs.open sql,conn,1,1
if rs("Survey_isAuditing")=True then
call ShowAlert("对不起,以审核的问卷不可以再编辑","1" )
end if
rs.close
sql="select * from [Question] where Question_id="&Question_id
rs.open sql,conn,1,1
if rs.eof then
Call ShowAlert("参数错误","")
else
Qtype=rs("Question_type")
Question_content=rs("Question_content")
Question_answer=rs("Question_answer")
Question_img=rs("Question_img")
rs.close
end if
if Question_answer<>"" then
Question_answer=split(Question_answer,"&")
else
if Qtype<>5 then
Call ShowAlert("该题目内无选项","")
end if
end if
if Question_img<>"" then
Question_img=split(Question_img,"&")
else
if Qtype<>5 then
Call ShowAlert("该题目内无选项","")
end if
end if
select case Qtype
case "1","2": call type1()
case "3","4": call type2()
case "5": call type3()
end select
%>
<script language="javascript" src="../Js/QuestAdd.js"></script>
<%sub type1()%>
<form name="form1" action="QuestionImgSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题:<input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
备选项:
<ul type="1" id="ulAnswer">
<%for i=0 to ubound(Question_answer)%>
<li><input type="text" name="Answer" value="<%=Question_answer(i)%>"></li>
<%if Question_img(i)="null" then%>添加图片<input type="checkbox" name="Survey_isImg" value="true" onClick="SwitchHidden('hidden_up<%=i%>');">
<div id="hidden_up<%=i%>" style="display:none; width:40px; height:20px; background:#000000;">
<iframe src="QuestinoImgUpload.asp?Question_id=<%=Question_id%>&i=<%=i%>" frameborder="0" width="400px" height="50px;"></iframe>
</div>
<%else%>
已经添加图片<img height="31" width="88" src="../<%=Question_img(i)%>">
<%end if%>
<%next%>
</ul>
<div id="button">
<input type="submit" value="修改题目">
<input type="button" name="Back" value="返回" onClick="location.href='QuestionList.asp?Survey_id=<%=Survey_id%>'">
</div>
</form>
<%end sub%>
<%sub type2()%>
<form name="form1" action="QuestionImgSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题:<input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
备选项:
<ul type="1" id="ulAnswer">
<%for i=0 to (ubound(Question_answer)-1)%>
<li><input type="text" name="Answer" value="<%=Question_answer(i)%>"></li>
<%if Question_img(i)="null" then%>添加图片<input type="checkbox" name="Survey_isImg" value="true" onClick="SwitchHidden('hidden_up<%=i%>');">
<div id="hidden_up<%=i%>" style="display:none; width:40px; height:20px; background:#000000;">
<iframe src="QuestinoImgUpload.asp?Question_id=<%=Question_id%>&i=<%=i%>" frameborder="0" width="400px" height="50px;"></iframe>
</div>
<%else%>
已经添加图片<img height="31" width="88" src="../<%=Question_img(i)%>">
<%end if%>
<%next%>
<li><input type="text" name="Answer" value="<%=Question_answer(ubound(Question_answer))%>"><input type="text" name="Answer_2" readonly="true" value="用户在此框输入自定义文本"></li>
</ul>
<div id="button">
<input type="submit" value="修改题目">
<input type="button" name="Back" value="返回" onClick="location.href='QuestionList.asp?Survey_id=<%=Survey_id%>'">
</div>
</form>
<%end sub%>
<%sub type3()
Call ShowAlert("问答题不能添加图片","")
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -