<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="../Inc/SK.Session.asp" -->
<!--#include file="../Inc/SK.Funtion.asp" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>系统顶部</title>
<link href="../images/style.css" type="text/css" rel="stylesheet" />
<script language="JavaScript" type="text/javascript">
if (window == top)top.location.href = "index.asp";
setTimeout("location.href='Top.asp'",90000);
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="70" background="../images/main_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="270" height="24" background="../images/main_03.gif">&nbsp;</td>
            <td width="505" background="../images/main_04.gif" class="gd">
<%
Dim RsUser,SqlUser,RsDept1,SqlDept1,RsDept2,SqlDept2,RsDept3,SqlDept3
set RsUsers=server.createobject("adodb.recordset")
SqlUsers="select * from SK_SystemUsers where UsersID="&Session("UID")&"" 
RsUsers.Open SqlUsers,conn,1,1

set RsDept1=server.createobject("adodb.recordset")
SqlDept1="select * from SK_SystemDept where LID="&RsUsers("SK_Dept1")&""
RsDept1.open SqlDept1,conn,1,1

set RsDept2=server.createobject("adodb.recordset")
SqlDept2="select * from SK_SystemDept where LID="&RsUsers("SK_Dept2")&""
RsDept2.open SqlDept2,conn,1,1

set RsDept3=server.createobject("adodb.recordset")
SqlDept3="select * from SK_SystemDept where LID="&RsUsers("SK_Dept3")&""
RsDept3.open SqlDept3,conn,1,1
%>
<marquee width="430" direction="Left" hspace="6" scrollamount="3" onMouseOver="this.stop()" onMouseOut="this.start()">
欢迎您来自<%=RsDept1("LName")%> / <%=RsDept2("LName")%> / <%=RsDept3("LName")%>的<%=RsUsers("SK_OName")%>，您共登录本系统<%=RsUsers("SK_Login")%>次，本次登录时间:<%=RsUsers("SK_LoginTime")%>  <%=RsUsers("SK_Maxim")%></marquee>
<%
RsDept1.close
Set RsDept1 = nothing
RsDept2.close
Set RsDept2 = nothing
RsDept3.close
Set RsDept3 = nothing
rsUsers.Close
Set rsUsers = nothing
%></td>
            <td>&nbsp;</td>
            <td width="21"><img src="../images/main_07.gif" width="21" height="24" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="38"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="270" height="38" background="../images/main_09.gif">&nbsp;</td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="490" height="25" valign="bottom">
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50" class="mfont" id="home"><a href="Index.asp" target="_parent">首页</a></td>
<td width="48" class="mfont" id="back"><a href="javascript:history.go(-1)">后退</a></td>
<td width="48" class="mfont" id="goto"><a href="javascript:history.go(1)">前进</a></td>
<td width="48" class="mfont" id="rep"><a href="javascript:this.location.reload();" target="I2">刷新</a></td>
<td width="48" class="mfont" id="exit"><a href="Exit.asp" target="_parent">退出</a></td>
<td width="26"><img src="../images/main_21.gif" width="26" height="19" /></td>
<%if Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK000000001") then%>
<td width="100" class="mfont" id="modinfo"><a href="MyInfo.asp" target="I2">修改资料</a></td>
<%else%>
<td width="100" class="mfont" id="Nomodinfo">&nbsp;&nbsp;</td>
<%end if%>
<%
if Getconfig("SK_Client")="0" AND (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000300")) then
set Rs1=Server.CreateObject("ADODB.Recordset")
sql1="select * from SK_Follow where SK_SalesID="&Session("UID")&" and SK_Del=0 and SK_Di=0 and datediff(day,[SK_Ftime],getdate())=0"
Rs1.open sql1,conn,1
if not Rs1.eof and not Rs1.bof then
%>
<td width="40" align="center">
<bgsound src="../images/msg.wav" id=psd loop="1">
<a href="../Client/SK.FollowPlan.asp" target="I2"><img src="../images/E1.gif" width="20" height="20" border="0" title="您今天有计划跟进信息" /></a>
</td>
<%else%>
<td width="40" align="center"></td>
<%
end if
Rs1.close
set Rs1=Nothing
end if
%>
<%
if Getconfig("SK_Office")="0" AND (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK100000703")) then
set Rs2=Server.CreateObject("ADODB.Recordset")
sql2="select * from SK_OfficeMail where SK_SalesID="&session("UID")&" and SK_Del=0 and SK_Type=1 and SK_Read=0 and datediff(day,[SK_Time],getdate())=0"
Rs2.open sql2,conn,1
if not Rs2.eof and not Rs2.bof then
%>
<td width="40" align="center">
<bgsound src="../images/NewMail.wav" id=psd loop="1">
<a href="../Office/SK.MailInbox.asp?AA=3&Akey=<%=Date()%>" target="I2"><img src="../images/E3.gif" width="20" height="20" border="0" title="您有新的邮件" /></a>
</td>
<%else%>
<td width="40" align="center"></td>
<%
end if
Rs2.close
set Rs2=Nothing
end if
%>
<%
if Getconfig("SK_Office")="0" AND (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK100000702")) then
set Rs3=Server.CreateObject("ADODB.Recordset")
sql3="select * from SK_OfficeMsn where SK_Del=0 and SK_Received=0 and SK_Receiver="&session("UID")&" and SK_Redel=0 and SK_Draft=0 and datediff(day,[SK_Sendtime],getdate())=0"
Rs3.open sql3,conn,1
if not Rs3.eof and not Rs3.bof then
%>
<td width="40" align="center">
<bgsound src="../images/Msn.mp3" id=psd loop="1">
<a href="../Office/SK.MsnInbox.asp?AA=3&Akey=<%=Date()%>" target="I2">
<img src="../images/E2.gif" width="20" height="20" border="0" title="您有新的消息" />
</a>
</td>
<%else%>
<td width="40" align="center"></td>
<%
end if
Rs3.close
set Rs3=Nothing
end if
%>
</tr>
</table>
</td>
<td width="300" valign="bottom" nowrap="nowrap"><div align="right"><span class="welcome">■ 当前：</span><span class="welcome" id="linkweb"><script>setInterval("linkweb.innerHTML=new Date().toLocaleString()+''+''.charAt(new Date().getDay());",100);
</script>
</span>&nbsp;<font color="#FFFFFF"><%
select case weekday(now()) 
case 1 
varweekday= "星期日 " 
case 2 
varweekday= "星期一 " 
case 3 
varweekday= "星期二 " 
case 4 
varweekday= "星期三 " 
case 5 
varweekday= "星期四 " 
case 6 
varweekday= "星期五 " 
case 7 
varweekday= "星期六 " 
end select 
response.write varweekday
%></font>
</div></td>
              </tr>
            </table></td>
            <td width="21"><img src="../images/main_11.gif" width="21" height="38" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
<td height="8">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="T01"><img src="../images/T01.gif" /></td>
<td id="T02"><img src="../images/T02.gif" /></td>
<td id="T03"><img src="../images/T03.gif" /></td>
</tr>
</table>

</td>
</tr>
</table>

</td>
  </tr>
  <tr>
    <td height="28" background="../images/main_36.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="177" height="28" background="../images/main_32.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="20%"  height="22">&nbsp;</td>
            <td width="59%" valign="bottom" class="welcome">用户名：<%=Session("UserName")%></td>
            <td width="21%">&nbsp;</td>
          </tr>
        </table></td>
<td>
<!--菜单开始-->

<div id="navlist">
<%if (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK100000000"))  and Getconfig("SK_Office")<>"1"  then%>
<li><a href="Left.asp?Action=Office" target="I1">协同办公</a></li>
<%end if%>
<%if (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000000"))  and Getconfig("SK_Client")<>"1"  then%>
<li><a href="Left.asp?Action=Client" target="I1">客户管理</a></li>
<%end if%>
<%if (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK300000000"))  and Getconfig("SK_Sales")<>"1"  then%>
<li><a href="Left.asp?Action=Sales" target="I1">销售管理</a></li>
<%end if%>
<%if (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK600000000")) and Getconfig("SK_Service")<>"1"  then%>
<li><a href="Left.asp?Action=Service" target="I1">客服管理</a></li>
<%end if%>
<%if (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK700000000")) and Getconfig("SK_Finance")<>"1"  then%>
<li><a href="Left.asp?Action=Finance" target="I1">财务管理</a></li>
<%end if%>
<%if (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK800000000")) and Getconfig("SK_Product")<>"1"  then%>
<li><a href="Left.asp?Action=Product" target="I1">产品管理</a></li>
<%end if%>
<%if Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK900000000") then%>
<li><a href="Left.asp?Action=System" target="I1">系统管理</a></li>
<%end if%>
</div>

<!--菜单结束-->
</td>
        <td width="21"><img src="../images/main_37.gif" width="21" height="28" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
<noscript>
<iframe src="*.htm"></iframe>
</noscript>
<%Call CloseDB()%>
</html>