<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo SYS_CHARSET ?>">
<title>edit files</title>
<link href="<?php echo SYS_ADMIN_STYLE_PATH ?>style/common.css" rel="stylesheet" type="text/css">
<link href="<?php echo DIR_INSTALL ?>plugins/kindeditor/themes/default/default.css" rel="stylesheet" type="text/css">
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/jquery.js"></script>
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/jquery.tips.js"></script>
<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 type="text/javascript" src="<?php echo DIR_INSTALL ?>plugins/kindeditor/lang/zh_CN.js"></script>
<script language="javascript">
    KindEditor.ready(function(K) {
        var editor = K.editor({
            allowFileManager : true
        });
        K('#btn_upfile').click(function() {
            editor.loadPlugin('image', function() {
                editor.plugin.imageDialog({
                    imageUrl : K('#fileurl').val(),
                    clickFn : function(url, title, width, height, border, align) {
                        K('#fileurl').val(url);
                        editor.hideDialog();
                    }
                });
            });
        });
    });

</script>
</head>

<body>
<table class="nav_table" cellpadding="0" cellspacing="0">	
	<tr>
		<td class="nav_td"><?php echo $layout['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='pic_edit.php?act=edit_base&selectid=<?php echo $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['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" value="<?php echo $selectid ?>">
  	<input type="hidden" name="selectValue" id="selectValue" value="<?php echo $selectid ?>">
    <input type="hidden" name="file_id"  value="<?php echo $file_id ?>">
	<input type="hidden" name="mediatype" id="mediatype" value="<?php echo $layout['mediatype'] ?>">
    <input type="hidden" name="uid" id="uid" value="<?php echo $layout['uid'] ?>">
    <input type="hidden" name="act" value="<?php echo $act ?>">
    <tr>
			<td>
				<table width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td>
							标题：<input type="text" name="title" size="30" class="input_text" value="<?php echo $layout['edit_file']['title'] ?>">
							&nbsp;&nbsp;排序号：<input type="text" name="ordernum" id="ordernum" class="input_text" size="2" value="<?php echo $layout['edit_file']['ordernum'] ?>">
						</td>
					</tr>
					<tr>
						<td>
							图片：<input type="text" name="fileurl" id="fileurl" class="input_text" size="40" value="<?php echo $layout['edit_file']['fileurl'] ?>" require="false" dataType="LimitB" min="0" max="255"  msg="[0,255]个字符之内">
							<input name="btn_upfile" type="button" value="上传图片" id="btn_upfile">
						</td>
					</tr>
				</table>
			</td>
	</tr>
   <tr>
		<td>
			<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>
    <tr id="list_content"> 
      <td>
      <table class="list_tb" cellpadding="0" cellspacing="0">
			<tr class="list_title_tr_bg">
			<td class="list_title_td">编号</td>
			<td class="list_title_td">标题</td>
			<td class="list_title_td">&nbsp;</td>
			<td class="list_title_td">操作</td>
			</tr>
			<?php foreach($layout['list_file'] as $row): ?>
			<tr class="list_sub_tr_bg">
			<td title="ID=<?php echo $row['id'] ?>"><?php echo $row['ordernum'] ?></td>
			<td><span class="<?php echo $row['eifrtf_title_style'] ?>"><?php echo $row['title'] ?></span></td>
			<td>&nbsp;<a class="tip_trigger" href="#"><img class="show_img" src="<?php echo  CSafeData::getImgSrc($row['fileurl']) ?>" /> <span class="tip"><img src="<?php echo  CSafeData::getImgSrc($row['fileurl']) ?>" /></span></a> </td>
			<td><?php echo $row['eifrtf_operate_btn'] ?></td>
			</tr>
			<?php endforeach?>
			</table> 	
      </td>
    </tr>

  </form>
</table>

</body>
</html>

