<!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/changeStyle.js"></script>
<script type="text/javascript" src="skin/{echo: $SYSINFO['templates'];/}/js/userchangeStyle.js"></script>

<style type="text/css">
th{background:#EFEFEF}
.edit span{background:#efefef;}
.search {margin:5px;}
.search input {color:#444;}
td.img img{cursor:pointer}
</style>
<script>
var inputs = document.getElementsByTagName("input");
function submitform() {
	var checked = false;
	for(var i=0; i<inputs.length; i++) {
		if (inputs[i].checked == true) 
        {
            checked = true;
            if(confirm('{echo:lp{m_manage_sure_del};/}')){
            	break; 
                }else{
                	return false;
                	break; 
                    }
        }
	}
	if (!checked){ 
		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>
</head>
<body onload="menu_style_change('shop_guestbook');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_rc_guestbook};/}
	</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_rc_guestbook};/}</div>
                <hr />
<form action="do.php?act=shop_guestbook_del" name="form" method="post" onsubmit="return submitform();">                
				<table width="98%" class="form_table">
					<tr class="center"><th width="20"><input type="checkbox" onclick="checkall(this);" /></th>
						<th width="80">{echo: lp{m_name};/}</th>
						<th width="80">{echo: lp{m_add_time};/}</th>
                        <th width="80">{echo: lp{m_my_write_back};/}</th>
						<th width="50">{echo: lp{m_status};/}</th>
						<th width="80">{echo: lp{m_manage};/}</th></tr>
					{sta:
					if(!empty($result['result'])) {
						foreach($result['result'] as $v) [exc]}
						{sta:if($v['group_id']) [exc]}
							<tr class="center">
								<td><input type="checkbox" name="guest[]" value="{echo: $v['gid'];/}" /></td>
								<td class="center">[{echo: lp{m_group_buy};/}:<a href="goods.php?id={echo:$v['goods_id'];/}&app=groupbuyinfo&groupid={echo:$v['group_id'];/}">{echo: $v['group_name'];/}</a>]<br />{echo: $v['name'];/}</td>
								<td class="center">{echo: substr($v['add_time'],0,16);/}</td>
								<td class="center">{echo: sub_str($v['reply'],15);/}</td>
								<td class="center">
									{sta:if($v['read_status']) [exc]}
										{echo: lp{m_read};/}
									{sta: } else [exc]}
										{echo: lp{m_unread};/}
									{end:if/}
								</td>
								<td class="center"><a href="do.php?act=shop_guestbook_del&id={echo: $v['gid'];/}"
									onclick="return confirm('{echo: lp{m_suredel_guestbook};/}');">{echo: lp{m_del};/}</a>
									<a href="modules.php?app=shop_seller_r&id={echo: $v['gid'];/}" >{echo: lp{m_write_back};/}</a>
									<a href="modules.php?app=shop_seller_r&id={echo: $v['gid'];/}" >{echo: lp{m_view};/}</a>
									
								</td>
							</tr>
						{sta: } else [exc]}
							<tr class="center">
								<td><input type="checkbox" name="guest[]" value="{echo: $v['gid'];/}" /></td>
								<td class="center">{echo: $v['name'];/}</td>
								<td class="center">{echo: substr($v['add_time'],0,16);/}</td>
								<td class="center">{echo: sub_str($v['reply'],15);/}</td>
								<td class="center">
									{sta:if($v['read_status']) [exc]}
										{echo: lp{m_read};/}
									{sta: } else [exc]}
										{echo: lp{m_unread};/}
									{end:if/}
								</td>
								<td class="center"><a href="do.php?act=shop_guestbook_del&id={echo: $v['gid'];/}"
									onclick="return confirm('{echo: lp{m_suredel_guestbook};/}');">{echo: lp{m_del};/}</a>
									<a href="modules.php?app=shop_seller_r&id={echo: $v['gid'];/}" >{echo: lp{m_write_back};/}</a>
									<a href="modules.php?app=shop_seller_r&id={echo: $v['gid'];/}" >{echo: lp{m_view};/}</a>
								</td>
							</tr>
					    {end:if/}
					    
					{end:foreach/}
					<tr><td colspan="6" class="page">{inc: require("modules/page.php");/}</td></tr>
					<tr><td colspan="6"><INPUT class="submit" type="submit" value="{echo:lp{m_pl_del};/}" name="deletesubmit" /> </td></tr>
					{sta: } else [exc]}
					<tr><td colspan="6" class="center">{echo: lp{m_nolist_record};/}</td></tr>
					{end:if/}
				</table>
</form>				
			</div>
			<div class="right_bottom"></div>
			<div class="back_top"><a href="#"></a></div>
		</div>
	</div>
<div class="clear"></div>
{inc: require("shop/index_footer.php");/}

</body>
</html>