<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Keywords" content="{$vd['web']['keywords']}" />
<meta http-equiv="Description" content="{$vd['web']['description']}" />
<title>{$vd['web']['title']}</title>
<script language="javascript">
function openScript(url,name,width,height)
{
var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no');
}
</script>

<style type="text/css">
*{margin:0;padding:0;}
body{font-family: Arial,sans-serif;color: #333;line-height: 130%;	margin: 0px;padding: 0px;font-size:12px;}
td{line-height:130%;padding:0px;height:30px}
body,tr,td,th,tbody,thead,tfoot{font-family: Arial,sans-serif,Verdana,宋体;color:#666;font-size:12px;}
.left_content_td
{
BACKGROUND-POSITION: 50% bottom;
BACKGROUND-IMAGE: url(images/bg.gif);
BACKGROUND-REPEAT: repeat-x
}
.cardno
{
FONT-WEIGHT: bold;
FONT-SIZE: 13px;
COLOR: #333333;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</style>
<!--$str='';$order = $vd['order']['item'];-->
<script language="jscript">
function convertCurrency(currencyDigits) 
{
  var MAXIMUM_NUMBER = 99999999999.99;
  var CN_ZERO = "零";
  var CN_ONE = "壹";
  var CN_TWO = "贰";
  var CN_THREE = "叁";
  var CN_FOUR = "肆";
  var CN_FIVE = "伍";
  var CN_SIX = "陆";
  var CN_SEVEN = "柒";
  var CN_EIGHT = "捌";
  var CN_NINE = "玖";
  var CN_TEN = "拾";
  var CN_HUNDRED = "佰";
  var CN_THOUSAND = "仟";
  var CN_TEN_THOUSAND = "万";
  var CN_HUNDRED_MILLION = "亿";
  var CN_SYMBOL = "";
  var CN_DOLLAR = "{$vd['lang']['moneyunit']}";
  var CN_TEN_CENT = "角";
  var CN_CENT = "分";
  var CN_INTEGER = "整";
   
  var integral;
  var decimal;
  var outputCharacters;
  var parts;
  var digits, radices, bigRadices, decimals;
  var zeroCount;
  var i, p, d;
  var quotient, modulus;
   
   currencyDigits = currencyDigits.toString();
   if (currencyDigits == "") {
     alert("Empty input!");
     return "";
   }
   if (currencyDigits.match(/[^,.\d]/) != null) {
     alert("Invalid characters in the input string!");
     return "";
   }
   if ((currencyDigits).match(/^((\d{1,3}(,\d{3})*(.((\d{3},)*\d{1,3}))?)|(\d+(.\d+)?))$/) == null) {
     alert("Illegal format of digit number!");
     return "";
   }
   
   currencyDigits = currencyDigits.replace(/,/g, "");
   currencyDigits = currencyDigits.replace(/^0+/, "");
   if (Number(currencyDigits) > MAXIMUM_NUMBER) {
     alert("Too large a number to convert!");
     return "";
   }
   
   parts = currencyDigits.split(".");
   if (parts.length > 1) {
     integral = parts[0];
     decimal = parts[1];
     decimal = decimal.substr(0, 2);
   }
   else {
     integral = parts[0];
     decimal = "";
   }
   digits = new Array(CN_ZERO, CN_ONE, CN_TWO, CN_THREE, CN_FOUR, CN_FIVE, CN_SIX, CN_SEVEN, CN_EIGHT, CN_NINE);
   radices = new Array("", CN_TEN, CN_HUNDRED, CN_THOUSAND);
   bigRadices = new Array("", CN_TEN_THOUSAND, CN_HUNDRED_MILLION);
   decimals = new Array(CN_TEN_CENT, CN_CENT);
   outputCharacters = "";
   if (Number(integral) > 0) 
   {
     zeroCount = 0;
     for (i = 0; i < integral.length; i++) 
     {
     p = integral.length - i - 1;
     d = integral.substr(i, 1);
     quotient = p / 4;
     modulus = p % 4;
     if (d == "0") 
     {
       zeroCount++;
     }
     else 
     {
       if (zeroCount > 0)
       {
         outputCharacters += digits[0];
       }
       zeroCount = 0;
       outputCharacters += digits[Number(d)] + radices[modulus];
     }
     
     if (modulus == 0 && zeroCount < 4) 
     {
       outputCharacters += bigRadices[quotient];
     }
     }
     outputCharacters += CN_DOLLAR;
  }
  
  if (decimal != "") {
    for (i = 0; i < decimal.length; i++) 
    {
      d = decimal.substr(i, 1);
      if (d != "0")
      {
        outputCharacters += digits[Number(d)] + decimals[i];
      }
    }
  }
  if (outputCharacters == "") 
  {
    outputCharacters = CN_ZERO + CN_DOLLAR;
  }
  if (decimal == "") 
  {
    outputCharacters += CN_INTEGER;
  }
  
  outputCharacters = CN_SYMBOL + outputCharacters;
  return outputCharacters;
}
</script>
<head>
<body onload="buymoney1.innerHTML=convertCurrency(buymoney.value);">
<div align="center"> 
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr> 
  <td height=20 width="50%" ><b>打印日期：</b><!--echo date("Y-m-d H:i:s");--></td>
  <td> 
    <div align="right"><b>销售商：</b>{$vd['web']['webname']}</div>
  </td>
</tr>
<tr> 
<td height=20 colspan="2"> 
  <table width="100%" border="0" cellspacing="1" cellpadding="6" bgcolor="#acacac">
    <tr bgcolor="#FFFFFF"> 
      <td bgcolor="#F7F7F7" width="15%"> 
        <div align="center">点卡名称：</div>
      </td>
      <td width="35%">{$order['pname']}</td>
      <td bgcolor="#F7F7F7" width="15%"> 
        <div align="center">点卡面值：</div>
      </td>
      <td width="35%">{$vd['lang']['moneysymbol']}{$order['listprice']}{$vd['lang']['moneyunit']}</td>
    </tr>
    <tr height=20 bgcolor="#FFFFFF"> 
      <td bgcolor="#F7F7F7" width="15%"> 
        <div align="center">购买数量：</div>
      </td>
      <td width="35%"><strong>{$order['qty']}</strong> 个</td>
      <td bgcolor="#F7F7F7" width="15%"> 
        <div align="center">购买单价：</div>
      </td>
      <td width="35%">{$vd['lang']['moneysymbol']}{$order['buyerprice']} {$vd['lang']['moneyunit']}</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height=20 bgcolor="#F7F7F7" width="15%"> 
      <div align="center">购买金额：</div>
      </td>
      <td width="35%">{$vd['lang']['moneysymbol']}<input type="text" name="buymoney" size="2" style="border: #ffffff 0px solid" value="<!--echo round($order['buyerprice'] * $order['qty']);-->">{$vd['lang']['moneyunit']}</td>
      <td bgcolor="#F7F7F7" width="15%"> 
      <div align="center">金额大写：</div>
      </td>
      <td width="35%"><span  id="buymoney1"></span></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height=20 bgcolor="#F7F7F7" width="15%"> 
      <div align="center">充值方法：</div>
      </td>
      <td colspan="3"> 
      <div align="left">{$order['czweb']}</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height=20 bgcolor="#F7F7F7" width="15%"> 
      <div align="center">客户服务：</div>
      </td>
      <td colspan="3"> 
      <div align="left"></div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height=20 bgcolor="#F7F7F7" colspan="4"> 
      <div align="left">　购买内容：</div>
      </td>
    </tr>
    <!--if($order['ptype']==1 || $order['ptype']==2){-->
    <!--if($order['failreason']!=''){-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">充值说明：</td>
      <td colspan=3 align="left" style="color:#ff0000"><!--if($order['ordstate'] == -1) {-->{$order['failreason']}<!--}--></td>
    </tr>
    <!--}-->
    
    <!--if($order['factoryreturn']!=''){-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">厂家反馈：</td>
      <td colspan=3 align="left" style="color:#0000ff">{$order['factoryreturn']}</td>
    </tr>
    <!--}-->
    
    <!--if($order['ptype'] == 0 || $order['ptype'] > 99){-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">充值网址：</td>
      <td colspan=3 align="left"><a href="{$order['czweb']}" target="_blank">{$order['czweb']}</a>&nbsp;</td>
    </tr>
    <!--}-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">游戏用户名：</td>
      <td colspan=3 align="left">{$order['czaccount']}</td>
    </tr>
    
    <!--if($order['czarea1'] != ''){-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">充值区域：</td>
      <td colspan=3 align="left">{#CzText($order['czarea1'])}</td>
    </tr>
    <!--}-->
    
    <!--if($order['czarea2'] != ''){-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">充值服务器：</td>
      <td colspan=3 align="left">{#CzText($order['czarea2'])}</td>
    </tr>
    <!--}-->
    
    <!--if($order['cztype'] != ''){-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">计费方式：</td>
      <td colspan=3 align="left">{#CzText($order['cztype'])}</td>
    </tr>
    <!--}-->
    
    <!--if($order['czother'] != ''){-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">帐号类型：</td>
      <td colspan=3 align="left">{#CzText($order['czother'])}</td>
    </tr>
    <!--}-->
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">充值结果：</td>
      <td colspan=3 align="left"><font color="#ff0000"><b>
      	<!--if($order['ordstate'] == -1) {-->
     	充值失败，<!--if($order['rollback'] == 1) {-->已经退还余额，<!--}-->
     	<!--}-->
     	<!--if($order['ordstate'] == 1) {-->
     	已经提交系统充值<br/>
     	<!--}-->
     	<!--if($order['ordstate'] == 2) {-->
     	已经充值成功
     	<!--}-->
      	</b></font></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height=20 bgcolor="#F7F7F7" width="15%">充值时间：</td>
      <td colspan=3 align="left">{$order['dealdate']}</td>
    </tr>
    <!--}else{-->
    <tr bgcolor="#FFFFFF"> 
      <td bgcolor="#FFFFFF" colspan="4"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
  
        <tr bgcolor="#EEEEEE"> 
          <td bgcolor="#EEEEEE" height="20" width="40%"> 
          <div align="center">点卡卡号</div>
          </td>
          <td bgcolor="#EEEEEE" height="20" width="40%"> 
          <div align="center">点卡密码</div>
          </td>
          <td bgcolor="#EEEEEE" height="20" width="20%"> 
          <div align="center">到期时间</div>
          </td>
        </tr>
        <!--foreach($vd['order']['carditem'] as $card) {-->
        <tr> 
          <td height="25" class="left_content_td"> 
          <div align="center"><span class="cardno">{$card['cardnumber']}</span></div>
          </td>
          <td height="25" class="left_content_td"> 
          <div align="center"><span class="cardno">{$card['cardpwd']}</span></div>
          </td>
          <td height="25" class="left_content_td"><div align="center"><span class="cardno"></span></div></td>
        </tr>
        <!--}-->
      </table>
      </td>
    </tr>
    <!--}-->
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2" valign="top"> 
      <div align="left"  style="padding:3px;">欢迎下次到本店来购买点卡，本店点卡齐全，价格优惠，欢迎惠顾！！我们将一如既往地提供优质服务，敬请光临！</div>
      </td>
      <td colspan="2"> 
      <div align="left"  style="padding:3px;">地址：{$vd['web']['address']}<br>
      名称：{$vd['web']['webname']}<br>
      电话：{$vd['web']['tel']}<br>
      网址：{$vd['web']['website']}</div>
      </td>
    </tr>
  </table>
</td>
</tr>
<tr> 
<td colspan=2 height=30>
	<div align=center>
		<input type="button" name="buyagain" value="确认打印本页" style='font-weight:bold;font-size:14px' class="button" onclick="javascript:print();"> 
		<input type="button" style='font-weight:bold;font-size:14px'  value="关闭" onclick="javascript:window.close();">
	</div>
</td>
</tr>
</table>
</div>
</body>
</html>
