利用VC++开发ASP图像处理组件(2)
2006-07-23 11:33:35 来源:WEB开发网1. <!--#include file="Config/Function.asp"-->
2. <!--#include file="Config/SiteInfo.asp"-->
3. <!--#include file="Config/DbConn.asp"-->
4. <%
a) Dim TeachID, PageTextLen, Page, SumPage, BodyLen, \
TemplateBody, Width, Height, FHeight, sEndStr
b) TeachID = INT(Request("TeachID"))
c) PageTextLen = INT(Request("PageTextLen"))
d) IF PageTextLen <= 0 THEN
i. PageTextLen = 300
e) END IF
f) Page = INT(Request("Page"))
g) Set Rs = Server.CreateObject("ADODB.Recordset")
h) Sql="select * from Article where id=" & TeachID
i) Rs.open sql,conn,1,1
j) IF NOT Rs.EOF THEN
i. TeachingBody = Rs("Content") & constEndStr
k) ELSE
i. Response.Write("记录不存在")
ii. Rs.Close
iii. Set Rs = Nothing
iv. Conn.Close
v. Set Conn = Nothing
vi. Response.End
l) END IF
m) BodyLen = len(TeachingBody)
n) SumPage = GetMaxPageNum(BodyLen, PageTextLen)
o) Dim sPageText
p) IF Page >= SumPage THEN
i. Page = SumPage
q) END IF
r) IF Page <= 0 THEN
i. Page = 1
s) END IF
t) sPageText = mid(TeachingBody, (Page-1) * PageTextLen + 1, PageTextLen)
u) Dim sFont
v) sFont = Request("FontFace")
更多精彩
赞助商链接