<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="content.aspx.cs" Inherits="JuSNS.Web.home.ask.content" %>

<!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 id="ptitle" runat="server"> 问题</title>
<script language="javascript" type="text/javascript" src="<%=rooDir %>/js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="<%=rooDir %>/js/public.js"></script>
<link href="<%=rooDir %>/template/<% =JuSNS.Config.UiConfig.SkinStyle %>/css/base.css" id="skinpath" type="text/css" rel="stylesheet" />
    
</head>
<body>
<!--头部-->
<%=this.GetHtmlShort()%>
<div id="divhead">
    <%=this.GetHtmlHead()%>
</div>

<div id="divbody">
    <div id="body_first">
        <div class="body_menu"> 
        <%=this.GetHtmlLeft()%>
        </div>
    </div>
    <div id="body_sec">
            <div id="body_mid"> 
                <div class="body_frame"> 
                     <!--主题内容中-->    
                        <div class="body_frame_otherinfo">
	                            <div class="title">
                                    <div class="l"><img src="<%=rooDir %>/template/<%=JuSNS.Config.UiConfig.SkinStyle %>/images/site/ask.gif" align="absmiddle" /> <span class="bold shenlan font14 ocolor" runat="server" id="askTitle">问题</span></div>
                                    <div class="r"><a href="javascript:window.history.back();" title="返回上一页">返回上一页</a></div>
                                    <div class="c"></div>
                                </div>
                		       
                                <div class="nav-menu">
                                    <ul>
                                     <li  id="li1" class="current"><a href="#">问题详情</a></li>
                                     <li id="li_none" runat="server"></li>
                                     <li  id="li_my" runat="server"></li>
                                     <li  id="li_all"><a href="<%=rooDir %>/home/ask/?r=all">所有问题</a></li>
                                     <li  id="li_isclose"><a href="<%=rooDir %>/home/ask/?r=isclose">已经解决的问题</a></li>
                                     <li  id="li_unclose"><a href="<%=rooDir %>/home/ask/?r=unclose">待解决的问题</a></li>
                                     <li  id="li_ji"><a href="<%=rooDir %>/home/ask/?r=ji">紧急问题</a></li>
                                     </ul>
                                </div>        
                         </div>
                       <div runat="server" id="DivMsg" class="msg-succ" visible="false"></div>
                       <div runat="server" id="DivMsg1" class="msg-error" visible="false"></div>
                        <div class="body_sec_left">
                             <div class="content">
                                <form id="form1" action="" onsubmit="return false">
                                    <span class="nl"><input id="keyw" value="<%=Request.QueryString["key"] %>" type="text" class="f-text"  /> <input type="button" value="搜索问题" class="f-button" id="bbt" onclick="searchask();" /></span><span class="nr whshow"> <a onclick="return postblog();" href="<%=rooDir %>/home/ask/add.aspx" class="shortcut-link">我要提问</a> &nbsp; </span>
                                </form>
                             </div>
                           <script type="text/javascript">
                            function searchask()
                           {
                                var kv=document.getElementById("keyw").value;
                                if(kv.length<2)
                                {
                                    alert("请填写关键字。关键字长度不小于2个字符")
                                }
                                else
                                {
                                    window.location.href="<%=rooDir %>/home/ask/index.aspx?r=all&key="+escape(kv)+"";
                                }
                           } 
                           </script>
                        <!--正文开始-->
                        <div class="line1 s96"></div>
                        <div>
                                 <div class="askchild" runat="server" id="askctop"><ul runat="server" id="ChildClassList"></ul></div>
                                 
                                 <h4 id="askTitleSpan" runat="server"></h4>
                                 <div class="spline"></div>
                                 <div id="askContentSpan" runat="server" class="font14"></div>
                                 
                                 <div class="spline"></div>
                                 <div id="askAuthor" runat="server"></div>
                                 <div class="line1 s97"></div>
                                 <div id="askRePlayContent" runat="server"></div>
                                 <div class="spline" id="startForm"></div>
                                 <div id="ReplayForm" runat="server" style="line-height:28px;">
                                    <span class="bold reshow">我来回答问题</span>
                                    <form id="PostReplay" runat="server">
                                        <asp:HiddenField ID="qqID" Value="0" runat="server" />
                                        <asp:TextBox runat="server" ID="TxtContent" TextMode="MultiLine" MaxLength="2000" Width="96%" Height="80" CssClass="f-text"></asp:TextBox>
                                       <br /> 
                                        图片：<asp:FileUpload ID="TxtPic" runat="server"  CssClass="f-text"  Width="60%" /> 
                                       <br />
                                       <a href="javascript:void(0);"  id="face" onclick="showface(this.id,'TxtContent',0);"><img src="../../template/images/face/c.gif" title="选择表情"  align="absmiddle" /></a>
                                        <asp:Button ID="SendButton1" CssClass="f-button" runat="server" Text="回答问题" OnClick="Button1_Click" />
                                            <span runat="server" id="ErrSTRDiv" visible="false">您已经回复过此问题了</span> 
                                           <asp:RequiredFieldValidator
                                                ID="RequireName" runat="server" ControlToValidate="TxtContent" Display="Dynamic"
                                                ErrorMessage="请填写内容"></asp:RequiredFieldValidator> 
                                    </form>
                                 </div>
                                 <div class="spline"></div>
                                <div class="hdtitle-index bold" style="width:515px;">待解决问题</div>
                                <div class="asklist">
                                <ul runat="server" id="uncloseHTML"></ul>
                                </div>
                                <div class="spline"></div>
                                <div class="hdtitle-index bold" style="width:515px;">高分悬赏问题</div>
                                <div class="asklist"><ul runat="server" id="hiJiFenHTML"></ul></div>
                                <div class="spline"></div>

                       </div>                    
                         <!--正文结束-->
                        </div>
                        <!--中间分隔-->
                        <div class="line_mid">
                          <div class="line_01"></div>
                          <div class="line_02" id="midline"></div>
                          <div class="line_03"></div>
                        </div>
                        <!--中间分隔结束-->
                        
                        
                        <!--右边导航-->
                        <div class="body_sec_right">
                            <div class="adscss">
                                <script type="text/javascript" src="<%=rooDir %>/js/ads/body_top.js"></script>
                            </div> 
			                        
                            <div class="content" id="askClass" runat="server" >
                            </div>
			               
                            <div class="adscss">
                                <script type="text/javascript" src="<%=rooDir %>/js/ads/body.js"></script>
                            </div>
                        </div>
                        <!--右边导航结束-->
                         <div class="c"></div>
               </div>
               <!--底部-->
                 <div class="divbottom">
                  <%=this.GetHtmlFoot()%>
                  </div>
           </div>
   </div>
</div>
</body>
</html>
<script type="text/javascript">
   function postblog()
   {
        var uid='<%=GetUserID() %>';
        if(uid=="0")
        {
        alert("需要登录后才能发表日志！");return false;
        }
        else
        {
            return true;
        }
   }
   
function unlogin()
{
        alert("需要登录后才能查看！");
} 
function setBest(aid)
{
    var gUserID='<%=gUserID %>';
    if(gUserID=="0")
    {
        alert("您还没有登录！");return false;
    } 
    if(window.confirm("确定要设为最佳答案吗?"))
    {
    	var  options={  
				   method:'get',  
				   parameters:"&a=update&id="+aid,
				   onComplete:function(transport)
					{  
						var returnvalue=transport.responseText;
                        window.location.reload();
					}  
			   }; 
	    new  Ajax.Request('<%=rooDir %>/home/ask/content.aspx?no-cache='+Math.random(),options);    
    } 
    else
    {
     return false;
    } 
 }
   
function EditAskInfo(aid)
{
    var  options={  
               method:'get',  
               parameters:"&action=a&qID="+aid,
               onComplete:function(transport)
                {  
                    var returnvalue=transport.responseText;
                    document.getElementById("askContentSpan").innerHTML=returnvalue;
                }  
           }; 
    new  Ajax.Request(RootDir+'/home/ask/edit.aspx?no-cache='+Math.random(),options);    
}

function SaveEdit(aid)
{
    var con=document.getElementById("qContent").value;
    var  options={  
               method:'get',  
               parameters:"&action=update&content="+escape(con)+"&qID="+aid,
               onComplete:function(transport)
                {  
                    var returnvalue=transport.responseText;
                    //alert(returnvalue);
                    //document.getElementById("askContentSpan").innerHTML=returnvalue;
                    ShowEdit(aid);
                }  
           }; 
    new  Ajax.Request(RootDir+'/home/ask/edit.aspx?no-cache='+Math.random(),options);    
}
function ShowEdit(aid)
{
    var  options={  
               method:'get',  
               parameters:"&action=show&qID="+aid,
               onComplete:function(transport)
                {  
                    var returnvalue=transport.responseText;
                    document.getElementById("askContentSpan").innerHTML=returnvalue;
                }  
           }; 
    new  Ajax.Request(RootDir+'/home/ask/edit.aspx?no-cache='+Math.random(),options);    
}
</script>