• 您的位置: 紫荷精灵 >> 经验技巧 >> Google Sitemaps 日期修改
  • Google Sitemaps 日期修改

  • 作者:admin  来源:原创  日期:2009-5-1 8:41:56
  • 修改page/Article/fun.asp

    替换就可以了。
    修改的地方我标注了'~~~~~~~~edit

    public sub createmap()
            dim rs,i,data,irs,outmap,listid,listpath
            if len(king.mapname)=0 then exit sub
            set rs=conn.execute("select top "&king.mapnumber&" artdate,artpath,artid,listid,artcommend,arthead from kingart where artshow=1 and artgrade=0 order by artid desc;")
                    if not rs.eof and not rs.bof then
                            data=rs.getrows()
                            outmap="<?xml version=""1.0"" encoding=""UTF-8""?>"
                            outmap=outmap&"<urlset xmlns="""&king_map_xmlns&""">"
                            for i=0 to ubound(data,2)
                                    if cstr(listid)<>cstr(data(3,i)) then
                                            listid=data(3,i)
                                            set irs=conn.execute("select listpath from kingart_list where listid="&listid&";")
                                                    if not irs.eof and not irs.bof then
                                                            listpath=irs(0)
                                                    end if
                                                    irs.close
                                            set irs=nothing
                                    end if
                                    outmap=outmap&"<url>"
                                    outmap=outmap&"<loc>"&getpath(data(2,i),0,king.siteurl&king.inst&listpath&"/"&data(1,i))&"</loc>"
                                    outmap=outmap&"<lastmod>"&formatdate(data(0,i),"yyyy-MM-dd")&"</lastmod>"'~~~~~~~~edit
                                    outmap=outmap&"<priority>"&formatnumber((data(4,i)+data(5,i)+2)/4,1,true)&"</priority>"
                                    outmap=outmap&"</url>"
                            next
                            outmap=outmap&"</urlset>"
                            king.savetofile "../../"&art.path&".xml",outmap
                    end if
                    rs.close
            set rs=nothing
    end sub

  • 上一篇:错误14274 无法添加、更新或删除从MSX服务器上发起的作业
    下一篇:ADSL宽带掉线疑难杂症揭秘