<?php $this->widget('bbs.widgets.web.HeaderWidget',array('title'=>'修改主题 - ' . $forum['name'].' - '.setting('webname')));?>
<style type="text/css">
.editor_con textarea {
    border: 0 none;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    overflow: auto;
    padding: 0;
    width: 400px;
}
.editor_con {
    border-color: #AAAAAA #DDDDDD #DDDDDD #AAAAAA;
    border-style: solid;
    border-width: 1px;
    color: #333333;
    margin: 0;
}
#new_attach li {
	padding: 2px;
}
</style>
<div id="forum_nav"><?php echo $this->nav($forum['fid']);?>><span style="font-size:14px;">修改主题</span></div>

<div class="clear"></div>

<form method="post" action="<?php echo $this->url('system',array('s'=>'bbs','c'=>'thread','a'=>'post','fid'=>$fid));?>" enctype='multipart/form-data'>
<table>
	<tr>
		<td>
			<table>
				<tr><td><?php $this->widget('bbs.widgets.ThreadTypeWidget',array('fid'=>$forum['fid']));?> <input title="请输入标题" tabindex="1" value="<?php echo $thread['subject'];?>?>" id="atc_title" name="subject" size="50"></td></tr>
				<tr><td>&nbsp;</td></tr>
				<tr><td><div class="editor_con"><textarea id="textarea" name="content" style="width: 100%; height: 240px;"><?php echo $thread['content'];?></textarea></div></td></tr>
				<?php if ($isAllowUpload):?>
<script type="text/javascript">
var id = 1;
var initAtt = '<tr><td><input type="file" name="attachment_'+id+'" /></td><td><input type="text" name="name_'+id+'" /></td><td><input type="text" name="remark_'+id+'" size="40" /></td><td><input type="text" name="price_'+id+'" size="4" /></td></tr>';

$(function() {
	$('#attbody').html(initAtt);
});

function addAtt() {
	id++;
	var attHtml = '<tr><td><input type="file" name="attachment_'+id+'" /></td><td><input type="text" name="name_'+id+'" /></td><td><input type="text" name="remark_'+id+'" size="40" /></td><td><input type="text" name="price_'+id+'" size="4" /></td></tr>';
	$('#attbody').append(attHtml);
}
</script>
				<tr><td>&nbsp;</td></tr>
				<tr>
					<td>
						<div id="new_attach">
							<table>
								<tbody>
									<tr style="height:20px;">
										<td><input type="checkbox" name="attreply" />隐藏附件(回复可见)</td>
										<td></td>
										<td></td>
										<td></td>
									</tr>
									<tr>
										<td width="200">上传附件 (图片、文件等) [<a href="javascript:void(0);" onclick="addAtt();">+</a>]</td>
										<td width="100">附件名称</td>
										<td width="180">描述</td>
										<td width="60">售价</td>
									</tr>
								</tbody>
								<tbody id="attbody"></tbody>
							</table>
						</div>
					</td>
				</tr>
				<?php endif;?>
				<tr><td><input type="submit" tabindex="4" class="btn-submit" name="reply" value="发布"></td></tr>
			</table>
		</td>
		<td style="width:240px;"></td>
	</tr>
</table>
</form>
<?php $this->widget('bbs.widgets.web.FooterWidget');?>