<form action="javascript:void(null);" id="supply_replaylist" name="supply_replaylist" method="post">
<table width="680" class="from_table2" >
<tpl> if $supply_re_array[0].sr_id neq '' </tpl>
	<tr>
		<th width="48" align="left" style="width:50px;"><tpl> $langSupplySel </tpl></th>
		<th width="534" align="left" style="width:80%;text-align:left">主体信息</th>
		<th width="82" align="left" style="text-align:left"><tpl> $langCOperation </tpl></th>
	</tr>
	<tpl> section name=i loop=$supply_re_array </tpl>
	<tr>
	  <td width="48" align="center" valign="middle" id="supplyrelist"><input type="checkbox" name="sr_id[]" value="<tpl> $supply_re_array[i].sr_id </tpl>" /></td>
		<td align="left">
			<tpl> if $supply_re_array[i].sr_state eq 1 </tpl>
				<font color="#FF0000"> <tpl> $langSupplyStateNormal </tpl> </font>
			<tpl> else </tpl>
				<font color="#777777" > <tpl> $langSupplyStateClose </tpl> </font>
			<tpl> /if </tpl>
			<tpl> if $supply_re_array[i].sr_member eq 0 </tpl>
				<tpl> $langSupplyAntmuse </tpl>
			<tpl> else </tpl>
				<a target="_blank" href="<tpl> $site_url </tpl>/store/index.php?userid=<tpl> $supply_re_array[i].sr_member </tpl>" ><tpl> $supply_re_array[i].sr_member_name </tpl></a>
			<tpl> /if </tpl>
			<font color="#AAAAAA" ><tpl> $supply_re_array[i].sr_time </tpl></font>
			<tpl> if $supply_re_array[i].sr_anonymous eq 2 </tpl>
				<font color="#AAAAAA" > [<tpl> $langSupplyAntmuseShort </tpl>] </font>  
			<tpl> /if </tpl>
			<div style=" font-weight:800; color:#666666;"><tpl> $supply_re_array[i].sr_title </tpl></div>
			<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tpl> $supply_re_array[i].sr_content </tpl>
			</div>		               
		</td> 
		<td width="82" align="left" valign="middle">
			<a href="javascript:void(null);" onclick="ajax_modi_replay('action=modi_replay&sr_id=<tpl> $supply_re_array[i].sr_id </tpl>&curpage=<tpl> $condition.curpage </tpl>&keyword=<tpl> $condition.keyword </tpl>&type=<tpl> $condition.type </tpl>&quality=<tpl> $condition.quality </tpl>&class_id=<tpl> $condition.class_id </tpl>&username=<tpl> $condition.username </tpl>&anymous=<tpl> $condition.anymous </tpl>');"><tpl> $langSysCEdit </tpl></a>        </td>
	</tr>
	<tpl> /section </tpl>
	<tr style="width:680px">
	  <td width="48" align="center" valign="middle" id="supplyrelist">&nbsp;</td>
		<td colspan="2"> 
		 <span class="btn_left">   <input type="button" value="<tpl> $langSupplyControlSel </tpl>" id="control_seclect" name="control_seclect" class="btn_submit" /> </span>
		<span class="btn_left">    <input type="button" value="<tpl> $langSupplyStateClose </tpl>" id="resupply_stop" name="resupply_stop" class="btn_submit" />	</span>
		<span class="btn_left">    <input type="button" value="<tpl> $langSupplyPutOut </tpl>" id="resupply_start" name="resupply_start" class="btn_submit" />	</span>
		 <span class="btn_left">   <input type="button" value="<tpl> $errSupplyDel </tpl>" id="resupply_del" name="resupply_del"class="btn_submit" /></span>
	 <span class="btn_marginright"><tpl> $page_list </tpl></span>
	 <span class="btn_left"><input type="button" id="butt_list" class="btn_submit" value="<tpl> $langSupplyReturn </tpl>" /></span>					    </td>
	</tr>
	<tpl> else </tpl>
		<tpl> $langSysCNoThing </tpl>
		<tr>
	  <td width="100" align="left" valign="middle" id="supplyrelist"> <span class="btn_left"><input type="button" id="butt_list" class="btn_submit" value="<tpl> $langSupplyReturn </tpl>" /></span>	</td>
	  <td colspan="4" align="center">
			  
	  </td>
	</tr>
	<tpl> /if </tpl>
	
</table>
</form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langCConfirmDelete </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="hidden" id="del_value" />
</div> 
<script language="javascript">
//返回列表
$("#butt_list").click(function(){
	ShowDiv = "result_content";
	getPageContent("../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=ajax_list&curpage=1&keyword=<tpl> $condition.keyword </tpl>&type=<tpl> $condition.type </tpl>&quality=<tpl> $condition.quality </tpl>&class_id=<tpl> $condition.class_id </tpl>&username=<tpl> $condition.username </tpl>&anymous=<tpl> $condition.anymous </tpl>");
});
//编辑回复
function ajax_modi_replay(str){
	$.ajax({
		url: "../app/<tpl> $app_module.app_module_sign </tpl>/system.php",
		data: str,
		type:'post',
		dataType:"html",
		beforeSubmit:  showLoading(showText),
		success: function(msg){
			hideLoading();
			$('#result_content').html(msg);
		}
	});
	return false;
}

var question = $('#question')[0];
$(document).ready(function() {
	//控制选择
	$('#control_seclect').click(
		function(){
			$('input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	)
	$('#resupply_start').click(function() {
		$('#supply_replaylist').attr("action", "../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=change_re_state&state=1");
		$('#supply_replaylist').ajaxSubmit(options);
		return false;
	});
	
	$('#resupply_stop').click(function() {
		$('#supply_replaylist').attr("action", "../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=change_re_state&state=2");
		$('#supply_replaylist').ajaxSubmit(options);
		return false;
	});
	
	var options = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							getPageContent("../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=replay&curpage=<tpl> $curpage </tpl>&keyword=<tpl> $condition.keyword </tpl>&type=<tpl> $condition.type </tpl>&quality=<tpl> $condition.quality </tpl>&class_id=<tpl> $condition.class_id </tpl>&s_id=<tpl> $condition.s_id </tpl>&username=<tpl> $condition.username </tpl>&anymous=<tpl> $condition.anymous </tpl>");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	$("#resupply_del").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
		$.unblockUI();
		$('#supply_replaylist').attr("action", "../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=re_del");
		$('#supply_replaylist').ajaxSubmit(options);
		return false;
	});
	$('#no').click($.unblockUI);
});
</script>