越南cf比赛:有人能帮我看看这段代码吗?帮我解释一下,实在看不懂(ASP)

来源:百度文库 编辑:高校问答 时间:2024/04/28 05:58:07
留言版的一部分内容:
<%x=0
if x=0 then Medium=""
if instr(rs("body"),"[IMG]")<>0 and instr("body","[/IMG]")<>0 and instr(rs("body"),"[IMG]") <instr(rs("body"),"[/IMG]") then
x=cint(x)+1
if x=1 then Medium="<img src=images/type_img.gif alt=Image>"
end if
if instr(rs("body"),"[MP]")<>0 and instr("body","[/MP]")<>0 and instr(rs("body"),"[MP]") <instr(rs("body"),"[/MP]") then
x=cint(x)+1
if x=1 then Medium="<img src=images/type_mp.gif alt=Media>"
end if
if instr(rs("body"),"[RM=")<>0 and instr(rs("body"),",")<>0 and instr(rs("body"),"]")<>0 and instr(rs("body"),"[/RM]")<>0 and instr(rs("body"),"[RM=")<instr(rs("body"),",") and instr (rs("body"),",")<instr(rs("body"),"]") and instr(rs("body"),")")<instr(rs("body"),"[/RM]") then
x=cint(x)+1
if x=1 then Medium="<img src=images/type_rm.gif alt=Real>"
if instr(rs("body"),"[FLASH=")<>0 and instr(rs("body"),",")<>0 and instr(rs("body"),"]")<>0 and instr(rs("body"),"[/FLASH]")<>0 and instr(rs("body"),"[FLASH=")<instr(rs("body"),",") and instr(rs("body"),",")<instr(rs("body"),"]") and instr(rs("body"),")")<instr(rs ("body"),"[/FLASH]") then
x=cint(x)+1
if x=1 then Medium="<img src=images/type_flash.gif alt=Flash>"
end if
if x>1 then Medium="<img src=images/type_some.gif alt=some>"
response.write Medium
%>

大概就是一个自动换图片的功能