<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>直销商_头部</title>
<meta http-equiv="Content-Language" content="zh-CN">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="{$vd['content']}css/style.css" type="text/css">
<Script Language="JavaScript">
	function $(id){return document.getElementById(id);}
	function Div(ID,num){ 
		if(num==1){
			$(ID).style.display="";
		}else{
			$(ID).style.display="none";
		}
	}
</Script>
</head>
<body class="bg">
	<div id="id" class="csout" style="display:none" onMouseOver="Div('id',1)" onMouseOut="Div('id',0)">
		<div class="csmain">
			<!--$temp = explode('|', $vd['web']['tel']);if(isset($temp[0])){-->
			<!--$tmp = explode(',', $temp[0]);foreach($tmp as $item){-->
			<span>{$item}</span>&nbsp;&nbsp;
			<!--}}-->
			<br>
			<!--$temp = explode('|', $vd['web']['qq']);if(isset($temp[0])){-->
			<!--$tmp = explode(',', $temp[0]);foreach($tmp as $item){-->
			<a href=tencent://message/?uin={$item}&Site={$vd['web']['webname']}&Menu=yes><img border='0' SRC=http://wpa.qq.com/pa?p=1:{$item}:4 align='absmiddle'>{$item}</a>&nbsp;&nbsp;
			<!--}}-->
		</div>
		<div class="csright"></div>
	</div>
	<div id="top">
		<?php
    $tmp = array();
    if(isset($vd['agent'][9]) && $vd['agent'][9] > 0)
    {
      $staffrights = $vd['agent'][11];
      $tmp = explode(',',$staffrights);
    }
    else
    {
    	for($i = 0; $i < 80; $i++)
    	{
    		$tmp[$i] = '1';
    	}
    }
    
    $topinfo = array(
      array(
      'id'   => 4,
      'txt' => '提成转余额',
      'url'  => 'index.php?m=mod_agent&c=funds&a=detail'
      ),
      array(
      'id'   => 10,
      'txt' => '销售提成',
      'url'  => 'index.php?m=mod_agent&c=trade&tpl=profit&tradetype=11'
      ),
      array(
      'id'   => 9,
      'txt' => '划款给下级',
      'url'  => 'index.php?m=mod_agent&c=funds&a=tran'
      ),
      array(
      'id'   => 30,
      'txt'  => '价格管理',
      'url'  => 'index.php?m=mod_b2b&c=Price'
      ),
      array(
      'id'   => 14,
      'txt' => '档案管理',
      'url'  => 'index.php?m=mod_agent&c=underling',
      )
    );
    ?>
		<div id="topleft"><span><img src="{$vd['content']}images/jxslogo.gif"></span></div>
		<div id="topright">
			<div id="nav" >
				<ul>
					<!--$i=1;$len=count($topinfo);foreach($topinfo as $topitem){-->
					<!--if($tmp[$topitem['id']] == 1){-->
					<li style="float:right" <!--if($i==1){--> class="end"<!--$i=0;}-->><a href="{$topitem['url']}" target="main">{$topitem['txt']}</a></li>
					<!--}-->
					<!--}-->
					<li style="float:right"><a href="{$vd['root']}index.php?m=mod_b2b&c=Dealer&a=home" target="main">首页</a></li>
				</ul>
			</div>
		</div>
	</div>
	
	<div id="mebinfobg">
		<div id="mebinfo">您好，{$vd['agent'][1]}：<!--if($tmp[4]==1 ){--><b>冻结款：<span class="ye1">{$vd['lang']['moneysymbol']}{$vd['frozen']}</span></b>　<!--}--><!--if($tmp[18]==1 ){--><a href="index.php?m=mod_agent&c=Messenger" target="main"><b>未读短信：<span class="ye1" id="msgn">0</span> 条</b></a>　<!--}--><a href="index.php?m=mod_b2b&c=Frame" target="_top"><span class="jxs">转直销商系统</span></a>　<a href="{$vd['root']}index.php?m=mod_b2b&a=logout" target="_top"><span class="exit">退出</span></a>　<a href="#" onMouseOver="Div('id',1)" onMouseOut="Div('id',0)"><img src="{$vd['content']}images/icon_cs.gif" border="0"></a></div>
	</div>
	<script type="text/javascript">
		function MsgAlert(){
      var xmlhttptop;
      var obj = $("msgn");
      var content = "错误！"
      try{
        xmlhttptop=new XMLHttpRequest();
      }
      catch(e){
        xmlhttptop=new ActiveXObject("Microsoft.XMLHTTP");
      }
      xmlhttptop.onreadystatechange=function(){
        if (xmlhttptop.readyState==4){
          if (xmlhttptop.status==200){
            var data=xmlhttptop.responseText;
            obj.innerHTML = data;
            if(data > 0)
            {
            	alert("您有" + data + "条未读短信息？");
            	mainobj  = document.all ? window.parent.frames["main"] : window.parent.document.getElementById("main").contentWindow;
              mainobj.location.href="index.php?m=mod_agent&c=Messenger";
            }
          }
        }
      }
      xmlhttptop.open("post", "{$vd['root']}index.php?m=mod_b2b&c=Frame&a=Msg", true);
      xmlhttptop.setRequestHeader('Content-type','application/x-www-form-urlencoded');
      xmlhttptop.send('');
    }
    MsgAlert();
    setInterval(MsgAlert, 60000);
	</script>
</body>
</html>
