<%@ Page Language="C#" AutoEventWireup="true" Codebehind="AddPost.aspx.cs" Inherits="ZYDN.Web.BBS.AddPost"
    EnableViewState="false"  ValidateRequest="False"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="stylesheet" type="text/css" href="../style/webMain.css" />
    <link rel="stylesheet" type="text/css" href="../style/labelStyle.css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <script language="javascript" type="text/javascript" src="../system/js/JFramework.js"></script>

    <script language="javascript" type="text/javascript" src="../system/js/sys.js"></script>

    <script language="javascript" type="text/javascript" src="../js/page.js"></script>

    <script language="javascript" type="text/javascript" src="bbs.js"></script>

    <title>发新贴</title>
    <% wJs();%>
    <style type="text/css">
.rowL{
    color: <%=fontColor %>;
    height: 30px;
    width: 15%;
    float: left;
    padding-left:5px;
    padding-top:8px;
    background-color: <%= rowBGcolor1%>;
}

.rowR{
   
    padding-left:5px;
    padding-top:4px;
    width: 85%; 
    float: left;
    color: <%=fontColor %>;
    height: 20px;
	text-align:left;
}

.row{
 padding-top:0px;

 border-bottom: 1px solid <%=bcolor%>;
 height: 20px;
 width:100%;
 clear:both;
}
</style>
<script language="javascript" type="text/javascript">
 function loadPostPage()
 {
     $("editTxt").src="../system/editor/Editor.htm";
     
     objs=objs=document.getElementsByName("pType");
     for (var i=0;i<objs.length;i++){
       // alert(objs[i].id);
       objs[i].onclick=function(){
            var id=this.id;
            id=id.replace("R","");
            if (id!="1"){
                id=parseInt(id);
                var divObj=document.getElementsByName("pTypeDiv");
                for (var x=0;x<divObj.length;x++){
                    if (x==id-2){
                        divObj[x].style.display="";
                    }else{
                        divObj[x].style.display="none";
                    }
                }
            }else{
                var divObj=document.getElementsByName("pTypeDiv");
                for (var x=0;x<divObj.length;x++){
                   divObj[x].style.display="none";
                }
            }
            
       }
     }
   }
   
   var bbsVoti=0;
   
  
   
 </script>
</head>
<body onLoad=" loadPostPage()">
    <center><form id="form1" >
        <div style="background-color: <%=rowBGcolor%>; width: <%=width+widthType%>; border: 1px solid <%=bcolor%>;"
            class="<%=zCss%>">
            <div style="width: 100%; width: 100%; height: <%=menuHeight%>px; background-color: <%= menuBGcolor%>;
                background-image: url('<%=menuBGimg%>')" class="<%=menuCss%>">
                <div style="color: <%=menuColor%>; padding: 5px 0px 0px 15px;">
                    发新贴
                </div>
            </div>
            <div style="padding: 0px 0px 0px 0px;width:100%;" id="editJob" name="editJob">
                <div class="row">
                    <div class="rowL">
                        作者
                    </div>
                    <div class="rowR">
                        <asp:Label ID="userName" runat="server" Text="Label"></asp:Label>
                    </div>
                </div>
                <div class="row">
                    <div class="rowL">
                        主题
                    </div>
                    <div class="rowR">
                      <select id="prefixSelect" name="prefixSelect">
                      <option value=""></option>
                      <option value="推荐">推荐</option>
                      <option value="求助">求助</option>
                      <option value="疑问">疑问</option>
                      <option value="原创">原创</option>
                      <option value="讨论">讨论</option>
                      <option value="其它">其它</option>
                      <option value="转贴">转贴</option>
                      <option value="已解决">已解决</option>
                      </select>
                      <input id="pTitle" type="text" style="width: 450px" title="主题"  isV="1" notNull="1"  maxlength="50" min="5"/>
                    </div>
                </div>
                <div class="row">
                    <div class="rowL" style="height:100%;">
                        贴子类型
                    </div>
                    <div class="rowR">
                        <input id="R1" name="pType"  type="radio" checked="CHECKED" /><label for="R1" >普通</label>
                        <input id="R2" name="pType"  type="radio" /><label for="R2" >调查</label>
                        <input id="R3" name="pType"  type="radio" /><label for="R3" >悬赏</label>
                        <input id="R4" name="pType"  type="radio" /><label for="R4" >收分</label>
                       <div id="pTypeDiv" name="pTypeDiv" style="display:none">
                         <div> 
                                <input id="R5" name="votType"  type="radio" checked="CHECKED"/><label for="R5" >单选</label>
                                <input id="R6" name="votType"  type="radio" /><label for="R6" >复选</label>
                         </div>
                         <div id="votDiv">
                         
                         
                         
                         </div>
                         <div>
                            <input onClick="addVot()" type="button" value="新增投票选项"/>
                         </div>
                         
                        
                        </div>
                        <div id="pTypeDiv"  name="pTypeDiv"  style="display:none">
                           设置悬赏分: <input id="bbsOutInt" type="text" value="20" title="悬赏分" isV="1" notNull="0" isNum="1" max="100" min="1"/>
                        </div>
                        <div id="pTypeDiv"  name="pTypeDiv"  style="display:none">
                           设置看此贴需你要收取多少积分: <input id="bbsInInt" type="text" value="20" title="收分贴" isV="1" notNull="0" isNum="1" max="100" min="1" />
                        </div>
                        
                        
                    </div>
                </div>
                
                <div class="row">
                    <div class="rowL" style="height:450px;">
                        内容
                    </div>
                    <div class="rowR">
                        <div id="editTextDiv" style="height: 430px; width: 100%">
                            <iframe src="" id="editTxt" name="editTxt" style="width: 100%; height: 100%" marginwidth="0"
                                marginheight="0" align="top" scrolling="no" frameborder="0"></iframe>
                        </div>
                    </div>
                </div>
                
                <div class="row">
                    <div class="rowL" >
                        
                    </div>
                    <div class="rowR" style="text-align:center;">
                       <input onClick="bbsPostSubmit()" type="button" value="发布主题 (ctrl+回车)" />
                    </div>
                </div>
                
                
            </div>
        </div>
        </form>
    </center>
</body>
</html>
