日期:2010-10-21  浏览次数:20973 次

    Request Form Item
I_Forder = Request.Form ("I_Folder")
I_Topic  = Request.Form ("I_Topic")
I_Title  = htmlencode(Request.Form ("I_Title"))
I_Body   = Request.Form ("body")
I_Source = Request.Form ("I_Source")
I_Keyword= htmlencode(Request.Form ("I_Keyword"))
I_ISHOT  = request.form("ishot")
if i_ishot = "" then i_ishot="N"
i_ispic  = request.form("ispic")
if i_ispic = "" then i_ispic ="N"
i_pic    = request.form("InsertImage")
i_body = replace(i_body,"contentEditable=true","contentEditable=false")

Check Input
......

Get Pages ,B = Body
B_Len = Len(I_Body)
B_Pages = 1
T = Temp
T_Loop = true

Do While T_Loop    这里loop多次,每4000分一页,算出页码并加入库。
If B_Len > 4000 then
    N_Body = Left(I_Body,4000)     N = New
    If "<P" in N_Body,Else ">" in N_Body
    If Instrrev(N_Body,"<P") > 0 and (Len(N_Body) - Instrrev(N_Body,"<P"))< 400 then
            N_Body = Left(N_Body,InstrRev(N_Body,"<P")-1)
        else if Instrrev(N_Body,"  ") > 0 and (Len(N_Body) - Instrrev(N_Body,"  "))< 400 then
                N_Body = Left(N_Body,InstrRev(N_Body,"  ")-1)
            Else If Instrrev(N_Body,"。") > 0 and (Len(N_Body) - Instrrev(N_Body,"。"))< 400 then
                    N_Body = Left(N_Body,InstrRev(N_Body,"。"))
                 Else If Instrrev(N_Body,";") > 0 and (Len(N_Body) - Instrrev(N_Body,";"))< 400 then
                            N_Body = Left(N_Body,InstrRev(N_Body,";"))
                        else if Instrrev(N_Body,",") > 0 and (Len(N_Body) - Instrrev(N_Body,","))< 400 then
                                N_Body = Left(N_Body,InstrRev(N_Body,","))
                            else if Instrrev(N_Body,".") > 0 and (Len(N_Body) - Instrrev(N_Body,"."))< 400 then
                                    N_Body = Left(N_Body,InstrRev(N_Body,"."))
                            end if
                        end if
                 End If
            End If
    end if
End if
   
    N_Len  = Len(N_Body)
    I_Body = Mid(I_Body,N_Len+1)
    B_Len  = Len(I_Body)
   
Else<