%@ taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0" prefix="xsl" %><%@ taglib uri="http://www.xplorex.com/taglibs/xplorex-1.0" prefix="xlx" %><%@ page import="com.xplorex.content.custompages.XCustomPagesFactory, com.xplorex.content.custompages.XCustomPage, com.xplorex.modules.linksmapping.LinkMap, com.xplorex.modules.linksmapping.LinkMapsFactory" %><%@ page isErrorPage="false" errorPage="errorHandler.jsp" %><% try { // handle alias == null case String aliasForNullVerification = (String) request.getAttribute("alias"); if (aliasForNullVerification == null) { String host = request.getHeader("Host"); aliasForNullVerification = Sites.getAlias(host.toLowerCase()); } if (aliasForNullVerification == null) { %> <% return; } // handle alias == null case try { if (!session.isNew() && !request.isRequestedSessionIdFromCookie()) { Cookie c = new Cookie("JSESSIONID", session.getId()); response.addCookie(c); } } catch (Exception e) { } boolean showDivInfo = request.getParameter("displayMstWithDiv") != null; boolean editCustomPage = request.getParameter("editCustomPage") != null; boolean isImageEditor = session.getAttribute("imageEditor") != null; %><%@ include file="dbaccess.jsp" %><% try { if (alias == null){ %> <% return; } // added by Kolyunya boolean isXhtml = "aroga".equals(alias) || "shoprubyskytemp".equals(alias); XContext context = XContext.getSiteContext(alias); if (context.getBoolean("disablebyaliassiteaccess", false)) { String host = Sites.getHost(alias); String headerHost = request.getHeader("host"); if (!headerHost.equalsIgnoreCase(host) && !headerHost.equalsIgnoreCase("www." + host)) { SitesFactory sitesFactory = new SitesFactory(); Site site = sitesFactory.getSite(alias, false); String[] hosts = site.getHostName(true).split(";"); boolean found = false; for (int i = 0; i < hosts.length; i++) { if (headerHost.equals(hosts[i])) { host = hosts[i]; break; } } String scheme = request.getScheme().toLowerCase(); response.reset(); response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); System.out.println("access by alias " + alias); String servletPath = request.getServletPath(); boolean ignoreQueryString = false; if(servletPath.equals("/linkmap.jsp")){ servletPath = request.getQueryString(); ignoreQueryString = true; } String newLocation = scheme+"://"+host+servletPath; if(request.getQueryString() != null && request.getQueryString().trim().length() > 0 && !ignoreQueryString){ newLocation += "?"+request.getQueryString(); } response.setHeader( "Location", newLocation); %>
<% System.out.println(newLocation); return; } } String queryString = request.getQueryString(); LinkMapsFactory linkMapsFactory = new LinkMapsFactory(alias); if (context.getBoolean("update_jsp_with_mapped_links", false)) { if (queryString != null) { if (queryString.startsWith("p2")) queryString = "/?" + queryString; LinkMap linkMap = linkMapsFactory.getLinkByTrueUrl(queryString); if (linkMap != null) { pageContext.include("/404.jsp"); return; } } } if (queryString != null && queryString.contains("p2")) { if (queryString.startsWith("p2")) { queryString = "/?" + queryString; } LinkMap linkMap = linkMapsFactory.getLinkByTrueUrl(queryString); if (linkMap != null && linkMap.getFalseUrl() != null) { response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); response.setHeader("Location", linkMap.getFalseUrl()); return; } } // /added by Kolyunya %><%@ include file="checkdisabledip.jsp" %><% String siteStatus = Sites.getSiteStatus(alias); if (!"enabled".equals(siteStatus)) { Logger.log("Access to disabled site " + alias); response.sendRedirect("/errorfiles/sitenotfound.jsp"); return; } if (request.getParameter("clientthemeid") != null) { session.setAttribute("themeid", new Long(request.getParameter("clientthemeid"))); } String fr2 = request.getParameter( "fr2" ); String p2 = request.getParameter( "p2" ); String articleid = request.getParameter( "artid" ); String authorid = request.getParameter( "portfolio" ); String gallery = request.getParameter( "gal" ); String community = request.getParameter( "pers" ); String topic = request.getParameter( "topic" ); String companymem = request.getParameter( "companymem" ); String comrfc = request.getParameter( "comrfc" ); String rfc = request.getParameter( "rfc" ); String page1 = request.getParameter( "page" ); String mestype = request.getParameter( "mestype" ); String thrid = request.getParameter( "thrid" ); String clsf = request.getParameter( "clsf" ); String adid = request.getParameter( "adid" ); String clsfport = request.getParameter( "clsfport" ); String clsformportf = request.getParameter( "clsformportf" ); String clsfsearch = request.getParameter( "clsfsearch" ); String unsubscribe = request.getParameter( "unsubscribe" ); //TODO:???????????? if ( authorid != null ) p2 = "portfolio.jsp"; if ( articleid != null ) p2 = "article.jsp"; if ( gallery != null ) p2 = "gallery.jsp"; if ( topic != null ) p2 = "gallerypics.jsp"; if ( companymem != null ) p2 = "comprofile.jsp"; if ( community != null ) p2 = "viewpersonal.jsp"; if ( comrfc != null ) p2 = "mediarequest.jsp"; if ( rfc != null ) p2 = "request.jsp"; if ( page1 != null ) p2 = "page.jsp"; if ( mestype != null ) p2 = "messageboard/messageform.jsp"; if ( thrid != null ) p2 = "messageboard/board.jsp"; if ( clsf != null ) p2 = "classified/clsfcats.jsp"; if ( adid != null ) p2 = "classified/clsform.jsp"; if ( clsfport != null ) p2 = "classified/clsfportfolio.jsp"; if ( clsformportf != null ) p2 = "classified/clsformportf.jsp"; if ( clsfsearch != null ) p2 = "classified/clsfsearch.jsp"; if ( unsubscribe != null ) p2 = "unsubscribe.jsp"; %><%@include file="checkloadattack.jsp"%><% if(AttackDetector.isAttack(request,p2)){ return; } //XContext context = XContext.getSiteContext(alias); boolean isSessionNew = true; try { isSessionNew = session.isNew(); } catch(Exception eeee){} if ((isSessionNew || !context.getBoolean("passintro", true)) && (p2 == null || p2.trim().length() == 0)) { String startUrl = Settings.getStartUrl(alias); if (startUrl != null && startUrl.trim().length() != 0) { response.addHeader("Pragma","no-cache"); %> <% return; } } %> <% if (p2 == null || p2.equals("")) p2 = context.getString("default_p2","start.jsp"); if (fr2 == null || fr2.equals("")) fr2 = context.getString("default_p2","start.jsp"); if ( p2.equals("_") ) p2 = fr2; if (request.getParameter("logonplease") != null ) { %> <%@ include file="logonplease.jsp"%> <% } if (request.getParameter("logout") != null && request.getParameter("logout").equals("true")) { %> <%@ include file="logout.jsp"%> <% } if (session.getAttribute("upload") != null) { p2 = "nonpublished.jsp"; session.removeAttribute("upload"); } if (session.getAttribute("editupload") != null) { p2 = "editbyuser.jsp"; session.removeAttribute("editupload"); } if (session.getAttribute("attachupload") != null) { p2 = "attachments.jsp"; session.removeAttribute("attachupload"); } if (session.getAttribute("createtheme") != null) { p2 = "usergallery.jsp"; session.removeAttribute("createtheme"); } if (session.getAttribute("addgalpic") != null) { p2 = "usergallerypics.jsp"; session.removeAttribute("addgalpic"); } if (session.getAttribute("slideshow") != null) { p2 = "usergallerypics.jsp"; session.removeAttribute("slideshow"); } if (session.getAttribute("medialogin") != null && session.getAttribute("comart") != null) { p2 = "mediaarticle.jsp"; } if (session.getAttribute("personal") != null) { p2 = "viewpersonal.jsp"; session.removeAttribute("personal"); } if (session.getAttribute("complogo") != null) { p2 = "comprofile.jsp"; session.removeAttribute("complogo"); } if (request.getParameter("OrderID") != null || request.getParameter("orderid") != null || request.getParameter("cc_status") != null) { p2 = "shopping/process.jsp"; } if (session.getAttribute("step") != null) { p2 = "wizard.jsp"; } String script2 = p2.substring(0, p2.indexOf(".") + 1) + "jsp"; String hlp = p2.substring(0, p2.indexOf(".") + 1) + "htm"; String csspreview = request.getParameter("cssprev"); request.setAttribute("thisPageName", p2); %><%@ include file="checkregister.jsp" %><% String doctype = context.getString("site_doctype",""); String htmlXMLNS = context.getString("site_html_xmlns",""); if (!showDivInfo && !editCustomPage) { if (isXhtml) { %> <% } else { %> <%=doctype%> 0 ? " xmlns=\""+htmlXMLNS+"\"" : ""%>> <% } } int customPage = 0; if (request.getParameter("customPage") != null) { customPage = Integer.parseInt(request.getParameter("customPage")); } long page1Long = 0; try { page1Long = Long.parseLong(page1); } catch (Exception e) { // ignore it } XCustomPagesFactory customPagesFactory = new XCustomPagesFactory(alias); XCustomPage page1Object = null; if (page1Long != 0) { page1Object = customPagesFactory.loadXCustomPage(page1Long); } boolean isPageWOFramework = page1Object != null && page1Object.isWithFramework(); if (page1 != null && isPageWOFramework) { } else { if (page1Object != null) { request.setAttribute("customPageObject", page1Object); } else { XCustomPage customPageObject = customPagesFactory.loadXCustomPage(customPage); if (customPageObject != null) { request.setAttribute("customPageObject", customPageObject); } } } if (request.getAttribute("setbase") != null) { %>