| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 709 人关注过本帖
标题:网站程序源码改编问题,谁能帮我一下?
只看楼主 加入收藏
yingqi
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-11-18
收藏
 问题点数:0 回复次数:2 
网站程序源码改编问题,谁能帮我一下?
有哪位好心人能帮我把下面的源码改写成纯ASP的呢?本人水平低下,改不了!先谢了!<!--#include file="Conn.asp"-->
<!--#include file="setup.asp"-->
<!--#include file="inc/function.asp"-->
    <%Dim proof,GetCode
    proof=Strint(Request("proof"))
    GetCode=Strint(Session("GetCode"))
    Session("GetCode")=""
    If proof<>GetCode Or GetCode=0 Then
        Response.Write"<script>alert('验证码错误,请刷新后重填!');history.go(-1)</script>"
        Response.End()
    End If
    Dim dtitle,dcolor,dbgcolor1,dcu,dlei,dtext,dstop,dtop,sql,Rs,city_oneid,city_twoid,city_threeid
    dtitle=HtmlEncode(Request.Form("dtitle"))
    city_oneid=Strint(Request.Form("city_one"))
    city_twoid=Strint(Request.Form("city_two"))
    city_threeid=Strint(Request.Form("city_three"))
    type_oneid=Strint(Request.Form("type_one"))
    type_twoid=Strint(Request.Form("type_two"))
    type_threeid=Strint(Request.Form("type_three"))
    dtext=HtmlEncode2(Request.Form("dtext"))
    dusername=HtmlEncode(Request.Form("dusername"))
    dcardid=HtmlEncode(Request.Form("dcardid"))
    dtel=HtmlEncode(Request.Form("dtel"))
    dstop=DateAdd("d",Request.Form("dstop"),date())
    If dtitle="" Or city_oneid=0 Or type_oneid=0 Or dtext="" Or dusername=""Or dtel="" Then
        Response.Write"<script>alert('请认真填写!');history.go(-1)</script>"
        Response.End
    End If
    dblink
   
    Dim city_one,city_two,city_three,type_one,type_two,type_three
    city_one=Conn.Execute("select city from china_city where twoid=0 and id="&city_oneid)(0)
    If city_twoid>0 Then city_two=Conn.Execute("select city from china_city where id="&city_oneid&" and threeid=0 and twoid="&city_twoid)(0)
    If city_threeid<>0 Then city_three=Conn.Execute("select city from china_city where id="&city_oneid&" and twoid="&city_twoid&" and threeid="&city_threeid)(0)
    type_one=Conn.Execute("select name from china_type where twoid=0 and id="&type_oneid)(0)
    If type_twoid<>0 Then type_two=Conn.Execute("select name from china_type where id="&type_oneid&" and threeid=0 and twoid="&type_twoid)(0)
    If type_threeid<>0 Then type_three=Conn.Execute("select name from china_type where id="&type_oneid&" and twoid="&type_twoid&" and threeid="&type_threeid)(0)
   
    Set Rs=server.createobject("adodb.recordset")
    sql="select adid,[title],city_oneid,city_twoid,city_threeid,city_one,city_two,city_three,type_oneid,type_twoid,type_threeid,type_one,type_two,type_three,[text],username,cardid,tel,[stop],mark,ip from china_data"
    Rs.open sql,Conn,1,3
    Rs.addnew
  '使用数组 返回值数组 = Split("字符串","分割符")<br />
  'IsArray()判断是否数组的函数,LBound()取数组的下标,UBound()取数组的上标。
   unhtmlgl=split(webguolv,"|")
   If IsArray(unhtmlgl) Then
       For i=0 to UBound(unhtmlgl)
           dtitle=replace(dtitle,unhtmlgl(i),"***")
       Next
   End If
   unhtmlgl=split(webguolv,"|")
   If IsArray(unhtmlgl) Then
       For i=0 to UBound(unhtmlgl)
           dtext=replace(dtext,unhtmlgl(i),"***")
       Next
   End If
    Rs(1)=dtitle:Rs(2)=city_oneid:Rs(3)=city_twoid:Rs(4)=city_threeid:Rs(5)=city_one:Rs(6)=city_two
    Rs(7)=city_three:Rs(8)=type_oneid:Rs(9)=type_twoid:Rs(10)=type_threeid:Rs(11)=type_one:Rs(12)=type_two:Rs(13)=type_three
    Rs(14)=dtext:Rs(15)=dusername:Rs(16)=dcardid:Rs(17)=dtel:Rs(18)=dstop:
    If webinfo=1 Then
        Rs(19)="no" '审核后通过
    Else
        Rs(19)="yes" '直接通过
    End If
    Rs(20)=getIP
    Rs.update
    Rs.Close:Set Rs=Nothing
    sql="select Top 1 adid from china_data order by adid desc"
    id=Conn.execute(sql)(0)                                                
    Conn.Close:Set Conn=Nothing
   
    If webinfo=1 Then
        Response.Write"<script>alert('恭喜您的信息提交成功,请等待等待管理员的审核。请牢记本条信息的ID号:"&id&" 以便电话查询和修改信息');location='index.asp'</script>"
    Else
        ''''''''''''''''''生成html开始''''''''''''''''''''''''''
        ServerURL=CStr(Request.ServerVariables("SCRIPT_NAME"))
        n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
        ServerURL=left(ServerURL, n)'显示从左边数第"n"个字符前面的字符,
        ServerURL="http://"&Request.ServerVariables("SERVER_NAME")&""&ServerURL&"show.asp?id="&id&""
        Set http=server.createobject("Ms" & "xml" & "2.XM" & "LHTTP")
        Http.open "get",ServerURL,false
        Http.send()
        Dim temp,TempPath
        If Http.readystate=4 Then
            AA=Http.responseText
            TempPath=server.mappath("html/"&id&".htm")
            Set objfso = Server.CreateObject("Scripting.FileSystemObject")
            Set htmout = objfso.CreateTextFile(TempPath)
            htmout.write rep1(AA)
            htmout.Close:Set htmout=Nothing
            IF objfso.FileExists(TempPath) Then
                IF objfso.Getfile(TempPath).Size>100 Then
                    temp="html/"&id&".htm"
                End IF
            End IF
            Set objfso=Nothing
        End IF  
        Set http=Nothing
        IF temp="" Then temp="show.asp?id="&id
        ''''''''''''''''''生成html结束''''''''''''''''''''''''''
        Response.Write"<script>alert('恭喜您的信息已经发布成功!现在跳转到您发布的信息页面!');location='"&temp&"'</script>"
    End If %>
搜索更多相关主题的帖子: 源码 改编 
2008-11-18 12:39
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
不明白?这个已经是ASP的了,使用的是生成HTML页面的方法
2008-11-18 13:27
pwwshli
Rank: 1
来 自:广东省广州市
等 级:新手上路
帖 子:22
专家分:0
注 册:2008-3-22
收藏
得分:0 
奇怪了,上面的就是纯ASP了,全部用的都是VBSCRIPT语言啊!!!
楼主还想要怎样??????

人,一定要靠自己!
2008-11-20 16:36
快速回复:网站程序源码改编问题,谁能帮我一下?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018119 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved