<%@ page language="C#" autoeventwireup="true" inherits="news.News_News_Edit, LebiMall" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!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%></title>
    <meta name="description" content=<%=model_t.Description %> />
    <meta name="keywords" content=<%=model_t.Keywords %> />
    <meta name="generator" content="LBMall 3.0.0" />
    <link href="../images/css/css.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/css3.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/cart.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/shopcss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../images/js/shopjs.js"></script>
    <script type="text/javascript" src="../images/js/My97DatePicker/WdatePicker.js"></script>   
    <script type="text/javascript">
        function ReplaceAll(str, sptr, sptr1){

            while (str.indexOf(sptr) >= 0){
                str = str.replace(sptr, sptr1);
            }
            return str;
        }
        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);
        }
        function resizeEditor(name,size) {   
	        var newheight = parseInt(document.getElementById(name +"___Frame").style.height, 10) + size;   
	        if(newheight >= 150) {   
		        document.getElementById(name +"___Frame").style.height = newheight + 'px';   
	        }   
        } 
        function validate(){
            var flag=true;
            var flag2=false;
            if(document.getElementById("txt_title").value==""){
                document.getElementById("msg_title").innerHTML="<span class='msg_submit'>文章标题不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_title").innerHTML="";
            }
            
            if(document.all){
                ftext = ReplaceAll(ReplaceAll(window.frames[1].document.frames[0].document.body.innerText," ",""),"\r\n","");
                if(ftext == "")
                    flag2 = true;
            }
            else{
                ftext = window.frames[0].window.frames[0].document.body.innerText;
                if(ftext == "")
                    flag2 = true;
            }   
            if(flag2){
                document.getElementById("msg_fck").innerHTML="<span class='msg_submit'>内容描述不能为空！</span>";
                flag=false;
            }
            return flag;
        }
    </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">

            <script type="text/javascript">
           shopLeft();
            </script>

            <form id="form1" runat="server">
                <div id="right">
                    <div class="page-title">
                        <h2 class="shop clearfix">
                            文章发布
                        </h2>
                    </div>
                    <div class="contenter">
                        <div class="edit_address">
                            <div id="msg_error" style="margin-left:60px;" runat="server"></div>
                            <table cellspacing="0" cellpadding="0" class="tablec" id="tablec" runat="server" >
                                <tr>
                                    <td valign="top" align="right" class="rowa">
                                        类别：
                                    </td>
                                    <td valign="top" class="rowa2">
                                            <select id="Select1" runat="server"></select>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="rowa">
                                        标题：
                                    </td>
                                    <td class="rowa2">
                                    <input type="text" runat="server" id="txt_title" class="input" style="width:200px" />&nbsp;&nbsp;<span id="msg_title"></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="rowa">
                                        内容：
                                    </td>
                                    <td class="rowa2">
                                    <FCKeditorV2:FCKeditor ID="fck" runat="server" BasePath="~/images/js/fckeditor/" Height="200px" Width="650px">
                                    </FCKeditorV2:FCKeditor>
                                        <a href="javascript:resizeEditor('fck',-100)">
                                    <img src="../images/bt_close.gif" border='0'></a>&nbsp;<a href="javascript:resizeEditor('fck',150)"><img
                                        src="../images/bt_open.gif" border='0'></a><br />
                                        <span id="msg_fck"></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="rowa">
                                        提要：
                                    </td>
                                    <td class="rowa2">
                                        <textarea id="TextArea1" class="input_textarea" runat="server" cols="60" rows="3"></textarea>&nbsp;&nbsp;<em>少于200字</em>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="rowa">
                                        来源：
                                    </td>
                                    <td class="rowa2">
                                    <input type="text" runat="server" id="txt_source" class="input"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="rowa">
                                        发表时间：
                                    </td>
                                    <td class="rowa2">
                                        <input type="text" id="txt_time" class="texttime2"  runat=server onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',skin:'whyGreen',autoPickDate:'null'})" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td class="tdra2">
                                        <asp:Button ID="Button1" CssClass="btnbc" runat="server" Text="发表" OnClick="Button1_Click" OnClientClick="return validate();" />
                                    </td>
                                </tr>
                            </table>
                        </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>
