<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: comment.tpl.html 2 2011-05-27 02:59:23Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<div id="container">
<h1>{$L['comment_manage']}<!--#sitemap_tag($L['comment_manage']);#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['comment_manage_tips']}</span>
</div>
<form action="{#urr("admincp","item=$item")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="update_setting" />
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="40%"><span class="bold">{$L['open_comment']}</span>: <br /><span class="txtgray">{$L['open_comment_tips']}</span></td>
	<td><input type="radio" name="setting[open_comment]" value="1" {#ifchecked(1,$setting['open_comment'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_comment]" value="0" {#ifchecked(0,$setting['open_comment'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['check_comment']}</span>: <br /><span class="txtgray">{$L['check_comment_tips']}</span></td>
	<td><input type="radio" name="setting[check_comment]" value="1" {#ifchecked(1,$setting['check_comment'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[check_comment]" value="0" {#ifchecked(0,$setting['check_comment'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_vote']}</span>: <br /><span class="txtgray">{$L['open_vote_tips']}</span></td>
	<td><input type="radio" name="setting[open_vote]" value="1" {#ifchecked(1,$setting['open_vote'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_vote]" value="0" {#ifchecked(0,$setting['open_vote'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_file_url']}</span>: <br /><span class="txtgray">{$L['open_file_url_tips']}</span></td>
	<td><input type="radio" name="setting[open_file_url]" value="1" {#ifchecked(1,$setting['open_file_url'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_file_url]" value="0" {#ifchecked(0,$setting['open_file_url'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td><input type="submit" class="btn" value="{$L['btn_submit']}"/></td>
</tr>
</table>
</form>
<br />
<br />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<!--#
if(count($cmts)){
#-->
<tr>
	<td width="50%" class="bold">{$L['cmt_content']}</td>
	<td width="30%" class="bold">{$L['file_name']}</td>
	<td width="150" align="right" class="bold">{$L['username']}/{$L['status']}</td>
</tr>
<form action="{#urr("admincp","item=$item")#}" name="user_form" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<!--#
	foreach($cmts as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
#-->
<tr class="{$color}" height="20">
	<td>
	<input type="checkbox" name="cmt_ids[]" id="cmt_ids" value="{$v['cmt_id']}"  /><span title="{$L['time']}:{$v['in_time']}">{$v['content']}</span>
	</td>
	<td><a href="{$v['a_viewfile']}" target="_blank">{#file_icon($v['file_extension'])#}{$v['file_name']}</a></td>
	<td width="150" align="right">[<a href="{$v['a_space']}" target="_blank">{$v['username']}</a>] {$v['status']}</td>
</tr>	
<!--#
	}
	unset($cmts);
#-->
<!--#if($page_nav){#-->
<tr>
	<td colspan="5">{$page_nav}</td>
</tr>
<!--#}#-->
<tr>
	<td colspan="6" class="td_line"><a href="javascript:void(0);" onclick="reverse_ids(document.user_form.cmt_ids);">{$L['select_all']}</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="cancel_ids(document.user_form.cmt_ids);">{$L['select_cancel']}</a>&nbsp;&nbsp;
	<input type="radio" name="task" value="is_checked" id="is_checked" /><label for="is_checked">{$L['is_checked']}</label>&nbsp;
	<input type="radio" name="task" value="is_unchecked" id="is_unchecked" /><label for="is_unchecked">{$L['is_unchecked']}</label>&nbsp;
	<input type="radio" name="task" value="del_cmts" id="del_cmts" /><label for="del_cmts">{$L['delete']}</label>&nbsp;
	<input type="submit" class="btn" value="{$L['btn_submit']}"/>
	</td>
</tr>
<!--#	
}else{	
#-->
<tr>
	<td valign="middle">{$L['cmts_not_found']}</td>
</tr>
<!--#
}
#-->
</form>
</table>
<script language="javascript">
function dosubmit(o){
	if(checkbox_ids("cmt_ids[]") != true){
		alert("{$L['please_select_cmts']}");
		return false;
	}
	if(getId('is_checked').checked ==false && getId('is_unchecked').checked ==false && getId('del_cmts').checked ==false){
		alert("{$L['please_select_cmt_op']}");
		return false;
	}
}
</script>
</div>
</div>
