<?php
/****************************************/
/*                                      */
/*  百信卡盟平台联系QQ:84945491         */
/*  淘宝店 http://shop70674652.taobao.com  */
/*  百信卡盟 http://www.caipiaobus.com  */
/*                                      */
/****************************************/

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