<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TopPage.aspx.cs" Inherits="KstCMS.KstCMS_Manager.TopPage" %>


<html>
<head  runat="server">
    <title></title>
 </head>
<body onLoad="timeview();">
<script language="JavaScript">

var OA_TIME = new Date(<%=DateTime.Now.Year.ToString()%>,<%=DateTime.Now.Month.ToString()%>,<%=DateTime.Now.Day.ToString() %>,<%=DateTime.Now.Hour.ToString() %>,<%=DateTime.Now.Minute.ToString() %>,<%=DateTime.Now.Second.ToString() %>);
function mdate()
{
   var solarTerm=sTerm(<%=DateTime.Now.Year.ToString() %>,<%=DateTime.Now.Month.ToString() %>,<%=DateTime.Now.Day.ToString() %>);
   if(solarTerm != "")
      $('mdate').innerHTML = solarTerm;
}
function timeview()
{
  timestr=OA_TIME.toLocaleString();
  timestr=timestr.substr(timestr.indexOf(":")-2);
  document.getElementById("time_area").innerHTML = timestr;
  OA_TIME.setSeconds(OA_TIME.getSeconds()+1);
  window.setTimeout( "timeview()", 1000 );
}

function re_login()
{
msg="真的退出<%=SysName %>吗？";
  if(window.confirm(msg))
   parent.location="<%=SysRootUrl %>/KstCMS_Manager/Logout.aspx";
}




if (window.Event)
  document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
 event.cancelBubble = true
 event.returnValue = false;

 return false;
}

function norightclick(e)
{
 if (window.Event)
 {
  if (e.which == 2 || e.which == 3)
   return false;
 }
 else
  if (event.button == 2 || event.button == 3)
  {
   event.cancelBubble = true
   event.returnValue = false;
   return false;
  }

}

document.oncontextmenu = nocontextmenu;  // for IE5+
document.onmousedown = norightclick;  // for all others

function ProcessBack(){
       if(xhr.readyState == 4)  
       {  
       // var Data = xhr.responseText; 
        alert("更新成功！");
       }
}

function CreateXHR()  
{  
    //早期的IE版本是Msxm12.XMLHTTP  
    //IE5+是Microsoft.XMLHTTP  
    //非IE,支持的是XMLHttpRequest  
    try{  
        xhr = new ActiveXObject("Microsoft.XMLHTTP");  
    }catch(e){  
        try{  
        //alert("IE5--");  
        xhr = new ActiveXObject("Msxm12.XMLHTTP");  
        }catch(E){  
            xhr = false;  
        }  
    }  
      
    if(!xhr && typeof XMLHttpRequest != 'undefined')  
    {  
     //alert("none IE");  
     xhr =new XMLHttpRequest();  
    }  
    else  
    {  
     //alert("IE5++");  
    }      
 
    return xhr;  
} 
function ClearCache(){
            xhr = CreateXHR();  
            xhr.onreadystatechange=ProcessBack;  
            var url = "ClearCache.aspx";  
            xhr.open("POST",url);  
            xhr.send(null);  
           
}
</script>
<asp:Panel ID="Panel1" runat="server">
<table  class="TopMain" border="0" cellpadding="0" cellspacing="0" >
    <form id="form1" runat="server">
  <tr>
    <td  class="TopLogin">
     <asp:Literal ID="uLogo" runat="server"></asp:Literal></td>
    <td class="TopTitle" nowrap>
        <asp:Literal ID="CompanyName" runat="server"></asp:Literal></td>
    <td  valign="top" nowrap>
  <table width="300" border="0" cellpadding="3" cellspacing="0">
  <tr>
    <td align="right">
    
     <a href="#" onClick="OpenDialog('Module/Kalender/index.aspx',600,400);" title="点击弹出万年历"><span class="topnav"><strong>
            <%            
            string today = DateTime.Now.ToString("yyyy年M月d日") + " 星期";
            switch(DateTime.Now.DayOfWeek)
            {
            case DayOfWeek.Friday:
	            today+= "五";
	            break;
            case DayOfWeek.Monday:
	            today+= "一";
	            break;
            case DayOfWeek.Saturday:
	            today+= "六";
	            break;
            case DayOfWeek.Sunday :
	            today+= "日";
	            break;
            case DayOfWeek.Thursday:
	            today+= "四";
	            break;
            case DayOfWeek.Tuesday:
	            today+= "二";
	            break;
            case DayOfWeek.Wednesday:
	            today+= "三";
	            break;
            }
            Response.Write(today);
            %></strong></span></a>
            <img src="images/time.gif" align="absmiddle">
			<strong><span id="time_area" class="topnav"></span></strong>    </td>
    </tr>
  <tr>
    <td align="right" nowrap>
	
	 <img src="images/homepage.gif" border="0" align="absbottom">&nbsp;<a href="main.aspx" target="mainFrame" title="管理首页"><font class="topnav">管理首页</font></a> 
            &nbsp;<img src="images/theme.gif" width="16" height="16" border="0" align="absbottom">&nbsp;<a href="SystemSet/Users/person_info/index.aspx" target="mainFrame" title="软件注册"><font class="topnav">用户信息</font></a>
            &nbsp;<img src="images/reload.gif" width="16" height="16" border="0" align="absbottom">&nbsp;<a href="javascript:ClearCache();"><font class="topnav">清除缓存</font></a>
            &nbsp;<img src="images/login.gif" width="16" height="16" border="0" align="absbottom">&nbsp;<a href="#" onclick="re_login();" title="退出系统"><font class="topnav">退出</font></a> 
	
	</td>
    </tr>
</table>    </td>
  </tr>
  <!--
  <tr>
    <td colspan="3">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td class="LeftMenuTop">
      
		<table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="menu1" onmouseover="this.className='menu1';" onmouseout="this.className='menu2';" onclick="ClickMenu(1);">菜单</td>
            <td class="menu2" onmouseover="this.className='menu1';" onmouseout="this.className='menu2';" onclick="ClickMenu(2);">在线</td>
            <td class="menu2" onmouseover="this.className='menu1';" onmouseout="this.className='menu2';" onclick="ClickMenu(3);">短信</td>
            <td class="menu2" onmouseover="this.className='menu1';" onmouseout="this.className='menu2';" onclick="ClickMenu(4);">人员</td>
          </tr>
        </table></td>
        <td class="RightGG">
        
         <table width="100%">
          <tr>
            <td width="1%"><img src="images/notify.gif" width="18" height="18" alt=""></td>
            <td width="99%">&nbsp;</td>
          </tr>
        </table>
      
        </td>
      </tr>
    </table></td>
    </tr>-->
  </form>
</table>
</asp:Panel>
</body>
</html>