<% Response.Buffer=True 'Response.AddHeader "Pragma", "no-cache" 'Response.AddHeader "cache-control", "no-store" %> <% '--------定义部份------------------ 'Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr,Kill_IP,WriteSql '自定义需要过滤的字串,用 "|" 分隔'|*|% Fy_In = "exec |insert |select |delete |update |chr|master|truncate|declare|script" Fy_Inf = split(Fy_In,"|") '--------POST部份------------------ If Request.Form<>"" Then For Each Fy_Post In Request.Form For Fy_Xh=0 To Ubound(Fy_Inf) If Instr(LCase(Request.Form(Fy_Post)),Fy_Inf(Fy_Xh))<>0 Then Response.Write "" Response.End End If Next Next End If '---------------------------------- '--------GET部份------------------- If Request.QueryString<>"" Then For Each Fy_Get In Request.QueryString For Fy_Xh=0 To Ubound(Fy_Inf) If Instr(LCase(Request.QueryString(Fy_Get)),Fy_Inf(Fy_Xh))<>0 Then Response.Write "" Response.End End If Next Next End If %> <% '////////////////////防注 '---定义部份 头------ Fy_Cl = 1 '处理方式:1=提示信息,2=转向页面,3=先提示再转向 Fy_Zx = "http://www.gdnet110.gov.cn/" '出错时转向的页面 '---定义部份尾------ On Error Resume Next Fy_Url=Request.ServerVariables("QUERY_STRING") Fy_a=split(Fy_Url,"&") redim Fy_Cs(ubound(Fy_a)) On Error Resume Next for Fy_x=0 to ubound(Fy_a) Fy_Cs(Fy_x) = left(Fy_a(Fy_x),instr(Fy_a(Fy_x),"=")-1) Next For Fy_x=0 to ubound(Fy_Cs) If Fy_Cs(Fy_x)<>"" Then If Instr(LCase(Request(Fy_Cs(Fy_x))),"'")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"and")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"select")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"update")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"chr")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"delete%20from")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),";")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"insert")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"mid")<>0 Or Instr(LCase(Request(Fy_Cs(Fy_x))),"master.")<>0 Then Select Case Fy_Cl Case "1" Response.Write "" Case "2" Response.Write "" Case "3" Response.Write "" End Select Response.End End If End If Next '///////////////////////////// set conn = Server.CreateObject("ADODB.Connection") conn.open"driver={sql server};server=(local); uid=xiaoxsq;pwd=xsq123660@caishui123660;database=caishui123" set connnew = Server.CreateObject("ADODB.Connection") connnew.open"driver={sql server};server=(local); uid=xiaoxsq;pwd=xsq123660@caishui123660;database=caishuidate" '////////////////根据分类取KEY的函数 function getKEY(kind1,kind2,types) set key=server.CreateObject("adodb.recordset") if kind1 <> 0 then sql="select * from keywords where kind1="&kind1&"" end if if kind2 <> 0 then sql=sql&" and kind2="&kind2&"" end if key.open sql,conn,1,3 if not key.eof then getKEY=trim(key("keywords")) else set ke=server.CreateObject("adodb.recordset") sql="select * from keywords where kind1="&kind1 ke.open sql,conn,1,3 if not ke.eof then getKEY=trim(ke("keywords")) end if ke.close set ke=nothing end if key.close set key=nothing end function function getTITLE(kind1,kind2) set rs2=server.CreateObject("adodb.recordset") if kind1 <> 0 then sqq="select * from keywords where kind1="&kind1&"" end if if kind2 <> 0 then sqq=sqq&" and kind2="&kind2&"" end if rs2.open sqq,conn,1,3 if not rs2.eof then getTITLE=trim(rs2("titles")) end if rs2.close set rs2=nothing end function function getHTML(kind1) ServerPath="http://"&Request.ServerVariables("SERVER_NAME") if kind1=6 then '资讯中心 GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=6&sckind=1","/zxzx/index.html" GenHtml ServerPath&"/listblock/rightinfo.asp","/listblock/html/rightinfo.html" GenHtml ServerPath&"/listblock/rightinfo_zxzx.asp","/listblock/html/rightinfo_zxzx.html" end if if kind1=8 then '纳税实务 GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=8&sckind=1","/nssw/index.html" end if if kind1=9 then '会计实务 GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=9&sckind=1","/kjsw/index.html" end if if kind1=11 then '论文 GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=11&sckind=1","/lwhc/index.html" end if if kind1=12 then '财税法规 GenHtml ServerPath&"/csfg/index.asp","/csfg/index.html" end if if kind1=13 then '培训考试 GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=13&sckind=1&kind2="&INFO_KIND2_PXKS_ZCKJ,"/pxks/zhukuai.html" GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=13&sckind=1&kind2="&INFO_KIND2_PXKS_CJZC,"/pxks/chuji.html" GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=13&sckind=1&kind2="&INFO_KIND2_PXKS_CYZG,"/pxks/kuaiji.html" GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=13&sckind=1&kind2="&INFO_KIND2_PXKS_ZJZC,"/pxks/zhongji.html" GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=13&sckind=1&kind2="&INFO_KIND2_PXKS_ZCSW,"/pxks/zhushui.html" GenHtml ServerPath&"/lanmu/lanmu.asp?kind1=13&sckind=1","/pxks/index.html" end if if kind1=10 then '财税专题 GenHtml ServerPath&"/cszt/index.asp","/cszt/index.shtml" end if end function sub GenHtml(Url,htmlName) ff=htmlName FilePath = Server.MapPath(ff) Do_Url=Url strUrl = Do_Url set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP") objXmlHttp.open "GET",strUrl,false On Error Resume Next objXmlHttp.send() 'response.write "r="&objXmlHttp.ReadyState if objXmlHttp.Status<>200 then set objXmlHttp=nothing response.write "
页面"&ff&"产生错误!" response.End() end if binFileData = objXmlHttp.responseBody set objAdoStream = Server.CreateObject("ADODB.Stream") objAdoStream.Type = 1 objAdoStream.Open() objAdoStream.Write(binFileData) objAdoStream.SaveToFile FilePath,2 objAdoStream.Close() response.write "
页面"&ff&"生成完毕!" end sub %> <% '********************************************************************* '本程序模块定义公用的函数,可能为其他所有程序使用的函数,其他单独模块的 '函数则单独写在每个模块的函数里面,如纳税实务,则写在NSSWFUNC.ASP '********************************************************************* '===================================================================== '获取指定级别类别列表中名称的ID号,如资讯中心-》6 '===================================================================== function getUserName(userid) set rsfunc=server.CreateObject("adodb.recordset") rsfunc.open "select username from theuser where auto_id="&userid,conn,1,1 if not rsfunc.eof then getUserName=rsfunc(0) else getUserName="" end if rsfunc.close set rsfunc=nothing end function '===================================================================== '获取指定级别类别列表中名称的ID号,如资讯中心-》6 '===================================================================== function getKindID(kindName,kindIndex) set rsfunc=server.CreateObject("adodb.recordset") if kindName<>"" then rsfunc.open "select auto_id from chinae_kind"&kindIndex&" where kindName='"&kindName&"'",conn,1,1 if not rsfunc.eof then ID=rsfunc(0) end if rsfunc.close else ID="" end if getKindID=id set rsfunc=nothing end function '===================================================================== '获取指定级别分类的类别名称 '===================================================================== function getKindName(kindId,kindIndex) set rsfunc=server.CreateObject("adodb.recordset") sql="select kindname from chinae_kind"&kindIndex&" where auto_id="&kindId 'response.Write(sql) rsfunc.open sql,conn,1,1 if not rsfunc.eof then getKindName=rsfunc(0) else getKindName="" end if rsfunc.close set rsfunc=nothing end function '===================================================================== '获取当前类别的HTML文件存放的路径 '===================================================================== function GetKindHtmlPath(kindid) set rsfunc=server.CreateObject("adodb.recordset") 'get the thePath from chinae_kind1取得模板代码与当前类别栏目标题! sql="select thePath from chinae_kind1 where auto_id="&kindid 'response.Write(sql) rsfunc.open sql,conn,1,1 if not rsfunc.eof then GetKindHtmlPath=rsfunc("thePath") else GetKindHtmlPath="" end if rsfunc.close set rsfunc=nothing end function '===================================================================== '获取当前类别的HTML文件存放的路径 '===================================================================== function getInfopath(kind1) getInfopath=GetKindHtmlPath(kind1) end function '===================================================================== '将记录的空值返回为0 '===================================================================== function NulltoZero(val) if not isnull(val) then NulltoZero=val else NulltoZero=0 end if end function '===================================================================== '将空字符返回为0 '===================================================================== function blanktoZero(val) if val<>"" then blanktoZero=val else blanktoZero=0 end if end function '===================================================================== '返回服务器的地址 '===================================================================== function GetServerPath GetServerPath="http://"&Request.ServerVariables("SERVER_NAME") end function '===================================================================== '根据类别生成上面的信息位置条 '===================================================================== function GetContPagePosBar(kind1,kind2,kind3,kind4,kind) LinkClass="billlink" 'response.Write("LinkClass:"&LinkClass) serverPath=GetServerPath ListUrl=serverPath&"/listblock/infolist.asp" CsUrl="/csrj/" kind22="财务软件" Linkword= "" bar="" if kind1=22 then kindname=GetKindName(kind1,1) bar=bar&Linkword&""&kind22&"" else kindname=GetKindName(kind1,1) bar=bar&Linkword&""&kindName&"" end if if kind2>0 then kindname=GetKindName(kind2,2) bar=bar&Linkword&""&kindName&"" end if if kind3>0 then kindname=GetKindName(kind3,3) bar=bar&Linkword&""&kindName&"" end if if kind4>0 then kindname=GetKindName(kind4,4) bar=bar&Linkword&""&kindName&"" end if firstPageUrl=" 首页 " GetContPagePosBar=firstPageUrl&bar end function Function LeftString(str,n) strTmp=left(trim(str),n) if strTmp<>trim(str) then strTmp=strTmp&".." end if LeftString=strTmp End Function '===================================================================== '根据路径和ID得到HTML的地址 '===================================================================== function GetHtmlFromPathId(path,id) GetHtmlFromPathId="/"&Path&"/detail"&id\1000&"/detail"&id&".html" end function '===================================================================== '根据ID得到信息的类别号,kindseq为信息的级别,1为KIND1,2为KIND2 '===================================================================== function GetKindFromId(id,kindSeq) set rsfunc=server.CreateObject("adodb.recordset") sql="select kind"&kindSeq&" from chinae_information where auto_id="&id 'response.Write(sql) rsfunc.open sql,conn,1,1 GetKindFromId=nulltoZero(rsfunc(0)) rsfunc.close set rsfunc=nothing end function '===================================================================== '根据ID得到下载文件的KIND3类别号, '===================================================================== function GetDownloadKind(id) set rsfunc=server.CreateObject("adodb.recordset") sql="select kind3 from chinae_download where auto_id="&id rsfunc.open sql,conn,1,1 GetDownloadKind=nulltoZero(rsfunc(0)) rsfunc.close set rsfunc=nothing end function '===================================================================== '下载的路径,有些有HTTP,有些是直接的URL '===================================================================== function GetDownloadUrl(url) if instr(url,"http") then GetDownloadUrl=url else GetDownloadUrl="/upfiles/"&url end if end function '===================================================================== '根据ID号得到HTML的地址 '===================================================================== function GethtmlFromAutoId(autoId) infokind = GetKindFromId(autoId,1) 'kind1 infoPath = GetKindHtmlPath(infokind) 'response.Write("infoPath:"&infoPath) GethtmlFromAutoId = GetHtmlFromPathId(infoPath,autoId) end function '===================================================================== '返回日期的值,09-08 '===================================================================== function ShortDateStr(d) ShortDateStr=right("0"&month(d),2)&"-"&right("0"&day(d),2) end function '===================================================================== '返回日期的值,2008-09-08 '===================================================================== function LongDateStr(d) LongDateStr=year(d)&"-"&right("0"&month(d),2)&"-"&right("0"&day(d),2) end function '===================================================================== '返回重复字母个数的字符串 '===================================================================== function repeatchar(ch,icount) res="" for i=1 to icount res=res&ch next repeatchar=res end function '===================================================================== 'SQL查询的条件 '===================================================================== function GetKindCondition(kind1,kind2,kind3,kind4) s1=" and kind1="&kind1 s2=" and kind2="&kind2 s3=" and kind3="&kind3 s4=" and kind4="&kind4 if kind4<>0 then GetKindCondition=s1&s2&s3&s4 elseif kind3<>0 then GetKindCondition=s1&s2&s3 elseif kind2<>0 then GetKindCondition=s1&s2 elseif kind1<>0 then GetKindCondition=s1 end if end function '===================================================================== '积分类型 '===================================================================== function GetPointKind(kind) select case kind case POINT_TYPE_LOGIN GetPointKind="登录" case POINT_TYPE_ASK_DZBS GetPointKind="报税" case POINT_TYPE_ANSWER_DZBS GetPointKind="回报税" case POINT_TYPE_ASK_CSZX GetPointKind="咨询" case POINT_TYPE_ANSWER_CSZX GetPointKind="回咨询" end select end function '===================================================================== '用户当天登录次数 '===================================================================== function GetUserTodayLoginCount(UserId) set conn123660 = Server.CreateObject("ADODB.Connection") conn123660.open"driver={sql server};server=(local); uid=xiaoxsq;pwd=xsq123660@caishui123660;database=caishui123" set rsfunc=server.CreateObject("adodb.recordset") sql="select count(1) from point where Userid="&Userid&" and addtime>="&date&" and addtime <"&(date+1) rsfunc.open sql,conn123660,1,1 GetUserTodayLoginCount=nulltoZero(rsfunc(0)) rsfunc.close set rsfunc=nothing conn123660.close set conn123660=nothing end function '===================================================================== '给用户加积分 '===================================================================== function AddUserPoint(Userid,point,kind) kindname=GetPointKind(kind) set conn123660 = Server.CreateObject("ADODB.Connection") conn123660.open"driver={sql server};server=(local); uid=xiaoxsq;pwd=xsq123660@caishui123660;database=caishui123" sql="update theuser set point1=isnull(point1,0)+ "&point&" where auto_id="&userid conn123660.execute sql bCount=0 if kind=POINT_TYPE_LOGIN then iCount = GetUserTodayLoginCount(UserId) response.Write("iCount:"&iCount) if iCount >= 2 then bCount = 1 end if if bCount=0 then sql="insert into point (userid,points,reason,other,addtime) values ("&Userid&","&point&","&kind&",'"&kindName&"','"&now&"')" 'response.write(sql) conn123660.execute(sql) end if conn123660.close set conn123660=nothing end function %> <% '===================================================================== '获取最大ID号,以便往数据表里面写入数据 '===================================================================== function GetMaxId set rsfunc=server.CreateObject("adodb.recordset") rsfunc.open "select max(auto_id) as MaxID from chinae_information",conn,1,1 if not rsfunc.eof then MaxID=rsfunc("MaxID") else MaxID=0 end if rsfunc.close rsfunc.open "select count(auto_id) as cc from chinae_input",conn,1,1 if not rsfunc.eof then maxID=maxid+rsfunc("cc") MaxID=MaxID+1 end if 'response.Write("MaxID:"&MaxID) GetMaxId=MaxID rsfunc.close set rsfunc=nothing end function '===================================================================== '获取当前类别的静态文件模板 '===================================================================== function GetKindStaticHtml(kindid) set rsfunc=server.CreateObject("adodb.recordset") rsfunc.open "select information from chinae_kind1 where auto_id="&kindid,conn,1,1 if not rsfunc.eof then GetKindStaticHtml=rsfunc("information") else GetKindStaticHtml="" end if rsfunc.close set rsfunc=nothing end function '===================================================================== '其他相关新闻的内容,这里是在最终页面中,加上了笑话的内容 '===================================================================== function GetRelNews(id,kind1,kind2,kind3,kind4) set rsfunc=server.CreateObject("adodb.recordset") if kind4 > 0 then SelCondi = " kind4="&kind4 elseif kind3 > 0 then SelCondi = " kind3="&kind3 elseif kind2 > 0 then SelCondi = " kind2="&kind2 elseif kind1 > 0 then SelCondi = " kind1="&kind1 else SelCondi = "1=2" end if path=GetKindHtmlPath(kind1) otherLinkNews=" " rsfunc.close otherJokelist="" if kind2<>238 then '如果之前是笑话则不显示 jokeUrl=GetServerPath&"/listblock/infolist.asp?kind1=6&kind2=238" otherJokelist=" " rsfunc.close end if set rsfunc=nothing GetRelNews=otherLinkNews&otherJokelist&"
" sql= "select top 6 * from chinae_information where "&SelCondi&" and auto_id<"&id&" order by auto_id desc" rsfunc.open sql,conn,1,1 i=0 do while not rsfunc.eof linkurl="/"&path&"/detail"&rsfunc("auto_id")\1000&"/detail"&rsfunc("auto_id")&".html" otherNewsTd="" if i mod 2 = 0 then otherLinkNews=otherLinkNews&"" otherLinkNews=otherLinkNews&otherNewsTd else otherLinkNews=otherLinkNews&otherNewsTd otherLinkNews=otherLinkNews&"" end if i=i+1 rsfunc.movenext loop otherLinkNews=otherLinkNews&"
  其他相关新闻
  "&rsfunc("title")&"
" sql= "select top 8 * from chinae_information where kind1=6 and kind2=238 and auto_id<"&id&" order by auto_id desc" rsfunc.open sql,conn,1,1 i=0 do while not rsfunc.eof linkurl="/zxzx/detail"&rsfunc("auto_id")\1000&"/detail"&rsfunc("auto_id")&".html" otherJokeTd="" if i mod 4 = 0 then otherJokelist=otherJokelist&"" otherJokelist=otherJokelist&otherJokeTd elseif i mod 4 = 3 then otherJokelist=otherJokelist&otherJokeTd otherJokelist=otherJokelist&"" else otherJokelist=otherJokelist&otherJokeTd end if i=i+1 rsfunc.movenext loop otherJokelist=otherJokelist&"
  笑话
  "&rsfunc("title")&"
" end function '===================================================================== '用动态数据替换静态模板 '===================================================================== function RepHtmlWithData(cont,title,ss,numberT,bar,newsTime,thiscc,auto_id,otherLinkNews,Fpages,remark) content=cont 'content=replace(content,"$title",title) 'content=replace(content,"$source",ss) 'content=replace(content,"$number",numberT) 'content=replace(content,"$bar",bar) 'content=replace(content,"$addtime",newsTime) 'content=replace(content,"$content",thiscc) 'content=replace(content,"$id",auto_id) 'content=replace(content,"$otherLinkNews ",otherLinkNews) 'content=replace(content,"$Fpages",Fpages) '新的最终页面 content=replace(content,"$CurPagePos",bar) content=replace(content,"$stitle",title) content=replace(content,"$sSource",ss) content=replace(content,"$sNumber",numberT) content=replace(content,"$sNewstime",newsTime) content=replace(content,"$id",auto_id) content=replace(content,"$sRelNews",otherLinkNews) content=replace(content,"$sPagesInfo",Fpages) content=replace(content,"$remark",remark) content=replace(content,"$sContent",thiscc) RepHtmlWithData=content end function '===================================================================== '调整原来的HTML文件,用
进行分段 '===================================================================== function RepContentWithBr(cont) cc=cont 'cc=RepContent(cc) cc=replace(cc,"div","p") cc=replace(cc,"DIV","p") cc=replace(cc,"
","
") cc=replace(cc,"
","
") cc=replace(cc,"
","
") cc=replace(cc,"
","
") cc=replace(cc,"

","") cc=replace(cc,"

","") cc=replace(cc,"

","
") cc=replace(cc,"

","
") '这里去掉两个换行 cc=replace(cc,"

","
") RepContentWithBr=cc end function '===================================================================== '返回页的链接 '===================================================================== function HtmlPageLinks(path,autoid,iPage,pagec) '--------------------------- Fpages="
" Fpages=Fpages&"........................................................................

" '加上一页的FLAG,当显示页数大于一时就要这个标识 if iPage>1 then Fpages=Fpages&"" if iPage=2 then Fpages=Fpages&"" else Fpages=Fpages&"" end if Fpages=Fpages&"浏览下一页 " end if for j=1 to pagec 'cp for start 'thiscc=arr_cont_Page(j-1) if j=1 then Fpages= Fpages&"" if iPage=j then Fpages= Fpages&"[1]" else Fpages= Fpages&"[1]" end if Fpages=Fpages&" " else Fpages= Fpages&"" if j=iPage then Fpages= Fpages&"["&j&"] " else Fpages= Fpages&"["&j&"] " end if end if next'cp from end' if iPage<(j-1) then Fpages=Fpages&" " Fpages=Fpages&"" Fpages=Fpages&"浏览下一页" end if Fpages=Fpages&"

" HtmlPageLinks=Fpages end function '===================================================================== '返回评论的数量 '===================================================================== function GetRemarkCount(aid) set rsfunc=server.CreateObject("adodb.recordset") sql="select count(1) as c from ch_remark where articalId="&aid 'response.Write(sql) rsfunc.open sql,conn,1,1 if not rsfunc.eof then GetRemarkCount=rsfunc("c") else GetRemarkCount=0 end if rsfunc.close set rsfunc=nothing end function '===================================================================== '返回评论的HTML '===================================================================== function GetArtRemarkHtml(aid) remarkcount=GetRemarkCount(aid) if remarkcount>3 then moreremLink=" 更多评论" else moreremLink=" " end if RemHtml="" set rsfunc=server.CreateObject("adodb.recordset") sql="select top 3 * from ch_remark where articalId="&aid&" order by auto_id desc" rsfunc.open sql,conn,1,1 do while not rsfunc.eof RemHtml=RemHtml&"" rsfunc.movenext loop RemHtml=RemHtml& "
  评论 (已有"&remarkcount&"位网友发表评论)
" &moreremLink&"
 "&rsfunc("username")&"  "&rsfunc("addtime")&"
 "&rsfunc("Remark")&"
" rsfunc.close set rsfunc=nothing GetArtRemarkHtml=RemHtml end function '===================================================================== '获取推荐新闻的滚动内容 '===================================================================== function GetRollRecNews set rsfunc=server.CreateObject("adodb.recordset") sql="select top 6 a.*,b.contents from chinae_information a,chinae_info_content b where a.auto_id = b.auto_id and a.kind1=6 and kind2=199 and a.news_yes='pass' order by a.newstime desc" 'response.Write(sql) rsfunc.open sql,conn,1,1 strTmp="" do while not rsfunc.eof tuiTitle=rsfunc("title") ShortTitle=leftstring(tuiTitle,19) tuiLink=trim(removehtml(rsfunc("contents"))) strTmp=strTmp&"·"&tuiTitle&"      " rsfunc.movenext loop GetRollRecNews=strTmp rsfunc.close set rsfunc=nothing end function sub delfiles(struploadfiles) if struploadfiles="" then exit sub dim fso,arruploadfiles,i set fso = createobject("scripting.filesystemobject") fso.deletefile(server.mappath("" & struploadfiles)) set fso = nothing end sub '===================================================================== '写入到静态文件 '===================================================================== function productHtml(content1,filePath1) content=content1 filePath=filePath1 Set fso = Server.CreateObject("Scripting.filesystemobject") if fso.FileExists(filePath) then 'fso.deletefile(server.mappath("" & struploadfiles)) fso.deletefile(filePath) end if Set fout = fso.CreateTextFile(filepath) fout.WriteLine content fout.close Set fout=nothing Set fso=nothing end function '===================================================================== '生成程序 '===================================================================== sub GenHtml(Url,htmlName) 'response.End() ff=htmlName FilePath = Server.MapPath(ff) Do_Url=Url strUrl = Do_Url set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP") objXmlHttp.open "GET",strUrl,false On Error Resume Next objXmlHttp.send() 'response.write "r="&objXmlHttp.ReadyState if objXmlHttp.Status<>200 then set objXmlHttp=nothing response.write "
页面"&ff&"产生错误!" response.End() end if binFileData = objXmlHttp.responseBody set objAdoStream = Server.CreateObject("ADODB.Stream") objAdoStream.Type = 1 objAdoStream.Open() objAdoStream.Write(binFileData) objAdoStream.SaveToFile FilePath,2 objAdoStream.Close() 'response.write "
页面"&ff&"生成完毕!" end sub %> <% Function RemoveHTML( strText ) Dim TAGLIST TAGLIST = ";!--;!DOCTYPE;A;ACRONYM;ADDRESS;APPLET;AREA;B;BASE;BASEFONT;" &_ "BGSOUND;BIG;BLOCKQUOTE;BODY;BR;BUTTON;CAPTION;CENTER;CITE;CODE;" &_ "COL;COLGROUP;COMMENT;DD;DEL;DFN;DIR;DIV;DL;DT;EM;EMBED;FIELDSET;" &_ "FONT;FORM;FRAME;FRAMESET;HEAD;H1;H2;H3;H4;H5;H6;HR;HTML;I;IFRAME;IMG;" &_ "INPUT;INS;ISINDEX;KBD;LABEL;LAYER;LAGEND;LI;LINK;LISTING;MAP;MARQUEE;" &_ "MENU;META;NOBR;NOFRAMES;NOSCRIPT;OBJECT;OL;OPTION;P;PARAM;PLAINTEXT;" &_ "PRE;Q;S;SAMP;SCRIPT;SELECT;SMALL;SPAN;STRIKE;STRONG;STYLE;SUB;SUP;" &_ "TABLE;TBODY;TD;TEXTAREA;TFOOT;TH;THEAD;TITLE;TR;TT;U;&n;UL;VAR;WBR;XMP;" Const BLOCKTAGLIST = ";APPLET;EMBED;FRAMESET;HEAD;NOFRAMES;NOSCRIPT;OBJECT;SCRIPT;STYLE;" Dim nPos1 Dim nPos2 Dim nPos3 Dim strResult Dim strTagName Dim bRemove Dim bSearchForBlock nPos1 = InStr(strText, "<") Do While nPos1 > 0 nPos2 = InStr(nPos1 + 1, strText, ">") If nPos2 > 0 Then strTagName = Mid(strText, nPos1 + 1, nPos2 - nPos1 - 1) strTagName = Replace(Replace(strTagName, vbCr, " "), vbLf, " ") nPos3 = InStr(strTagName, " ") If nPos3 > 0 Then strTagName = Left(strTagName, nPos3 - 1) End If If Left(strTagName, 1) = "/" Then strTagName = Mid(strTagName, 2) bSearchForBlock = False Else bSearchForBlock = True End If If InStr(1, TAGLIST, ";" & strTagName & ";", vbTextCompare) > 0 Then bRemove = True If bSearchForBlock Then If InStr(1, BLOCKTAGLIST, ";" & strTagName & ";", vbTextCompare) > 0 Then nPos2 = Len(strText) nPos3 = InStr(nPos1 + 1, strText, " 0 Then nPos3 = InStr(nPos3 + 1, strText, ">") End If If nPos3 > 0 Then nPos2 = nPos3 End If End If End If Else bRemove = False End If If bRemove Then strResult = strResult & Left(strText, nPos1 - 1) strText = Mid(strText, nPos2 + 1) Else strResult = strResult & Left(strText, nPos1) strText = Mid(strText, nPos1 + 1) End If Else strResult = strResult & strText strText = "" End If nPos1 = InStr(strText, "<") Loop strResult = strResult & strText strResult=replace(replace(strResult," ","")," ","") strResult=replace(strResult,chr(10),"") strResult=replace(strResult,chr(13),"") strResult=replace(strResult," ","") RemoveHTML = strResult End Function %> <%autoid=request("id") set rs =server.CreateObject("adodb.recordset") sql="select a.*,b.contents from chinae_information a,chinae_info_content b where a.auto_id=b.auto_id and a.auto_id="&autoid rs.open sql,conn,1,1 if not rs.eof then stitle=rs("title") sSource=rs("source") sNewsTime=rs("NewsTime") sContent=rs("Contents") sNumber=rs("Number") kind1=NulltoZero(rs("kind1")) kind2=NulltoZero(rs("kind2")) kind3=NulltoZero(rs("kind3")) kind4=NulltoZero(rs("kind4")) else stitle= "title" sSource= "source" sNewsTime= "NewsTime" sContent= "Contents" sNumber= "" kind1=0 kind2=0 kind3=0 kind4=0 end if if sNumber<>"" then sNumber="文号:"&sNumber end if if sSource<>"" then sSource="互联网" end if CurPagePos=GetContPagePosBar(kind1,kind2,kind3,kind4,2) rs.close set rs=nothing %> 业务宣传费和广告费的区别
资讯中心 纳税实务 会计实务 财税专题 培训考试 财会图书1 会计论文
财税法规 财务软件 财税咨询 电子报税 法律咨询1 美图欣赏1 资料下载
  注册会计师资格考试
  注册税务师资格考试
  会计证考试
  会计职称考试
    首页 会计实务会计基础常见问题 <%=GetRollRecNews%>
  
业务宣传费和广告费的区别
2008-1-30  来源: 互联网  
 

  两个费用的区别主要是承接业务对象和取得票据方面,要看具体业务是否通过广告公司、专业媒体在电视、网站、电台、报纸、户外广告牌等刊登,并取得广告业专用发票,如果这两条件是成立的,那可以作为广告费,否则只能作为业务宣传费。

  作为广告费,虽然每年在企业所得税前有扣除限额,但超过部分可以往以后年度结转。

  业务宣传费同样每年在企业所得税前有扣除限额,但超过部分不可以往以后年度结转。

  所以,这些费用如何归集,看这两条件是否成立。

<%=GetArtRemarkHtml(autoid)%>
  其他相关新闻
  一个公司正常需要缴纳的税费有哪些   网络公司需要交什么税
  银行代发工资的手续费怎么入账   修建职工宿舍费用的入帐
  什么是不可税前列支的项目   节假补助费可以税前扣除吗?
  笑话
  偷鱼  得寸进尺  各有所用  吃烤羊
  短裙的好处  清白无辜  是他的邻居  原告
<%=GetRelNews(autoid,kind1,kind2,0,0) %>
包含文件
  培训考试课程
会计证
主讲:刘艳霞
精讲班:每科100元,冲刺班:每科50元,模考班.. 试听
  报名
会计职称
主讲:刘艳霞
精讲班:每科100元,冲刺班:每科50元,模考... 试听
  报名
注册会计师
主讲:郑庆华
精讲班:每科100元,冲刺班:每科50元,模考班:.. 试听
  报名
注册税务师
主讲:刘艳霞
精讲班:每科100元,冲刺班:每科50元,模考班... 试听
  报名
  图片新闻
 财会考试图书
书名:审计 专家课堂》--2009年
作者: 陈波
原价:¥38 现价:¥28.5
 《会计》---2010年注册会计师轻松过关2
 《财务成本管理》---2010年注册会计师轻松过关
 《经济法》---2010年注册会计师轻松过关2
 《审计》---2010年注册会计师轻松过关2
 《税法》---2010年注册会计师轻松过关2
  24小时新闻点击排行
  女子自称愿出卖初夜权为奶奶治病
  货车撞少妇勾婴儿车逃逸续男婴找到已死亡
  2男子抢劫捅死3人伤2人 自述杀人的刀已变形
  母亲照顾智障儿子22年夜不能寐
  村妇与丈夫吵嘴后捆绑3儿女水库投水自杀
  战斗英雄当街出售与国家领导人合影翻版照片
  小老板中100万六合彩到处炫富被绑架
  男子被女友淋酒精烧成“焦炭” 命悬一线
版权所有 广东财税服务网
电子邮箱:xsq12345@vip.sina.com  热线电话:0755-83185675 83185687
本站法律顾问:李兰兰律师    粤ICP备07066083号