<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% dim req,dir,i,num,sql1,sql2,sql,title,title1,title2,content,content1,content2 dim imgLoc(3),tit(15) req=request.QueryString("id") if req="" then req=1 end if dir=request.QueryString("dir") if dir="" then dir=1 end if num=req*100+dir for i=1 to 3 imgLoc(i)="images/"& cstr(req) & "0" &cstr(i) &".gif" next tit(1)="About Us" tit(2)="Services" tit(3)="Testimonials" tit(4)="About Acupuncture" tit(5)="Contact Us" %> <%=tit(req)%> <% elseif req=4 then if dir="" then dir=1 end if sql="select * from common where com_id="& num rst.open sql,conn,1,1 title=rst("com_title") content=rst("com_content") rst.close %>

<%=title%>

<%=content%>

<% elseif req=5 then sql1="select * from common where com_id=51" sql2="select * from common where com_id=52" rst.open sql1,conn,1,1 title1=rst("com_title") content1=rst("com_content") rst.close rst.open sql2,conn,1,1 title2=rst("com_title") content2=rst("com_content") rst.close %>

<%=title1%>

<%=content1%>

<%=title2%>

<%=content2%>

<% end if %>

width="200" height="229" />

width="200" height="117" />

width="200" height="87" />

<% on error resume next set rst=server.CreateObject("ADODB.Recordset") if req=1 or req="" then sql1="select * from common where com_id=11" sql2="select * from common where com_id=12" rst.open sql1,conn,1,1 title1=rst("com_title") content1=rst("com_content") rst.close rst.open sql2,conn,1,1 title2=rst("com_title") content2=rst("com_content") rst.close %>

<%=title1%>

<%=content1%>

<%=title2%>

<%=content2%> <% elseif req=2 then sql="select * from common where com_id=201" rst.open sql,conn,1,1 title=rst("com_title") content=rst("com_content") rst.close %>

<%=title%>

<%=content%>

<% elseif req=3 then sql="select * from common where com_id="& num rst.open sql,conn,1,1 title=rst("com_title") content=rst("com_content") rst.close %>

<%=title%>

<%=content%>

<% if request.QueryString("id")=1 then %> <% else %> <% end if if req=4 then '--以下为自动列出About Acupuncture部分标题的代码 c_id=num sql="select * from common where com_id>400 and com_id<500" rst.open sql,conn,1,1 rst.movefirst f_id=rst("com_id") rst.movelast l_id=rst("com_id") cf=c_id-f_id lc=l_id-c_id if cf=0 then rst.movefirst up=0 down=7 for i=1 to down if rst.eof then exit for end if rst.movenext response.write("
  • "&rst("com_title")&"
  • ") next elseif lc=0 then up=7 down=0 for i=1 to up if rst.bof then exit for end if rst.moveprevious next for j=1 to up response.write("
  • "&rst("com_title")&"
  • ") rst.movenext next elseif cf<=3 then up=cf down=7-cf rst.movefirst for i=1 to up response.write("
  • "&rst("com_title")&"
  • ") rst.movenext next rst.movenext for j=1 to down response.write("
  • "&rst("com_title")&"
  • ") rst.movenext if rst.eof then exit for end if next elseif cf=>4 then up=4 down=3 cu=cf-up rst.movefirst if cu>1 then for i=1 to cu rst.movenext next elseif cu=1 then rst.movenext end if for j=1 to up response.write("
  • "&rst("com_title")&"
  • ") rst.movenext next rst.movenext for k=1 to down response.write("
  • "&rst("com_title")&"
  • ") rst.movenext if rst.eof then exit for end if next end if rst.close '--以上为自动列出标题的代码 elseif req=3 then '--以下为自动列出Testimonials部分标题的代码 c_id=num sql="select * from common where com_id>300 and com_id<400" rst.open sql,conn,1,1 rst.movefirst f_id=rst("com_id") rst.movelast l_id=rst("com_id") cf=c_id-f_id lc=l_id-c_id rst.movefirst if cf=0 then up=0 down=7 for i=1 to down if rst.eof then exit for end if rst.movenext response.write("
  • "&rst("com_title")&"
  • ") next elseif lc=0 then rst.movelast tempid=rst("com_id") up=7 down=0 for i=1 to up if rst.bof then exit for end if rst.moveprevious next for j=1 to up rst.movenext if rst("com_id")=tempid then exit for end if response.write("
  • "&rst("com_title")&"
  • ") if rst.eof then exit for end if next elseif cf<=3 then up=cf down=7-cf rst.movefirst for i=1 to up response.write("
  • "&rst("com_title")&"
  • ") rst.movenext next rst.movenext for j=1 to down response.write("
  • "&rst("com_title")&"
  • ") rst.movenext if rst.eof then exit for end if next elseif cf=>4 then up=4 down=3 cu=cf-up rst.movefirst if cu>1 then for i=1 to cu rst.movenext next elseif cu=1 then rst.movenext end if for j=1 to up response.write("
  • "&rst("com_title")&"
  • ") rst.movenext next rst.movenext for k=1 to down response.write("
  • "&rst("com_title")&"
  • ") rst.movenext if rst.eof then exit for end if next end if rst.close '--以上为自动列出标题的代码 end if %>
     
    <% conn.close set conn=nothing %>