<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_picture_edit.aspx.cs" Inherits="HteamDd.Web.Admin.Admin_picture_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>图片信息编辑</title>
    <meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible" />
    <link href="/css/style.css" rel="stylesheet" type="text/css" />
    <script src="/jscript/common.js" type="text/javascript"></script>
    <script src="/jscript/jquery-1.4.2.js" type="text/javascript"></script>
      <style type="text/css">
   /* .a{ color:Black;}
     .b{ color:Gray;}
          .style1
          {
              width: 89px;
          }
 </style>
    <!--编辑器代码-开始 -->
    <script src="/kindeditor/kindeditor.js" type="text/javascript"></script>
    <script type="text/javascript">
        KE.show({
            id: 'txtContent',
            imageUploadJson: '/kindeditor/plugins/upload_json.ashx',
            fileManagerJson: '/kindeditor/plugins/file_manager_json.ashx',
            allowFileManager: true,
            width: "70%", //编辑器的宽度为70%  
            height: "250px", //编辑器的高度为100px    
            filterMode: false, //不会过滤HTML代码  
            resizeMode: 0 //2或1或0，2时可以拖动改变宽度和高度，1时只能改变高度，0时不能拖动。
        });
        </script>
<!-- 编辑器代码结束 -->
</head>
<body>
    <form id="form1" runat="server" >
     <table style="width: 100%;" class="maintable" cellpadding="0" cellspacing="1" border="0" >
       <tr><th colspan="2"><a href="Admin_picture_manage.aspx">图片信息管理</a> | <a href="Admin_picture_recycle.aspx">图片回收站</a></th></tr>
        <tr>
         <td class="left" style="width: 89px">图片发布作者：</td>
         <td>
             <asp:TextBox ID="txtName" runat="server" Width="528px" Enabled="False" 
                 ReadOnly="True"></asp:TextBox>
             <span class="explain">图片作者不能修改！</span></td>
       </tr>
        <tr>
         <td class="left" style="width: 89px">图片预览：</td>
         <td id="picture">
         <div style="height:150px; position:relative; overflow:auto">
            <ul id="image">

            </ul></div> <span class="explain">图片删除要谨慎！一旦删除将无法找回</span></td>
       </tr>
       <tr>
         <td class="left" style="width: 89px">图片信息描述内容：</td>
         <td>
              &nbsp;<asp:TextBox 
                  ID="txtContent" runat="server" Height="150px" TextMode="MultiLine" 
                  Width="322px"></asp:TextBox>
              &nbsp;<span class="explain">文章内容，可以插入图片，视频等</span></td>
       </tr>
       <tr>
       <td class="left" style="width: 89px">标签：</td>
       <td>
           <asp:TextBox ID="txtTag" runat="server" Width="299px"></asp:TextBox>&nbsp;<span class="explain">标签之间用，隔开</span></td>
       </tr>
          
        <tr>
       <td class="left">是否删除：</td>
       <td class="right">
           <asp:RadioButton ID="rbtdelete1" runat="server" Text="删除"  GroupName="delete"/>
           <asp:RadioButton ID="rbtdelete2" runat="server" Text="不删除" Checked="true" GroupName="delete"/>
           </td>
       </tr>
       <tr><td class="left">是否审核</td>
<td class="right">
 <asp:RadioButton ID="rbtVerity1" runat="server" Text="已审" Checked="true" GroupName="verity"/>
           <asp:RadioButton ID="rbtVerity2" runat="server" Text="未审" GroupName="verity"/>
</td></tr>
       <tr>
       <td class="left"></td>
       <td> 
           <asp:Button ID="btnSubmit" runat="server" 
               Text="提  交" onclick="btnSubmit_Click" />&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button 
               ID="btnReset" runat="server" Text="重  置"/>
                </td>
       </tr>
     </table>
    </form>
</body>
</html>
<script type="text/javascript">
    window.onload = function () {
        var url = '<%=address %>';
        var picture_id = '<%=picture_id%>';
        var ima = url.split('|');
        var num = 0; //记录图片个数
        for (var i = 0; i < ima.length - 2; i++) {
            num = num + 1;
            var str = "<li>";
            str += "<div class='imagelabel" + i + "'> 图片" + num + ":&nbsp&nbsp&nbsp <a id='delete' href='Admin_picture_edit.aspx?action=delete&picture_id=" + picture_id + "&address=" + url + "&name="+ima[0] + "/" + ima[i + 1]+"&delete_url="+ima[i + 1]+"'>删除</a></div>";
            str += "<div class='imageload" + i + "'><img src='" +ima[0]+"/"+ ima[i+1] + "' height='100' width='150'/></div>";
            str += "</li>";
            $("#image").append(str);
        }
    }
</script>
