<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo SYS_CHARSET ?>">
<title>edit contents</title>
<link href="<?php echo SYS_ADMIN_STYLE_PATH ?>style/common.css" rel="stylesheet" type="text/css">
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/validate.js"></script>
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/common.js"></script>
<script type="text/javascript" src="<?php echo DIR_INSTALL ?>plugins/kindeditor/kindeditor.js"></script>
<script language="javascript">
    KindEditor.eifrEditorData = new Array();
    KindEditor.eifrEditorData[0] = {editorObj:new Object(), fieldName:'content'}
    KindEditor.ready(function(K) {
            KindEditor.eifrEditorData[0].editorObj = K.create('textarea[name="content_html"]', {
            resizeType : 1,
            allowImageUpload : true,
            allowFileManager : true
        });

    });

</script>
</head>

<body>
<table class="nav_table" cellpadding="0" cellspacing="0">	
	<tr>
		<td class="nav_td"><?php echo $layout['eifrtf_menu_nav'] ?></td>
	</tr>	
</table>
<table class="page_control" cellpadding="0" cellspacing="0">
	<tr>
		<td width="200" valign="bottom">
			<table class="page_menu" cellpadding="0" cellspacing="0">
				<tr>
					<td width="80" class="page_menu_hidden" onMouseOver="this.className='page_menu_over'" onMouseOut="this.className='page_menu_hidden'" onClick="window.location.href='info_edit.php?act=edit_base&selectid=<?php echo $layout['eifrtf_selectid'] ?>'">基本信息</td>
					<td width="80" class="page_menu_display" onMouseOver="this.className='page_menu_over'" onMouseOut="this.className='page_menu_display'">详细内容</td>
				</tr>
			</table>
		</td>
		<td valign="top">
			<table class="toolbar_table" cellpadding="0" cellspacing="0">
				<tr>
					<td class="toolbar_td"><?php echo $layout['eifrtf_toolbar'] ?></td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table cellpadding="0" cellspacing="0" class="edit_tb">
  
  <form name="editForm" method="post" action="" onSubmit="return Validator.Validate(this,3)"> 	
  	<input type="hidden" name="selectid" id="selectValue" value="<?php echo $layout['eifrtf_selectid'] ?>">
	<input type="hidden" name="selectValue" id="selectValue" value="<?php echo $layout['eifrtf_selectid'] ?>">
    <input type="hidden" name="content_id"  value="<?php echo $layout['eifrtf_content_id'] ?>">
    <input type="hidden" name="content" id="content" value="">
    <input type="hidden" name="uid" id="uid" value="<?php echo $layout['eifrtf_uid'] ?>">
    <?php if(IS_MULPAGE): ?>
    <tr>
        <td>
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="70%">
                        <?php echo $layout['eifrtf_content']['ordernum'] ?>&nbsp;页标题：<input type="text" name="title" size="30" class="input_text" value="<?php echo $layout['eifrtf_content']['title'] ?>">
                    </td>
                    <td width="30%" align="right" class="edit_subtitle">
                        <img src="<?php echo SYS_ADMIN_STYLE_PATH ?>images/list.gif" align="absmiddle">&nbsp;<span class="edit_subtitle_txt">内容列表</span>
                        <input type="checkbox" id="chk_content" value="1" checked onClick="showDisplayHidden('chk_content','list_content')">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr id="list_content"> 
        <td>
        <table class="list_tb" cellpadding="0" cellspacing="0">
			<tr class="list_title_tr_bg">
			<td width="5%" class="list_title_td">编号</td>
			<td width="70%" class="list_title_td">页标题</td>
			<td width="25%" class="list_title_td">操作</td>
			</tr>
			<?php foreach($layout['eifrtf_contents'] as $row): ?>
			<tr class="list_sub_tr_bg" onMouseOver="this.className='list_mouseover_tr_bg'" onMouseOut="this.className='list_sub_tr_bg'" >
			<td width="5%" title="ID=<?php echo $row['id'] ?>"><?php echo $row['ordernum'] ?></td>
			<td width="70%"><span <?php if($layout['eifrtf_content_id'] == $row['id']) echo 'class="title_selected"'?>><?php echo $row['title'] ?></span></td>
			<td width="25%">
                <input type='button' name='btn_modify' id='btn_modify' class='' value='修改' onClick="submitButton('info_edit.php?act=edit_content&selectid=<?php echo $layout['eifrtf_selectid'] ?>&content_id=<?php echo $row['id'] ?>','修改',false)">
                <?php if ($row['flag'] == 0): ?>
                &nbsp;<input type='button' name='btn_delete' id='btn_delete' class='' value='删除' onClick="submitButton('info_edit.php?act=delete_content&selectid=<?php echo $row['id'] ?>','删除',true)">
                <?php
                endif;
                if ($layout['eifrtf_is_manage']):
                if ($row['flag'] == 1):
                ?>
                &nbsp;<input type='button' name='btn_comeback' id='btn_comeback' class='' value='恢复' onClick="submitButton('info_edit.php?act=comeback_content&selectid=<?php echo $row['id'] ?>','恢复',true)">
                <?php endif;?>
                &nbsp;<input type='button' name='btn_delete_forever' id='btn_delete_forever' class='' value='永久删除' onClick="submitButton('info_edit.php?act=delete_forever_content&selectid=<?php echo $row['id'] ?>','永久删除',true)">&nbsp;</td>
                <?php endif; ?>
            </td>
			</tr>
			<?php endforeach; ?>
		</table> 	
        </td>
    </tr>
    <?php endif; ?>
    <tr>
    	<td>
		<input type="checkbox" name="is_getresource" value="1"   />下载远程图片&nbsp;&nbsp;&nbsp;
	</td>
    </tr>
    <tr> 
      <td>
        <textarea id="content_html" name="content_html" rows="10" cols="80" style="width: 100%; height: 300px"><?php echo $layout['eifrtf_content']['content'] ?></textarea>
	  </td>
    </tr>
  </form>
</table>

</body>
</html>

