<%@ page language="C#" autoeventwireup="true" inherits="Forum, LebiMall" validaterequest="false" enableviewstate="false" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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><%=model_t.Title %>-<%=shopname %>-交流区</title>
    <meta name="description" content=<%=model_t.Description %> />
    <meta name="keywords" content=<%=model_t.Keywords %> />
    <meta name="generator" content="LBMall 3.0.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <link href="images/css/css3.css" rel="stylesheet" type="text/css" />
    <link href="images/css/css.css" rel="stylesheet" type="text/css" />
    <link href="images/css/shopcss.css" rel="stylesheet" type="text/css" />
    <link href="images/css/shop.css" rel="stylesheet" type="text/css" />
    <link href=<%=styleurl %> rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="images/js/shopjs.js"></script>
    <script type="text/javascript">
        function getCookies(name)
        {
            var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
            if(arr != null) return decodeURI(arr[2]); return null;
        }    
        function imgf(){
            document.getElementById("img1").src=document.getElementById("img1").src+'?';
        }
        function getback(){
            document.getElementById("posttitle").focus(); 
            window.scrollTo(0,document.body.scrollHeight);
        }
        function val(){
            if(document.getElementById("posttitle").value==""){
                document.getElementById("msg").innerHTML="标题不能为空！";
                return false;
            }
            if(document.getElementById("postcontent").value==""){
                document.getElementById("msg").innerHTML="内容不能为空！";
                return false;
            }
            var cook_ck=getCookies('CheckCodeld');
            var txt_=document.getElementById("security-code").value;
            if(txt_==""){
                document.getElementById("msg").innerHTML="请输入校验码"
                return false;
            }else if(cook_ck==txt_){
               document.getElementById("msg").style.display="none";
               return true;
            }else{
                document.getElementById("msg").innerHTML="请正确填写校验码";
                return false;
            }
        }
        function search2(){
            var texts2=document.getElementById("ser2").value;
            var select_v2=document.getElementById("Select3").value;
            window.location="list.aspx?tid="+select_v2+"&titlec="+escape(texts2);
        }
    </script>
</head>
<body>
     <div id="top-menu02">
        <div id="top-menu">
            <div class="right">
                <script type="text/javascript">indexhead();</script>
            </div>
        </div>
    </div>
    <div id="top">
        <div id="logo">
            <a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">
                <img src="Upload/WebAdminImages/<%=model_t.Logoimg %>" border="0" /></a></div>
    </div>
    <div id="sp-menu">
        <ul>
            <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">首页</a></li>
            <%for (int i = 0; i < ds_tab.Tables[0].Rows.Count; i++){ %>
            <li><%if (model_t.Tab == "1")
                  { %>
                <a href="<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>/" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%}else{%>
                <a href="TopTab.aspx?type=<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%} %></li>
            <%} %>
            <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/News/" target="_blank">资讯</a></li>
        </ul>
        <p>
            <span><a href="ShopCoupon.aspx">优惠券</a></span></p>
    </div>
    <div id="contenter2">
        <div id="contenter">
            <form id="Form1" runat="server">
                <div id="mainbody">
                    <div style="background-image: url(Upload/shop/<%=banner %>); height: 160px" class="box shop-header ">
                        <div class="zl-divFlash">
                            <embed src="images/flash/<%=flash %>" width="960px" height="160px" type="application/x-shockwave-flash"
                                wmode="transparent">
                                <param name="wmode" value="transparent" />
                            </embed>
                        </div>
                        <div class="shop-summary">
                            <div class="shop-regular-hd">
                            </div>
                        </div>
                        <div class="shop-nav">
                            <ul>
                                <li title="首页"><a title="首页" href="<%=getYm(shopid.ToString(),yuming) %>"><em>首页</em></a> </li>
                                <asp:Repeater runat="server" ID="rpTab">
                                    <ItemTemplate>
                                        <li title='<%#Eval("Sname") %>'><a title='<%#Eval("Sname") %>' href="<%#Eval("Slink") %>?showid=<%#Eval("Id") %>&id=<%#Eval("Shopid") %>">
                                            <em><%#Eval("Sname") %></em></a></li>
                                    </ItemTemplate>
                                </asp:Repeater>
                                <li title="优惠券"><a title="优惠券" href="Coupons.aspx?id=<%=shopid %>"><em>优惠券</em></a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-body">
                        <div class="topbtn">
                            <a href="javascript:getback()" class="offwhite">发表新帖</a>
                        </div>
                        <div class="both">
                        </div>
                        <table cellpadding="0" cellspacing="0" class="tablef">
                            <tr>
                                <td class="ftd1">
                                    标题
                                </td>
                                <td class="ftd2">
                                    回复数
                                </td>
                                <td class="ftd3">
                                    作者
                                </td>
                                <td class="ftd4">
                                    最后回复
                                </td>
                            </tr>
                            <%for (int i = 0; i < dsl.Tables[0].Rows.Count; i++){ %>
                                <%if(i%2==0){ %>
                                    <tr>
                                        <td class="ftd1-c">
                                            <a href="ForumDetail.aspx?id=<%=dsl.Tables[0].Rows[i]["id"].ToString() %>"><%=dsl.Tables[0].Rows[i]["stitle"].ToString() %></a><%if (dsl.Tables[0].Rows[i]["state"].ToString() == "1"){%>[<span style="color: #5A9E29;">掌柜回复</span>]<%} %>
                                            <%if (dsl.Tables[0].Rows[i]["uid"].ToString() ==uid){%>[<span style="color: #5A9E29;">掌柜发帖</span>]<%} %>
                                        </td>
                                        <td class="ftd2-c">
                                            <%=dsl.Tables[0].Rows[i]["lcount"].ToString() %>
                                        </td>
                                        <td class="ftd3-c">
                                            <%=dsl.Tables[0].Rows[i]["uname"].ToString() %>
                                        </td>
                                        <td class="ftd4-c">
                                            <%=dsl.Tables[0].Rows[i]["backendtime"].ToString() %><br />
                                            
                                            <%=dsl.Tables[0].Rows[i]["backname"].ToString() %>
                                            <%if (dsl.Tables[0].Rows[i]["scuid"].ToString() == uid){%>[<span style="color: #5A9E29;">掌柜</span>]<%} %>
                                        </td>
                                    </tr>
                                <%}else {%>
                                    <tr bgcolor="#f0f0f0">
                                        <td class="ftd1-c">
                                            <a href="ForumDetail.aspx?id=<%=dsl.Tables[0].Rows[i]["id"].ToString() %>"><%=dsl.Tables[0].Rows[i]["stitle"].ToString() %></a><%if (dsl.Tables[0].Rows[i]["state"].ToString() == "1"){%>[<span style="color: #5A9E29;">掌柜回复</span>]<%} %>
                                        </td>
                                        <td class="ftd2-c">
                                            <%=dsl.Tables[0].Rows[i]["lcount"].ToString() %>
                                        </td>
                                        <td class="ftd3-c">
                                            <%=dsl.Tables[0].Rows[i]["uname"].ToString() %>
                                        </td>
                                        <td class="ftd4-c">
                                            <%=dsl.Tables[0].Rows[i]["backendtime"].ToString() %><br />
                                            
                                            <%=dsl.Tables[0].Rows[i]["backname"].ToString() %>
                                             <%if (dsl.Tables[0].Rows[i]["scuid"].ToString() == uid){%>[<span style="color: #5A9E29;">掌柜</span>]<%} %>
                                        </td>
                                    </tr>
                                <%} %>
                            <%} %>
                        </table>
                        <div style="float: right; height: 30px;">
                            <webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                                runat="server" RecordCount="228" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                                PrevPageText="上一页" PageSize="20" UrlPaging="True" NumericButtonCount="5">
                            </webdiyer:AspNetPager>
                        </div>
                        <div class="both">
                        </div>
                        <div class="shop-bbs">
                            <div id="postThread" class="shop-discuss-form">
                                <h3 class="post-publish">
                                    发表新帖</h3><div class="both"></div>
                                <div class="shop-discuss-form-main">
                                    <fieldset>
                                        <legend>发表新帖</legend>
                                        <ul class="post-ul post-ul-first msg">
                                            <li>
                                                <label class="first" for="post-title">
                                                    标题：</label>
                                                <input runat="server" type="text" id="posttitle" class="text f-post-title" />
                                            </li>
                                            <li>
                                                <label class="first" for="post-content">
                                                    内容：</label>
                                                <textarea runat="server" id="postcontent" class="text f-post-content"></textarea>
                                            </li>
                                        </ul>
                                        <ul class="post-ul post-ul-last msg">
                                            <li>
                                                <label class="first" for="security-code">
                                                    验证码：</label>
                                                <input type="text" id="security-code" class="text f-security-code " maxlength="5" /><span
                                                    class="explain-inline">(请输入下图中的五位验证码)</span><br />
                                                <img id="img1" class="code-pic" src="imgcheck.aspx" language="javascript" onclick="this.src=this.src+'?'">
                                                <a onclick="javascript:document.getElementById('img1').src=document.getElementById('img1').src+'?'"
                                                    class="dian_div" onmouseout="this.className='dian_out'" onmouseover="this.className='dian_over'">
                                                    看不清？换一张</a><div id="msg" class="yanmsg"></div></li>
                                        </ul>
                                    </fieldset>
                                    <div class="sumbit-box">
                                        <asp:Button ID="Button1" CssClass="sumbit-box2" runat="server" Text="确定" OnClientClick="return val();" OnClick="Button1_Click" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>

             <div id="footer">
                <div id="copyright">
                    <div class="search">
                        <div class="search-left">
                            <div class="search-left-title">
                                搜索：</div>
                            <div class="search-left-form">
                                <input type="text" runat="server" id="ser2" size="30" /></div>
                            <div class="search-left-list">
                                <select id="Select3" runat="server">
                                </select>
                            </div>
                            <div class="search-left-button">
                                <img src="images/search-buttom.gif" width="60" height="20" onclick="search2()" /></div>
                        </div>
                        <div class="search-right">
                            <div runat=server id="div_s2"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="copyright" runat="server" id="copr"></div>
        </div>
    </div>
</body>
</html>
