<%@page contentType="text/html;charset=UTF-8"%> <%@page import="com.leba123.common.log.LogWriter"%> <%@page import="jcms.entity.SearchInfoEntity"%> <%@page import="jcms.blf.info.SearchInfoBLF"%> <%@page import="jcms.makenewpage.ArticleFile"%> <%@page import="jcms.entity.Jcms_WebinfomationEntity"%> <%@page import="jcms.blf.webinfo.Jcms_WebinfomationBLF"%> <%@page import="com.leba123.common.util.Convert"%> <%@page import="jcms.make.makepage.PageUrl"%> <%@ include file="config.jsp"%> <% int type = Convert.getParameterInt( request,"type",0 ); int i_webid = Convert.getParameterInt( request,"i_webid"); int i_columnid = Convert.getParameterInt( request,"i_columnid" ); int i_articleid = Convert.getParameterInt( request,"i_articleid"); Jcms_WebinfomationBLF blf = new Jcms_WebinfomationBLF( strAppID ); Jcms_WebinfomationEntity entity = blf.getWebEntity( i_webid ); String strArtUrl = ""; String strDomain = ""; if( entity != null ){ /*type=1 网站 type=2 栏目 type=3 文章*/ if( entity.getVc_domain().length() > 0 ){ strDomain = "http://"+ entity.getVc_domain(); }else{ strDomain = "/"; } switch( type ){ case 1: strArtUrl = strDomain; break; case 2: strArtUrl = strDomain + "/col/col" + i_columnid + "/index.html"; strArtUrl = PageUrl.GetColumnUrl(i_columnid); break; case 3: /*构造文章页的URL地点,域名+地点*/ SearchInfoBLF sinfoblf = new SearchInfoBLF( strAppID,Convert.getStringValueInt( strWebID)); SearchInfoEntity en = sinfoblf.getEntity( i_articleid,i_columnid ); if( en != null ){ strArtUrl = strDomain +"/"+ ArticleFile.getArtFileName( en.getC_deploytime(),""+i_columnid,""+i_articleid ); //strArtUrl = PageUrl.GetArticleUrlByColumn(catid, artid); } break; } int b_visit = entity.getB_visit(); String strVisit = entity.getVc_visit(); if( b_visit == 1 && Convert.getValue( strVisit).length() > 0 ){ String strUrl = strVisit + "?type=" + type + "&webid=" + i_webid + "&channelid=" + i_columnid + "&articleid=" + i_articleid; strUrl += "&url="+strArtUrl; out.println( Convert.getAlterScript(" window.location.replace('"+strUrl+"');")); }else{ LogWriter.message("[visit.jsp] 网站拜访统计办事示开启或拜访统计办事器地点为空!"); } } %>