%@page contentType="text/html;charset=UTF-8" %><%@page
import="jcms.makenewpage.ArticleFile"%><%@page
import="jcms.entity.SearchInfoEntity"%><%@page
import="jcms.blf.info.SearchInfoBLF"%><%@page
import="com.hanweb.common.log.LogWriter"%><%@page
import="jcms.entity.Jcms_WebinfomationEntity"%><%@page
import="jcms.blf.webinfo.Jcms_WebinfomationBLF"%><%@page
import="jcms.visit.StatCount"%><%@page
import="com.hanweb.common.util.Convert"%><%@include
file="../config.jsp" %><%
int nWebID = Convert.getParameterInt( request,"i_webid" );
int nColID = Convert.getParameterInt( request,"i_columnid" );
int nArtID = Convert.getParameterInt( request,"i_articleid" );
StatCount.insertCount( strAppID,nWebID,nColID,nArtID );
int type = Convert.getParameterInt( request,"type",0 );
int i_webid = Convert.getParameterInt( request,"i_webid");
Jcms_WebinfomationBLF blf = new Jcms_WebinfomationBLF( strAppID );
Jcms_WebinfomationEntity entity = blf.getWebEntity( i_webid );
String strArtUrl = "";
String strDomain = "";
if( entity != null ){
int b_visit = entity.getB_visit();
if( b_visit == 0 ){
LogWriter.message("[visit.jsp] 网站访问统计服务示开启!");
return;
}
/*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" + nColID + "/index.html";
break;
case 3:
/*组织文章页的URL地址,域名+地址*/
SearchInfoBLF sinfoblf = new SearchInfoBLF( strAppID,Convert.getStringValueInt( strWebID));
SearchInfoEntity en = sinfoblf.getEntity( nArtID,nColID );
if( en != null ){
strArtUrl = strDomain +"/"+ ArticleFile.getArtFileName( en.getC_deploytime(),""+nColID,""+nArtID );
}
break;
}
String strVisit = entity.getVc_visit();
if( b_visit == 1 && Convert.getValue( strVisit).length() > 0 ){
String strUrl = strVisit + "?type=" + type
+ "&i_webid=" + i_webid + "&i_columnid=" + nColID + "&i_articleid=" + nArtID;
strUrl += "&url="+strArtUrl;
out.println( Convert.getAlterScript(" window.location.replace('"+strUrl+"');"));
}else{
LogWriter.message("[visit.jsp] 网站访问统计服务示开启或访问统计服务器地址为空!");
}
}
%>