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

if ( request( "keywords" ) == "" )
{
				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<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"/>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"";
				echo $vd['sc'];
				echo "css/main.css\"/>\r\n</head>\r\n<body>\r\n\r\n<div id=\"titleDiv\">\r\n<div style=\"float:left\"><a href=\"index.php?a=Home\"><img src=\"";
				echo $vd['sc'];
				echo "images/home.png\" style=\"vertical-align:middle\" border=\"0\"/></a></div><div style=\"float:left;padding-top:8px;padding-left:3px;\"><a href=\"index.php?a=Home\" title=\"回到后台首页\"><font color=\"#000\">桌面</font></a> ";
				echo "<s";
				echo "pan style=\"font-size:7px;\">>></span> 一卡通状态查询</div>\r\n<div style=\"float:right;\"><a href=\"index.php?m=mod_home&a=Help&t=admin_b2b_ykt_index\" onFocus=\"this.blur()\" title=\"查看标签相关帮助\"><img src=\"";
				echo $vd['sc'];
				echo "images/help.gif\" style=\"vertical-align:middle\" border=\"0\"/></a></div>\r\n</div>\r\n<form id=\"cform\" method=\"get\" action=\"index.php\">\r\n<div id=\"content\" class=\"cwarpper\">\r\n<div class=\"cbodyHead\"></div>\r\n<div class=\"cwarpper1\">\r\n<div class=\"ctitle\">一卡通状态查询</div>\r\n<table border=\"1\" id=\"ctable1\" class=\"ctable\" bordercolor=\"#86B9D6\">\r\n  <tr>\r\n    <td class=\"tablelt\">一卡通卡号</td>\r\n    <td class=\"tablert\"><input t";
				echo "ype=\"text\" name=\"keywords\" size=\"25\" value=\"\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\"\" style=\"height:80px\"></td>\r\n    <td class=\"tablert\">\r\n      <input type=\"submit\" value=\"查询一卡通状态\" class=\"button\"/>\r\n      <input type=\"reset\" value=\"重 置\"  class=\"button\"/>\r\n    </td>\r\n  </tr>\r\n</table>\r\n<input type=\"hidden\" value=\"mod_b2b\" name=\"m\" id=\"m\"/>\r\n<input type=\"hidden\" value=\"state\" name=\"a\" id=\"a\"/";
				echo ">\r\n<input type=\"hidden\" value=\"trade\" name=\"c\" id=\"c\"/>\r\n<input type=\"hidden\" value=\"1\" name=\"tradestate\" id=\"tradestate\"/>\r\n</div>\r\n<div class=\"cbodyFoot\"></div>\r\n</div>\r\n<div id=\"opcontent\" style=\"display:none\">\r\n  <div class=\"optxt\">\r\n  </div>\r\n</div>\r\n</form>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n  sc = \"";
				echo $vd['sc'];
				echo "\";\r\n  var ctablenum = 2;\r\n</script>\r\n";
				echo "<s";
				echo "cript src=\"";
				echo $vd['sc'];
				echo "js/content.js\" type=\"text/javascript\"></script>\r\n</body>\r\n</html>\r\n";
}
else
{
				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<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"/>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"";
				echo $vd['sc'];
				echo "css/main.css\"/>\r\n</head>\r\n<body>\r\n\r\n<div class=\"titleDiv\" id=\"titleList\">\r\n<div style=\"float:left\"><a href=\"index.php?a=home\"><img src=\"";
				echo $vd['sc'];
				echo "images/home.png\" style=\"vertical-align:middle\" border=\"0\"/></a></div><div style=\"float:left;padding-top:8px;padding-left:3px;\"><a href=\"index.php?a=home\" title=\"回到后台首页\"><font color=\"#000\">桌面</font></a> ";
				echo "<s";
				echo "pan style=\"font-size:7px;\">>></span> ";
				echo "<s";
				echo "pan style=\"font-size:12px;\">卡状态查询</span></div>\r\n</div>\r\n<div class=\"mytitle\" id=\"mytitle\">\r\n  <div style=\"float:left;padding-top:10px;padding-left:10px;\">\r\n  ";
				if ( request( "keywords" ) == "" )
				{
								echo "  <font color=\"#ff0000\">请输入您要查询的一卡通</font>\r\n  ";
				}
				else
				{
								echo "  当前卡号：<a href=\"index.php?m=mod_b2b&c=trade&a=state&keywords=";
								echo $vd['cardnumber'];
								echo "\" title=\"重新查看卡状态\">";
								echo $vd['cardnumber'];
								echo "</a>  当前卡余额：<font color=\"#ff0000\"><b>";
								echo $vd['card']['money'];
								echo "</b></font> ";
								echo $vd['lang']['moneyunit'];
								echo " 卡面值：<font color=\"#ff0000\">";
								echo $vd['card']['price'];
								echo "</font> ";
								echo $vd['lang']['moneyunit'];
								echo " 卡售价：<font color=\"#ff0000\">";
								echo $vd['card']['cprice'];
								echo "</font> ";
								echo $vd['lang']['moneyunit'];
								echo "  ";
				}
				echo "  </div>\r\n  <div style=\"float:right;padding-top:4px;\">\r\n    <form action=\"index.php?m=mod_b2b&c=trade&a=state\" method=\"post\" style=\"margin:0px 0px 0px 0px;\" onsubmit=\"return searchSubmit()\">\r\n    <input type=\"text\" name=\"keywords\" size=\"16\" value=\"\" style=\"vertical-align:middle;\" class=\"custsearch\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMou";
				echo "seOut=\"iEvent('mouseout',this)\" />\r\n    ";
				echo "<s";
				echo "elect name=\"tradestate\" style=\"vertical-align:middle;font-size:14px;\">\r\n      <option value=\"1\" ";
				if ( $vd['tradestate'] == 1 )
				{
								echo "selected";
				}
				echo ">全部状态</option>\r\n      <option value=\"0\" ";
				if ( $vd['tradestate'] == 0 )
				{
								echo "selected";
				}
				echo ">有效状态</option>\r\n    </select>\r\n    <input type=\"submit\" value=\" 卡状态查询 \" style=\"vertical-align:middle;\" class=\"button\"/>\r\n    </form>\r\n  </div>\r\n</div>\r\n<div id=\"tip\" style=\"display:none\">\r\n  ";
				echo "<s";
				echo "pan id=\"tiptable\">此页中所有 <b>";
				echo "<s";
				echo "pan id=\"ncheck\"></span></b> 条记录已选中 </span> \r\n  ";
				echo "<s";
				echo "pan id=\"tipspan\">\r\n    <a href=\"javascript:CheckTotle(1,0)\">点此选择当前列表中所有 <b></b> 条记录>></a>\r\n  </span>\r\n</div>\r\n<table id=\"thead\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td width=\"30px\">\r\n      <input name=\"chkall\" disabled id=\"chkall\" type=\"checkbox\" class=\"checkbox\" onclick=\"CheckAll(this)\" onFocus='this.blur()'/></td>\r\n    <td width=\"250px\"><b>说明</b></td>\r\n    <td width=\"80px\" a";
				echo "lign=\"center\"><b>支出(";
				echo $vd['lang']['moneyunit'];
				echo ")</b></td>\r\n    <td width=\"80px\" align=\"center\"><b>收入(";
				echo $vd['lang']['moneyunit'];
				echo ")</b></td>\r\n    <td width=\"80px\" align=\"center\"><b>交易后(";
				echo $vd['lang']['moneyunit'];
				echo ")</b></td>\r\n    <td width=\"140px\" align=\"center\"><b>时间</b></td>\r\n    <td width=\"35px\" align=\"center\"><b>状态</b></td>\r\n    <td width=\"22px\"><img src=\"";
				echo $vd['sc'];
				echo "images/icon_edit.gif\"/></td>\r\n    <td class=\"endtd\">\r\n      <div class=\"infoicon\" style=\"color:#cccccc\"><b><u>>></u></b></div>\r\n    </td>\r\n  </tr>\r\n</table>\r\n<div id=\"content\">\r\n  ";
				if ( count( $vd['items'] ) == 0 )
				{
								echo "  <table  width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td align=\"right\" colspan=\"20\">无任何记录</td>\r\n  </tr>\r\n  </table>\r\n  ";
				}
				echo "  <form id=\"cform\" name=\"form\" method=\"post\" action=\"index.php?m=mod_b2b&c=trade&a=ItemDeal\" onsubmit=\"return Check();\">\r\n  <table id=\"tbody\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  ";
				foreach ( $vd['items'] as $item )
				{
								echo "  <tr onmouseover=\"setoverbg(this)\" onmouseout=\"setoutbg(this)\">\r\n    <td width=\"30px\">\r\n      <input type=\"checkbox\" disabled name=\"id[]\" id=\"idchk_";
								echo $item['tid'];
								echo "\" class=\"checkbox\" value=\"";
								echo $item['tid'];
								echo "\" onclick=\"CheckThis(this)\" onFocus='this.blur()'></input>\r\n    </td>\r\n    <td width=\"250px\"><nobr>";
								echo "<s";
								echo "amp title=\"";
								echo $item['content'];
								echo "\">";
								echo $item['content'];
								echo "</samp><nobr/></td>\r\n    <td width=\"80px\" align=\"center\"> - ";
								echo $item['outcome'];
								echo "</td>\r\n    <td width=\"80px\" align=\"center\"> + ";
								echo $item['income'];
								echo "</td>\r\n    <td width=\"80px\" align=\"center\">";
								echo $item['fat'];
								echo "</td>\r\n    <td width=\"140px\" >";
								echo $item['createdate'];
								echo "</td>\r\n    <td width=\"35px\" >";
								if ( $item['state'] == -1 )
								{
												echo "<font color=\"#cccccc\">无效</font>";
								}
								else
								{
												echo "有效";
								}
								echo "</td>\r\n    <td width=\"22px\">\r\n      ";
								if ( $item['tradetype'] == 100 )
								{
												echo "<a href=\"index.php?m=mod_b2b&c=order&a=detail&ubzordno=";
												echo $item['ordno'];
												echo "\"><img src=\"";
												echo $vd['sc'];
												echo "images/icon_edit.gif\"/></a>";
								}
								else
								{
												echo "<font color=\"#cccccc\">无</font>";
								}
								echo "    </td>\r\n    <td class=\"endtd\" colspan=\"21\" ></td>\r\n  </tr>\r\n  ";
				}
				echo "</table>\r\n</form>\r\n<input type=\"hidden\" value=\"1\" id=\"totlePage\"/>\r\n<input type=\"hidden\" value=\"1\" id=\"thisPage\"/>\r\n</div>\r\n\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=trade&a=state&keywords=";
				echo urlencode( getvar( "keywords" ) );
				echo "\" id=\"url\"/>\r\n<input type=\"hidden\" value=\"";
				echo $vd['op'];
				echo "\" id=\"params\"/>\r\n<div style=\"display:none;bottom:0px\">\r\n  <div class=\"tbBottom\" id=\"tbBottom\">\r\n    <div style=\"float:left;padding-top:8px;\">\r\n      ";
				echo "<s";
				echo "trong> 总计 <font color=\"#ff0000\">";
				echo "<s";
				echo "pan id=\"tol2\"></span></font> 条</strong>\r\n    </div>\r\n    <div style=\"float:right;text-align:right;\">\r\n    <div id=\"page\"></div>\r\n    </div>\r\n  </div>\r\n</div>\r\n<div id=\"load\" style=\"display:none;\">\r\n  <div id=\"loadcontent\" >页面加载中请稍等...</div>\r\n</div>\r\n</body>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n//第一参数，后边保留显示的列数\r\n//第二参数，除最后一个参数外的保留参数的总宽度\r\ntRows   = ";
				echo count( $vd['items'] );
				echo ";\r\ntInfoA  = Array(0,0);\r\ntotleRows = ";
				echo count( $vd['items'] );
				echo ";\r\ndeltxt  = \"销毁订单将无法恢复,您确定进行销毁操作吗？\";\r\nthisaction = \"销毁\";\r\nthisdel = 0;\r\nonedel  = 0;\r\nsc = \"";
				echo $vd['sc'];
				echo "\";\r\nstatistics = 0;\r\nvar resizeidx = 1;\r\n</script>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n//当前表格配置\r\n";
				echo " tInfo = Array();\n";
				echo "</script>\r\n";
				echo "<s";
				echo "cript src=\"";
				echo $vd['sc'];
				echo "js/tools.js\" type=\"text/javascript\"></script>\r\n</html>\r\n";
}
?>
