<!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>vodcms.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../../images/admin/public.css" rel="stylesheet" type="text/css" />
<link href="../../images/admin/style.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->basedir;?>js/jquery.js" language="javascript"></script>
<script language="javascript">
function show(v){
	if (v == 0){
		$('#pt').show();
		$('#lifetime').hide();
	}else if(v == 1){
		$('#lifetime').show();
		$('#pt').hide();
	}else{
		$('#pt').hide();
		$('#lifetime').hide();
	}
}
function checkSubmit(){
	var obj = document.form1;
	if (obj.usertype.value == 'all'){
		alert('请选择消费类型!');
		obj.usertype.focus();
		return false;
	}
	if (obj.usergroup.value == 'all'){
		alert('请选择权限组!');
		obj.usergroup.focus();
		return false;
	}
	if (obj.usertype.value == 1){
		var day = obj.days.value;
		var re  = /(\d+)/g;
		if (!re.exec(day)){
			alert('请填写观看时间!必须为数字!');
			return false;
		}
	}else{
		var point = parseInt(obj.point.value);
		var re = /(\d+)/g;
		if (!re.exec(point)){
			alert('请填写点数!必须为数字!');
			return false;
		}
	}
	return  true;
}
</script>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr align="center" valign="top">
    <td width="*" align="center" valign="top"><!-- ######### begin ######### -->
      <div class="Block">
        <div class="BlockBar">订单统计报表</div>
        <table cellspacing="1" cellpadding="4" class="tab">
          <form id="form1" name="form1" method="post" action="<?php echo $this->installdir;?>case/set/" onsubmit="return checkSubmit();">
            <tr class="sub">
              <td class="align-center">年/月</td>
              <td class="align-center">订单数</td>
              <td class="align-center">成功订单</td>
              <td class="align-center">未成功订单</td>
              <td class="align-center">金额/总金额</td>
            </tr>
            <?php
			foreach($this->reports as $row){?>
            <tr class="row align-center"">
              <td width="14%" ><?php echo $row['d'];?></td>
              <td><?php echo $row['f']+$row['u'];?></td>
              <td><?php echo $row['u'];?></td>
              <td><?php echo $row['f'];?></td>
              <td><?php echo $row['price2'];?>/<?php echo $row['price2'] + $row['price1'];?></td>
            </tr>
            <?php
			}?>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><?php echo $this->printpage;?></td>
              </tr>
            </table>
          </form>
        </table>
      </div></td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>
