<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="askEdit.aspx.cs" Inherits="Kcms.UI.admin.askEdit" %>
<%@ Register assembly="PageNavigator" namespace="KcNavigator" tagprefix="Kc" %>
<!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>
    <title></title>
    <link href="skins/work-style.css" rel="stylesheet" type="text/css" />
    <script src="/inc/artDialog/artDialog.min.js" type="text/javascript"></script>
    <script src="../inc/kindeditor/kindeditor-min.js" type="text/javascript"></script>
    <script src="../scripts/public.js" type="text/javascript"></script>
    <script type="text/javascript">
        EditorInit('form2', 'txtContent', null);
        
        KE.show({
            id: "txtAdded",
            filterMode: true,
            allowUpload: false,
            allowFileManager: false
        });
        KE.show({
            id: "txtAnsContent",
            filterMode: true,
            allowUpload: false,
            allowFileManager: false
        });
    </script>
</head>
<body>
    <form id="form2" runat="server">
<div class="container">
 <div class="path clearfix"><div class="l"><h4><img src="skins/icon/club_summ.gif" align="absmiddle" />问答管理</h4></div><div class="r"><asp:Literal ID="litAdv" runat="server"></asp:Literal></div></div>
 <div class="mbox clearfix">
  <div class="left">
    <a href="ask.aspx">问答列表</a>
    <a href="#" class="on">编辑问答</a>
  </div>
  <div class="right">
<table class="rtable" width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
  <td width="20%">标题：<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
          runat="server" ControlToValidate="txtTitle" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
    </td>
  <td>
      <asp:TextBox ID="txtTitle" runat="server" Columns="68"></asp:TextBox>
    </td>
</tr>
<tr>
  <td>页面标题：</td>
  <td><asp:TextBox ID="txtPageTitle" runat="server" Columns="68"></asp:TextBox></td>
</tr>
<tr>
  <td>问答分类：</td>
  <td><asp:TextBox ID="txtClassId" runat="server" Columns="3" onfocus="this.blur()"
          onkeyup="this.value=this.value.replace(/\D/g,'')" onpaste="return false" 
          style="ime-mode:disabled">0</asp:TextBox><a href="javascript:showSelect('txtClassId',2)">选择分类</a></td>
</tr>
<tr>
  <td>所属专题ID：</td>
  <td><asp:TextBox ID="txtSpeId" runat="server" Columns="3" onfocus="this.blur()"
          onkeyup="this.value=this.value.replace(/\D/g,'')" onpaste="return false" 
          style="ime-mode:disabled">0</asp:TextBox><a href="javascript:showSelect('txtSpeId',0)">选择专题</a></td>
</tr>
<tr>
  <td>所属频道ID：</td>
  <td><asp:TextBox ID="txtChannelId" runat="server" Columns="3" onfocus="this.blur()"
          onkeyup="this.value=this.value.replace(/\D/g,'')" onpaste="return false" 
          style="ime-mode:disabled">0</asp:TextBox><a href="javascript:showSelect('txtChannelId',1)">选择频道</a></td>
</tr>
<tr>
  <td>问题状态：</td>
  <td>
      <asp:DropDownList ID="drpState" runat="server">
        <asp:ListItem Value="0">待审核</asp:ListItem>
        <asp:ListItem Value="1">解决中</asp:ListItem>
        <asp:ListItem Value="2">已解决</asp:ListItem>
        <asp:ListItem Value="3">无满意</asp:ListItem>
        <asp:ListItem Value="4">已过期</asp:ListItem>
        <asp:ListItem Value="5">已推荐</asp:ListItem>
       </asp:DropDownList>
    </td>
</tr>
<tr>
  <td>内容：</td>
  <td class="cont">
  <p><a href="javascript:showUpload('txtContent',0,1)">选择图片插入编辑器</a></p>
  <p><asp:TextBox ID="txtContent" runat="server" 
          TextMode="MultiLine" Height="180px" Width="99%"></asp:TextBox></p>
  </td>
</tr>
<tr>
  <td>补充内容：</td>
  <td class="cont">
      <asp:TextBox ID="txtAdded" runat="server" 
          TextMode="MultiLine" Height="120px" Width="90%"></asp:TextBox>
    </td>
</tr>
<tr>
  <td>&nbsp;</td>
  <td><asp:Button ID="btnPost" runat="server" CssClass="btn0" Text="添 加" 
          onclick="btnPost_Click" /></td>
</tr>
</table>
<br />
<table class="rtable" width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
  <td width="20%" align="center">操作</td>
  <td align="center">回答内容</td>
</tr>
    <asp:Repeater ID="ansList" runat="server" onitemcommand="ansList_ItemCommand">
    <ItemTemplate>
<tr>
    <asp:HiddenField ID="hidId" Value='<%#Eval("id") %>' runat="server" />
    <asp:HiddenField ID="hidUserId" Value='<%#Eval("userid") %>' runat="server" />
  <td valign="top" align="center"><asp:LinkButton ID="LinkButton1" CommandName="del" runat="server" CausesValidation="False" OnClientClick="return confirm('确定删除?')">删除?</asp:LinkButton>　<asp:LinkButton ID="LinkButton2" CommandName="edit" runat="server" CausesValidation="False">编辑</asp:LinkButton>　<asp:LinkButton ID="LinkButton3" CommandName="check" runat="server" CausesValidation="False"><%#((bool)Eval("state"))?"已审核":"<font color=red>未审核</font>" %></asp:LinkButton></td>
  <td><asp:Literal ID="litContent" runat="server" Text='<%#Eval("content") %>'></asp:Literal></td>
</tr>
    </ItemTemplate>
    </asp:Repeater>
<tr>
  <td valign="top" align="center"><asp:HiddenField ID="hidAnsId" runat="server" />
  </td>
  <td class="cont">
  <p><a href="javascript:showUpload('txtAnsContent',0,1)">选择图片插入编辑器</a></p>
  <asp:TextBox ID="txtAnsContent" runat="server" TextMode="MultiLine" Height="180px" Width="90%">
  </asp:TextBox>
      <br />
      <asp:Button ID="btnPost0" runat="server" CssClass="btn0" Text="修改回答" 
          onclick="btnPost0_Click" ValidationGroup="g1" />
    </td>
</tr>
</table>
  </div>
 </div>
</div>
</form>
</body>
</html>