<%@ page contentType="text/html;charset=GBK" %>
<%
/**
 *	$RCSfile: global.jsp,v $
 *	$Revision: 1.4 $
 *	$Date: 2002/10/14 13:30:14 $
 */
%>
<jsp:useBean id="myEnv" scope="application" class="com.jdon.web.UserEnvFront"/>
<jsp:setProperty name="myEnv" property="*"/>

<%@ page import="java.util.*,gbase.init.*,
                 com.jivesoftware.util.*,
                 com.jivesoftware.forum.*,
                 com.jivesoftware.forum.util.*"
%>



<%  
    String vurl = request.getRequestURL().toString();
    int int_vurl=vurl.indexOf("/",7);
    if(int_vurl<0)
    int_vurl=vurl.length();
    String web_url=vurl.substring(0,int_vurl);
    WebConfig theWebConfig=new WebConfig();
    System.out.println("web_url:"+web_url);
    if(web_url.equals("http://java114.com"))
    web_url="http://www.java114.com";
    String web_account=theWebConfig.getWebUrlMap(web_url);
    System.out.println("web_account:"+web_account);
    if(web_account==null || web_account.equals("")){
    
%>    
<script language="JavaScript" type="text/javascript">
alert("您访问的域名在自助建站系统JAVACMS还没登记，请进入自助建站系统JAVACMS的‘网站信息’功能的'网站地址'输入框进行登记!");
</script>
<% return;} %> 
<%   
    WebInfo webInfo=theWebConfig.getWebInfo(web_account);
    String web_jive_desc="";
    if(webInfo!=null)
    {
    web_jive_desc=webInfo.getWeb_jive_desc();
    }
    // Check to see if a Jive authorization token exists
    boolean isGuest = false;
    Authorization authToken = SkinUtils.getUserAuthorization(request, response);
    if (authToken == null) {
           authToken = AuthorizationFactory.getAnonymousAuthorization();
           isGuest=true;
    }
    //init forumfactory and pageUser
    myEnv.registeUserInit(authToken);

    User pageUser = myEnv.getPageUser();

    // The last time the user visited this page
    Date lastVisited = new Date(SkinUtils.getLastVisited(request,response));

    // The number of messages a user wants to show per page
    int userMessageRange = myEnv.du.getMessageRange(request,response,pageUser);



%>

