📄 showquestion.asp
字号:
<!--#include file=conn.asp-->
<!--#include file="function.asp"-->
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<%
if not IsNumeric(request("id")) or request("id")="" then
Response.Write ("<script>alert('友情提示!\n\参数错误!');history.back();</script>")
Response.end
end if
%>
<%if request("id")<>"" then
id=CLNG(request("id"))
end if
rs.open"select * from question where id="&id,conn,1,1
if rs.eof then
response.write"问题参数出错!"
else
shang=rs("shang")
rs2.open"select * from question where id="&id,conn,1,3
rs2("views")=rs2("views")+1
rs2.update
rs2.close
rs2.open"select * from person where name='"&rs("sender")&"'",conn,1,1
touxian=rs2("touxian")
rs2.close
rs2.open"select * from assort where topic='"&rs("topic")&"'",conn,1,1
shuxing=rs2("shuxing")
rs2.close
rs2.open"select * from class where id="&shuxing&"",conn,1,1
topic0=rs2("topic")
id0=rs2("id")
rs2.close
if rs("jie")=0 then
if now()>rs("overtime") then
rs1.open"select * from reply where replyid="&id&"",conn,1,1
if rs1.eof then
rs2.open"select * from question where id="&id,conn,1,3
rs2("jie")=2
rs2.update
rs2.close
else
rs2.open"select * from question where id="&id,conn,1,3
rs2("jie")=3
rs2.update
rs2.close
rs2.open"select * from person where name='"&rs("sender")&"'",conn,1,3
rs2("fa")=rs2("fa")+gqkf
rs2("jifen")=rs2("jifen")-gqkf
if rs2("jifen")-gqkf<fen1 then
rs2("touxian")=""&ji1&" 一级"
elseif rs2("jifen")-gqkf>=fen1 and rs2("jifen")-gqkf<fen2 then
rs2("touxian")=""&ji1&" 一级"
elseif rs2("jifen")-gqkf>=fen2 and rs2("jifen")-gqkf<fen3 then
rs2("touxian")=""&ji2&" 二级"
elseif rs2("jifen")-gqkf>=fen3 and rs2("jifen")-gqkf<fen4 then
rs2("touxian")=""&ji3&" 三级"
elseif rs2("jifen")-gqkf>=fen4 and rs2("jifen")-gqkf<fen5 then
rs2("touxian")=""&ji4&" 四级"
elseif rs2("jifen")-gqkf>=fen5 and rs2("jifen")-gqkf<fen6 then
rs2("touxian")=""&ji5&" 五级"
elseif rs2("jifen")-gqkf>=fen6 and rs2("jifen")-gqkf<fen7 then
rs2("touxian")=""&ji6&" 六级"
elseif rs2("jifen")-gqkf>=fen7 and rs2("jifen")-gqkf<fen8 then
rs2("touxian")=""&ji7&" 七级"
elseif rs2("jifen")-gqkf>=fen8 and rs2("jifen")-gqkf<fen9 then
rs2("touxian")=""&ji8&" 八级"
elseif rs2("jifen")-gqkf>=fen9 and rs2("jifen")-gqkf<fen10 then
rs2("touxian")=""&ji9&" 九级"
elseif rs2("jifen")-gqkf>=fen10 then
rs2("touxian")=""&ji10&" 十级"
end if
rs2.update
rs2.close
end if
rs1.close
end if
end if
if rs("jie")=4 then
if now()>rs("toutime")+3 then
rs1.open"select sum(dapiao) as piaoshu from toupiao where wenid="&id&"",conn,1,1
toushu=rs1("piaoshu")
rs1.close
if toushu>5 then
rs1.open"select max(dapiao) as gaopiao from toupiao where wenid="&id&"",conn,1,1
gao=rs1("gaopiao")
rs1.close
rs1.open"select * from toupiao where wenid="&id&" and dapiao="&gao&"",conn,1,1
daid=rs1("daid")
dauser=rs1("dauser")
rs1.close
rs1.open"select * from reply where id="&daid,conn,1,3
rs1("isdeal")=1
rs1("jiatime")=now
rs1.update
rs1.close
rs1.open"select * from question where id="&id,conn,1,3
rs1("jie")=1
rs1("jieuser")=dauser
rs1.update
rs1.close
rs1.open"select * from person where name='"&dauser&"'",conn,1,3
rs1("helpnum")=rs1("helpnum")+1
rs1("jifen")=rs1("jifen")+dajiadf+shang
if rs1("jifen")+dajiadf+shang<fen1 then
rs1("touxian")=""&ji1&" 一级"
elseif rs1("jifen")+dajiadf+shang>=fen1 and rs1("jifen")+dajiadf+shang<fen2 then
rs1("touxian")=""&ji1&" 一级"
elseif rs1("jifen")+dajiadf+shang>=fen2 and rs1("jifen")+dajiadf+shang<fen3 then
rs1("touxian")=""&ji2&" 二级"
elseif rs1("jifen")+dajiadf+shang>=fen3 and rs1("jifen")+dajiadf+shang<fen4 then
rs1("touxian")=""&ji3&" 三级"
elseif rs1("jifen")+dajiadf+shang>=fen4 and rs1("jifen")+dajiadf+shang<fen5 then
rs1("touxian")=""&ji4&" 四级"
elseif rs1("jifen")+dajiadf+shang>=fen5 and rs1("jifen")+dajiadf+shang<fen6 then
rs1("touxian")=""&ji5&" 五级"
elseif rs1("jifen")+dajiadf+shang>=fen6 and rs1("jifen")+dajiadf+shang<fen7 then
rs1("touxian")=""&ji6&" 六级"
elseif rs1("jifen")+dajiadf+shang>=fen7 and rs1("jifen")+dajiadf+shang<fen8 then
rs1("touxian")=""&ji7&" 七级"
elseif rs1("jifen")+dajiadf+shang>=fen8 and rs1("jifen")+dajiadf+shang<fen9 then
rs1("touxian")=""&ji8&" 八级"
elseif rs1("jifen")+dajiadf+shang>=fen9 and rs1("jifen")+dajiadf+shang<fen10 then
rs1("touxian")=""&ji9&" 九级"
elseif rs1("jifen")+dajiadf+shang>=fen10 then
rs1("touxian")=""&ji10&" 十级"
end if
rs1.update
rs1.close
rs2.open"select * from toupiao where wenid="&id&"",conn,1,1
while not rs2.eof
rs1.open"select * from reply where id="&rs2("daid")&"",conn,1,3
rs1("tou")=0
rs1.update
rs1.close
rs2.movenext
wend
rs2.close
rs1.open"select * from toupiao where wenid="&id,conn,1,3
while not rs1.eof
rs1.delete
rs1.movenext
wend
rs1.close
else
rs1.open"select * from question where id="&id,conn,1,3
rs1("jie")=2
rs1.update
rs1.close
rs2.open"select * from toupiao where wenid="&id&"",conn,1,1
while not rs2.eof
rs1.open"select * from reply where id="&rs2("daid")&"",conn,1,3
rs1("tou")=0
rs1.update
rs1.close
rs2.movenext
wend
rs2.close
rs1.open"select * from toupiao where wenid="&id,conn,1,3
while not rs1.eof
rs1.delete
rs1.movenext
wend
rs1.close
rs1.open"select * from touuser where wenid="&id,conn,1,3
while not rs1.eof
rs1.delete
rs1.movenext
wend
rs1.close
end if
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("title")%>_<%=webname%></title>
<style type="text/css">
<!--
a.f12og:link{color:#ff6600}
a.f12og:visited{color:#ff6600}
-->
</style>
<link href="iknow.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript>
basic = false;
stprompt = true;
function AddText(NewCode) {
document.hd.Content.value+=NewCode
}
function rtitle(i)
{
document.hd.Title.value=i+document.hd.Title.value;
}
function Font(FONT) {
if (basic) {
AddTxt="\r[FACE="+FONT+"][/FACE]";
AddText(AddTxt);
} else {
txt=prompt("要设置字体的文字"+FONT,"文字");
if (txt!=null) {
AddTxt="\r[FACE="+FONT+"]"+txt;
AddText(AddTxt);
AddTxt="[/FACE]";
AddText(AddTxt);
}
}
}
function Size(SIZE) {
if (basic) {
AddTxt="\r[SIZE="+SIZE+"][/SIZE]";
AddText(AddTxt);
} else {
txt=prompt("要设置字体的大小"+SIZE,"文字");
if (txt!=null) {
AddTxt="\r[SIZE="+SIZE+"]"+txt;
AddText(AddTxt);
AddTxt="[/SIZE]";
AddText(AddTxt);
}
}
}
function Color(COLOR) {
if (basic) {
AddTxt="\r[COLOR="+COLOR+"][/COLOR]";
AddText(AddTxt);
} else {
txt=prompt("要设置字体的颜色"+COLOR,"文字");
if(txt!=null) {
AddTxt="\r[COLOR="+COLOR+"]"+txt;
AddText(AddTxt);
AddTxt="[/COLOR]";
AddText(AddTxt);
}
}
}
function Bold() {
if (basic) {
AddTxt="\r[B][/B]";
AddText(AddTxt);
} else {
txt=prompt("粗体文字","文本");
if (txt!=null) {
AddTxt="\r[B]"+txt;
AddText(AddTxt);
AddTxt="[/B]";
AddText(AddTxt);
}
}
}
function Italicize() {
if (basic) {
AddTxt="\r[I][/I]";
AddText(AddTxt);
} else {
txt=prompt("斜体文字","文本");
if (txt!=null) {
AddTxt="\r[I]"+txt;
AddText(AddTxt);
AddTxt="[/I]";
AddText(AddTxt);
}
}
}
function Underline() {
if (basic) {
AddTxt="\r[U][/U]";
AddText(AddTxt);
} else {
txt=prompt("下划线文字","文本");
if (txt!=null) {
AddTxt="\r[U]"+txt;
AddText(AddTxt);
AddTxt="[/U]";
AddText(AddTxt);
}
}
}
function Left() {
if (basic) {
AddTxt="\r[ALIGN=LEFT][/ALIGN]";
AddText(AddTxt);
} else{
txt=prompt("左对齐的文本","文本");
if (txt!=null) {
AddTxt="\r[ALIGN=LEFT]"+txt;
AddText(AddTxt);
AddTxt="[/ALIGN]";
AddText(AddTxt);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -