<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo SYS_CHARSET ?>">
<title>order list</title>
<link href="<?php echo SYS_ADMIN_STYLE_PATH ?>style/common.css" rel="stylesheet" type="text/css">
<link href="<?php echo SYS_ADMIN_STYLE_PATH ?>style/calendar.css" type="text/css" rel="stylesheet">
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/common.js"></script>
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/validate.js"></script>
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/calendar.js"></script>
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/calendar-setup.js"></script>
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/calendar-en.js"></script>
</head>

<body>
<table class="nav_table" cellpadding="0" cellspacing="0">	
	<tr>
		<td class="nav_td"><?php echo $layout['menu_nav'] ?></td>
	</tr>	
</table>
<table class="toolbar_table" cellpadding="0" cellspacing="0">
	<form name="editForm" method="post" action="">
	<tr>
		<td width="200">
		</td>
		<td class="toolbar_td"><?php echo $layout['toolbar'] ?></td>
	</tr>
	<input type="hidden" name="selectValue" id="selectValue" value="">
</form>
</table>

<div class="line_space"><img src="<?php echo SYS_ADMIN_STYLE_PATH ?>images/blank.gif"></div>
<table class="search_table" cellpadding="0" cellspacing="0">	
	<form name="searchForm" method="post" action="" >
	<tr>
		<td class="search_td">
            起止日期：
            <input type="text" name="begintime" id="begintime" class="input_text" size="10" value="<?php echo $layout['eifr_querys']['begintime'] ?>"> - 
            <input type="text" name="endtime" id="endtime" class="input_text" size="10" value="<?php echo $layout['eifr_querys']['endtime'] ?>">
            <script>
                function catcalc1(cal) {
                    document.getElementById("begintime").value = cal.date.print("%Y-%m-%d");
                }
                function catcalc2(cal) {
                    document.getElementById("endtime").value = cal.date.print("%Y-%m-%d");
                }
                Calendar.setup({
                    inputField: "begintime",
                    ifFormat:"%Y-%m-%d",
                    onUpdate:catcalc1,
                    showsTime:false
                });
                
                Calendar.setup({
                    inputField: "endtime",
                    ifFormat:"%Y-%m-%d",
                    onUpdate:catcalc2,
                    showsTime:false
                });
            </script>
			&nbsp;
            <select name="flag" class="input_select" >
                <option value="">-订单状态-</option>
                <?php echo $layout['list_flag'] ?>
            </select>
            <select name="is_delete" class="input_select" >
                <?php echo $layout['list_delete'] ?>
            </select>
			<input type="text" name="search_keyword" id="search_keyword" class="input_text_search" value="">
			<input type="submit" name="btn_search" class="btn_search" value="go"> &nbsp; &nbsp;
            共<?php echo $layout['total_num'] ?>件商品, &nbsp; 共<?php echo $layout['total_price'] ?>元
		</td>
	</tr>	
	<form>
</table>
<table class="list_tb" cellpadding="0" cellspacing="0">
<tr class="list_title_tr_bg">
<td width="5%" class="list_title_td" title="选择" align="center"><input type="checkbox" name="select_all" id="select_all" value="1" class="input_checkbox_all" onclick="selectAll('select_all','selectid')"></td>
<td width="15%" class="list_title_td">订单号</td>
<td width="10%" class="list_title_td">订单金额</td>
<td width="35%" class="list_title_td">商品名</td>
<td width="15%" class="list_title_td">订货人</td>
<td width="15%" class="list_title_td">下单时间</td>
<td width="5%" class="list_title_td">标记</td>
</tr>
<?php foreach($layout['eifr_pages']['list'] as $row): ?>
<tr class="list_sub_tr_bg" onMouseOver="this.className='list_mouseover_tr_bg'" onMouseOut="this.className='list_sub_tr_bg'" >
<td align="center" title="ID=<?php echo $row['id'] ?>"><input type="checkbox" name="selectid" value="<?php echo $row['id'] ?>" class="input_checkbox" ></td>
<td><?php echo $row['order_number'] ?></td>
<td><?php echo $row['total'] ?></td>
<td>
<?php foreach($clComOrder -> getArticlesByOrderNumber($row['order_number']) as $arow): if($arow):?>
<a href="<?php echo DIR_INSTALL.'article.php?id='.$arow['id'] ?>" target="_blank"><?php echo $arow['title'] ?></a><br />
<?php endif; endforeach; ?>
</td>
<td><?php echo $row['username'] ?></td>
<td><?php echo getDateTimeMk_YMD($row['addtime']) ?></td>
<td><?php echo $clComOrder->createFlagShow($row['flag']) ?></td>
</tr>
<?php endforeach; ?>
</table>               
<div class="pagenext_div"><?php echo $layout['eifr_pages']['page'] ?></div>
</body>
</html>
