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

widget( "fhead" );
include( $path_cache.DS."mod_b2b_Shared_fhead.php" );
echo "<body class=\"mainbg\">\r\n\t<div id=\"mainhearder\">";
echo "<s";
echo "pan>您的位置：经销商商户首页</span></div>\r\n\t<div id=\"defaulthearder\"><img src=\"";
echo $vd['content'];
echo "images/icon_ptsj.gif\" align=\"absbottom\" /></div>\r\n\t<table width=\"98%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n\t<tr>\r\n\t<td class=\"tableleft\">\r\n\t\t<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"table1\">\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";
				}
}
echo "    ";
if ( $tmp[14] == 1 )
{
				echo "\t\t<tr>\r\n\t\t<td width=\"22%\" width=\"22%\" height=\"30\" class=\"tableleft1\">下属客户数量：</td>\r\n\t\t<td width=\"78%\" width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=Underling\"><font color=#ff0000><u>";
				echo $vd['rs']['underling_sum'];
				echo "</u></font> 个</a></td>\r\n\t\t</tr>\r\n\t\t";
}
echo "\t\t";
if ( $tmp[5] == 1 )
{
				echo "\t\t<tr>\r\n\t\t<td width=\"22%\" height=\"30\" class=\"tableleft1\">今日转款金额：</td>\r\n\t\t<td width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=trade&tpl=history&tradetype=31,32\"><font color=#ff0000><u>";
				echo $vd['lang']['moneysymbol'];
				echo $vd['rs']['tran_sum'];
				echo "</u></font></a></td>\r\n\t\t</tr>\r\n\t\t";
}
echo "\t\t";
if ( $tmp[10] == 1 )
{
				echo "\t\t<tr>\r\n\t\t<td width=\"22%\" height=\"30\" class=\"tableleft1\">今日提成金额：</td>\r\n\t\t<td width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=trade&tpl=profit&tradetype=11\"><font color=#ff0000><u>";
				echo $vd['lang']['moneysymbol'];
				echo $vd['rs']['profit_sum'];
				echo "</u></font></a></td>\r\n\t\t</tr>\r\n\t\t";
}
echo "\t\t";
if ( $tmp[35] == 1 )
{
				echo "\t\t<tr>\r\n\t\t<td width=\"22%\" height=\"30\" class=\"tableleft1\">未处款汇款通知：</td>\r\n\t\t<td width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=Remit\"><font color=#ff0000><u>";
				echo $vd['rs']['remit_sum'];
				echo "</u></font> 条</a></td>\r\n\t\t</tr>\r\n\t\t";
}
echo "\t\t";
if ( $vd['custom'] == 1 )
{
				echo "\t\t";
				if ( $tmp[16] == 1 )
				{
								echo "\t\t<tr>\r\n\t\t<td width=\"22%\" height=\"30\" class=\"tableleft1\">未处理订单投诉：</td>\r\n\t\t<td width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=Complaint&&msgstate=1&msgdirect=1\"><font color=#ff0000><u>";
								echo $vd['rs']['complaint_sum'];
								echo "</u></font> 条</a></td>\r\n\t\t</tr>\r\n\t\t";
				}
				echo "\t\t";
				if ( $tmp[44] == 1 )
				{
								echo "\t\t<tr>\r\n\t\t<td width=\"22%\" height=\"30\" class=\"tableleft1\">今日商品销售额：</td>\r\n\t\t<td width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=AOrder&a=Simple&by=1\"><font color=#ff0000><u>";
								echo $vd['lang']['moneysymbol'];
								echo $vd['rs']['sell_sum'];
								echo "</u></font></a></td>\r\n\t\t</tr>\r\n\t\t";
				}
				echo "\t\t";
				if ( $tmp[44] == 1 )
				{
								echo "\t\t<tr>\r\n\t\t<td width=\"22%\" height=\"30\" class=\"tableleft1\">未代充订单数：</td>\r\n\t\t<td width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=AOrder&a=CzOrder&ptype=sd&ordstate=1&by=1\"><font color=#ff0000><u>";
								echo $vd['rs']['nodeal_sum'];
								echo "</u></font> 条</a></td>\r\n\t\t</tr>\r\n\t\t";
				}
				echo "\t\t";
				if ( $tmp[44] == 1 )
				{
								echo "\t\t<tr>\r\n\t\t<td width=\"22%\" height=\"30\" class=\"tableleft1\">销售卡密总数：</td>\r\n\t\t<td width=\"78%\" class=\"tableright1\"><a href=\"index.php?m=mod_agent&c=AOrder&&a=Simple&optype=km&by=1\"><font color=#ff0000><u>";
								echo $vd['rs']['kmsell_sum'];
								echo "</u></font> 张</a></td>\r\n\t\t</tr>\r\n\t\t";
				}
				echo "\t\t";
}
echo "\t\t</table>\r\n\t</td>\r\n\t</tr>\r\n\t</table>\r\n\t<br>\r\n\t<br>\r\n\t<div id=\"defaulthearder\"><img src=\"";
echo $vd['content'];
echo "images/icon_tjgg.gif\" align=\"absbottom\" /></div>\r\n\t<table width=\"98%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n\t<tr>\r\n\t<td class=\"tableleft\">\r\n\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"table1\">\r\n\t\t<tr>\r\n\t\t<td class=\"tjgg\">\r\n\t\t<div id=\"gg\">\r\n\t\t<ul>\r\n\t\t\t";
$i = 0;
foreach ( $vd['price'] as $a )
{
				echo "      <li>";
				echo "<s";
				echo "pan>";
				echo $this->DateFormat( $a['ndate'], "Y-m-d" );
				echo "</span><a href=\"";
				if ( $a['titlelink'] != "" )
				{
								echo $a['titlelink'];
								echo "\" target=\"_blank\"";
				}
				else
				{
								echo $vd['root'];
								echo "article/";
								if ( 0 < $vd['vip'] )
								{
												echo "?";
												echo $a['id'];
								}
								else
								{
												echo $a['id'];
												echo ".html";
								}
								echo "\" target=\"_blank\"";
				}
				echo " title=\"";
				echo $a['title'];
				echo "\"><font color=\"";
				echo $a['titlecolor'];
				echo "\">";
				subtext( $a['title'], 29 );
				echo "</font></a></li>\r\n      ";
				++$i;
}
echo "\t\t</ul>\r\n\t\t</div>\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t</table>\r\n\t</td>\r\n\t</tr>\r\n\t</table>\r\n\t<br>\r\n</body>\r\n</html>\r\n";
?>
