停机广告

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.cmbtrip.util.LinkUtil"%>
<%@ page import="net.hubs1.expotia2.core.ExpotiaConstant"%>
<%@ page import="net.hubs1.expotia2.util.DES"%>
<%@taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page import="java.net.URLDecoder"%>
<%@ page import="javax.servlet.http.Cookie"%>
<%@ page import="org.apache.commons.lang.StringUtils" %>  
<%
String path=LinkUtil.getContextPath(request.getContextPath());
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String imagePath = path+"/expotia2";
Object redirectURL = request.getAttribute("redirectURL");
Cookie[] cookies =request.getCookies();
String loginname = null ;
String ID = null;
boolean isLogin = false;
if(cookies!=null){
 for(Cookie cookie:cookies){ 
  if(cookie.getName().equals(ExpotiaConstant.NAME)&&StringUtils.isNotEmpty(cookie.getValue())){
   loginname= URLDecoder.decode(cookie.getValue(),"utf-8");
  }
  if(cookie.getName().equals(ExpotiaConstant.ID)&&StringUtils.isNotEmpty(cookie.getValue())){
   ID= cookie.getValue();
  }
 }
}
 if((ID!=null&&!ID.equals("")&&loginname!=null&&!loginname.equals(""))){
  if(DES.getInstance().encode(loginname).equals(ID)){
  isLogin = true;
  }
 }
%>
<%
  List result = new ArrayList() ;
  
  Calendar calendarExpo = Calendar.getInstance() ;
  calendarExpo.set(Calendar.YEAR, 2010) ;
  calendarExpo.set(Calendar.MONTH, 4) ;
  calendarExpo.set(Calendar.DAY_OF_MONTH, 1) ;
  calendarExpo.set(Calendar.HOUR_OF_DAY, 0) ;
  calendarExpo.set(Calendar.HOUR_OF_DAY, 0) ;
  calendarExpo.set(Calendar.HOUR_OF_DAY, 0) ;
  
  Calendar calendar = Calendar.getInstance() ;
  calendar.set(Calendar.HOUR_OF_DAY, 0) ;
  calendar.set(Calendar.MINUTE, 0) ;
  calendar.set(Calendar.SECOND, 0) ;
  
  int days = calendarExpo.get(Calendar.DAY_OF_YEAR) - calendar.get(Calendar.DAY_OF_YEAR) ;
  
  String d = String.valueOf(days) ;
  for(int i=0;i<d.length();i++){
   result.add(String.valueOf(d.charAt(i))) ;
  }
  while(result.size()<3){
   result.add(0,"0") ;
  }
  request.setAttribute("countdown", result) ;
%>
<jsp:include flush="true"
   page="/WEB-INF/expotia2/google_analytics.jsp" /><%-- google 跟踪分析代码 --%>
<%-- tmp alert start --%>
<%
  Calendar calendar2 = Calendar.getInstance() ;
  calendar2.set(Calendar.YEAR, 2010) ;
  calendar2.set(Calendar.MONTH, 2) ;
  calendar2.set(Calendar.DAY_OF_MONTH, 20) ;
  calendar2.set(Calendar.HOUR_OF_DAY, 7) ;
  calendar2.set(Calendar.MINUTE, 0) ;
  calendar2.set(Calendar.SECOND, 0) ;
  
  Date date = calendar2.getTime() ;
  Date now = new Date() ;
  boolean isShowAlert = true ;
  if(now.after(date)){
   isShowAlert = false ;
  }
  request.setAttribute("isShowAlert", isShowAlert) ;
%>
<c:if test="${isShowAlert}">
<div id="tmpAlertDiv" style='height:20px;line-height:20px; padding:0 20px 0 10px;background-color:#ffff00; position:relative;'>
网站升级通知:因电信机房线路 升级,本站于2010-03-20(周六)凌晨00:00至上午07:00停止网络和电话服务,给您带来的不便敬请谅解。
</div>
</c:if>
<%-- tmp alert end --%>
   <div class="headerArea">
  <div class="topMenu">
  <%
  if(isLogin){
   %>
  <a href="<%=path%>/member/membercenter.action">会员中 心</a><a href="<%=path%>/member/logout.action">退 出</a><a href="/zh/content/site/memberhelp">帮助</a>
  <% }else{
   if(redirectURL!=null){
  %>
   <a href="<%=path%>/member/register.action?${redirectURL}">注 册</a><a href="<%=path%>/member/login.action">登 录</a><a href="/zh/content/site/memberhelp">帮助</a>
  <% }else{%> 
   <a href="<%=path%>/member/register.action"> 注册</a><a href="<%=path%>/member/login.action">登 录</a><a href="/zh/content/site/memberhelp">帮助</a>
   <% }
   }%>
  </div>
  <div class="headerMain clearfix">
   <div class="logo"><a href="/"><img src="/images/logo/logo.jpg" alt="logo" /></a></div>
   <div class="topBanner"><a href="/ad/countdown.htm"><img src="/images/banners/banner.jpg" alt="" /></a></div>
   <div class="date">
   <c:forEach items="${countdown}" var="item" varStatus="status">
   <span class="countdownleft${status.index} countdownpos${item}"></span>
   </c:forEach>
   </div>
  </div>
  <span class="blank10"></span>
  <ul class="nav clearfix">
   <li><a href="/">首页</a></li>
   <li><a href="<%=path%>/zh/expo" class="w5">栏目1</a></li>
   <li><a href="<%=path%>/zh/tours" class="w1">
栏目2

</a></li>
   <li><a href="<%=path%>/hotelsearch" class="w2 here">
栏目3  

</a></li>
   <li><a href="/zh/trip" class="w4 ">
栏目4  

</a></li>
   <li class="last"><img src="/images/navTel.png" alt="" /></li>
  </ul>
  <span class="blank9"></span>
 </div>



 

你可能感兴趣的:(C++,c,C#,Google,电信)