<?php
		include("header.tpl.php");
		include("bodytop.tpl.php"); 
		?>
	<link rel="stylesheet" type="text/css" href="templates/<?php echo $sytle='default'?>/editor.css" />
	<script language=javascript src="./engine/js/attach.js"></script>
	<script language=javascript src="./engine/js/editor.js"></script>
	<script language=javascript src="./engine/js/menu.js"></script>
    <div class="clear"></div>
<?php if($action=='pubreply'){?>
	<form enctype="multipart/form-data" method="post" action="post.php?action=savereply&typeid=<?php echo $typeid?>&bid=<?php echo $bid?>" onsubmit="parseurl()">
<div id="postmsg" class="bord">
	<div class="threadlist_head"><label>发布回复</label></div>
			   <table>
				<tr>
		<th  valign="top" width="20%">内容</th>
		 <td valign="top">
				<?php include("editor.tpl.php");?>
		</td>
		</tr>
				<tr>
			<th>&nbsp;</th>
			<td><input type="submit" value="发  布" class="postmsgbtn"></td>
			    </tr>
				</table>
			</div>
		</form>
<?php }elseif($action='modifyreply'){?>
	<form enctype="multipart/form-data" method="post" action="post.php?action=updatereply&rid=<?php echo $modifyinfo['rid']?>" onsubmit="parseurl()">
<div id="postmsg" class="bord">
	<div class="threadlist_head"><label>修改回复</label></div>


			<table>

			 <tr>
				<th valign="top" width="20%">内容</th>
				<td valign="top"><?php include("editor.tpl.php");?></td>
			</tr>
			<?php if(!empty($modreplyattachs)){?>
			<tr>
			<th valign="top" >&nbsp;</th>
			<td >

			<table>
			<tr>
				<th width="60%" class="font_12">文章附件</th>
				<th width="10%" class="font_12">附件大小</th>
				<th width="22%" class="font_12">附件类型</th>
				<th width="8%" class="font_12">下载</th>
			</tr>
   <?php
	foreach($modreplyattachs as $key => $val){
	?>
	<tr>
		  <td>
		  <div id="attach<?php echo $key?>">		 
				[<a href="###" onclick="deleteattach('reply',<?php echo $mid?>,<?php echo $key?>,true)">删除</a>] 
				[<a href="###" onclick="modifyattach('<?php echo $key?>')">修改</a>] 
				[<a href="###" onclick="insertAttachtext('<?php echo $key?>');return false;">插入</a>]
				<?php echo '('.$key.') '.$val['name']?>
				</div>
				<span id="modifyattach<?php echo $key?>"></span>
			</td>
			<td><?php echo sizecount($val['size'])?></td>
			<td><?php echo $val['type']?></td>
			<td><?php echo $val['downtimes']?></td>
			</td>
   </tr>
<?php		}?>
   </table></td></tr>
<?php		}?>
			<tr>
		<th >&nbsp;</th>
		<td ><input type="submit" value="修  改" class="postmsgbtn"></td>
            </tr>
   </table>
            
			</td>
			</tr>

				</table>
			
			</div>
	</form>
<?php }?>
<div class="clear"></div>
<?php
include("tail.tpl.php"); 
?>