<!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=utf-8">
<title>{echo: lp{m_u_center};/}</title>
<link rel="stylesheet" type="text/css" href="skin/{echo: $SYSINFO['templates'];/}/css/modules.css">
<link rel="stylesheet" type="text/css" href="skin/{echo: $SYSINFO['templates'];/}/css/layout.css">
<link rel="stylesheet" type="text/css" href="skin/{echo: $SYSINFO['templates'];/}/css/style.css">
<script type="text/javascript" src="skin/{echo: $SYSINFO['templates'];/}/js/userchangeStyle.js"></script>
<script type="text/javascript" src="skin/{echo: $SYSINFO['templates'];/}/js/changeStyle.js"></script>
<style type="text/css">
th{background:#EFEFEF}
.edit span{background:#efefef;}
.search {margin:5px; height:20px; background:#fff; width:90%; padding-left:0px;}
.search input {color:#444;}
td.img img{cursor:pointer;}
td div.goodsname{line-height:18px; height:36px; font-weight:bold;}
td span.category{color:#FF6600;}
</style>
</head>
<body onload="menu_style_change('user_group');changeMenu();">
	{inc: require("shop/index_header.php");/}
	<div class="site_map">
	  {echo:lp{m_current_position};/}<A href="index.php">{echo:$SYSINFO['sys_name'];/}</A>/<a href="modules.php">{echo:lp{m_u_center};/}</a>/&nbsp;&nbsp;{echo:lp{m_my_cart};/}
	</div>
    <div class="clear"></div>
    {inc: require("modules/left_menu.php");/}
        <div class="main_right">
        	<div class="right_top"></div>
            <div class="cont">
                <div class="cont_title">{echo: lp{m_group_list};/}</div>
                <hr />
                
                <form action="do.php?act=goods_list" method="post" onsubmit="return submitform();">
                    <table width="100%" border="0" cellspacing="0">
                        <tr>
<!--                            <th width="20"><input type="checkbox" name="c" value="" onclick="checkall(this)" /></th>-->
                            <th width="82"></th>
                            <th>{echo: lp{m_group_name};/}</th>
                            <th width="80">{echo: lp{m_group_status};/}</th>
                            <th width="100">{echo: lp{m_start_time};/}</th>
                            <th width="140">{echo: lp{m_order_num};/}</th>
                            <th width="130">{echo: lp{m_manage};/}</th>
                        </tr>
                        {sta:if(!empty($result['result'])) {
                            foreach($result['result'] as $v) [loop]}
                        <tr class="trcolor">
<!--                            <td><input type="checkbox" name="checkbox[]" value="{echo: $v['goods_id'];/}" /></td>-->
                            <td class="center"><a href="goods.php?app=groupbuyinfo&id={echo: $v['group_id'];/}" target="_blank"><img src="{echo: $v['goods_thumb'];/}" width="80" height="80" onerror="this.src='skin/default/images/nopic.gif'"/></a></td>
                            <td ><h3><a href="goods.php?app=groupbuyinfo&id={echo: $v['group_id'];/}" target="_blank">{echo: $v['group_name'];/}</a></h3>
                            <p>[{echo:lp{s_groupbuy_shows};/}]&nbsp;&nbsp;&nbsp;{echo: sub_str($v['group_desc'],70,false);/}</p></td>
                            <td class="center">{sta:if($v['recommended']==0){ if($v['start_time']<= $now_time and $v['end_time'] >= $now_time) { echo lp{m_ing}; } if($v['start_time']>= $now_time) { echo lp{m_no_published}; } if($v['end_time']<= $now_time) { echo lp{m_end}; } } else{ echo lp{m_end}; if/}</td>
                            <td class="center">{echo:lp{m_from};/}{echo:$v['start_time'];/}<br />{echo: lp{m_to};/}{echo:$v['end_time'];/}</td>
                            <td class="center">{echo:$v['purchase_num'];/}/{echo:$v['min_quantity'];/}</td>
                            <td class="center">
                            
                            {sta:if($v['lock_flg']=='1') { ;/}
								<font color='red'>{echo: lp{m_other_shop_lock};/}</font>
							{sta:} elseif($v['open_flg']=='1') { ;/}
								<font color='red'>{echo: lp{m_other_shop_close};/}</font>
							{sta:} else [exc]}
							
                            {sta:if($v['log_type']=='0'&&($v['recommended']==1 or $v['end_time']<= $now_time)) [exc]}
                             <!--    <a href="modules.php?app=user_order_groupbuy&gid={echo: $v['group_id'];/}">{echo: lp{m_order};/}</a> -->
                             <a href="modules.php?app=user_group_order_address&gid={echo: $v['group_id'];/}">{echo: lp{m_order};/}</a>
                                {sta: } else [exc]}
                                {echo: lp{m_order_not_end};/}
                            {end:if/}
                            {end:if/}
                            </td>
                        </tr>
                        {end:foreach/}
                        <tr><td colspan="6"><div class="page">{inc: require("modules/page.php");/}</div></td></tr>
                        {sta: } else [exc]}
                        <tr><td colspan="6" class="center">{echo: lp{m_nogoods_list};/}</td></tr>
                        {end:if/}
                        
                    </table>
                </form>

            </div>
			<div class="clear"></div>
			<div class="right_bottom"></div>
			<div class="back_top"><a href="#"></a></div>
        </div>
{inc: require("shop/index_footer.php");/}
<script language="JavaScript" src="servtools/ajax_client/ajax.js"></script>
<script language="JavaScript">
<!--
var inputs = document.getElementsByTagName("input");
function submitform() {
	var status = document.getElementsByName("checkbox");
	var checknum = 0;
	for(var i=0; i<inputs.length; i++) {
		if(inputs[i].type=='checkbox') {
			if(inputs[i].checked) {
				checknum++;
			}
		}
	}
	if(checknum==0) {
		alert("{echo: lp{m_selceted_one};/}");
		return false;
	}
	return true;
}

function checkall(obj) {
	if(obj.checked) {
		for(var i=0; i<inputs.length; i++) {
			if(inputs[i].type=='checkbox') {
				inputs[i].checked = true;
			}
		}
	} else {
		for(var i=0; i<inputs.length; i++) {
			if(inputs[i].type=='checkbox') {
				inputs[i].checked = false;
			}
		}
	}
}


//-->
</script>
</body>
</html>