<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Master/AdminMP.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyCms.Manage.WebConfigs.Default" ValidateRequest="false" %>
<%@ MasterType VirtualPath="~/Manage/Master/AdminMP.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="5" cellspacing="5">
        <tr>
            <td>站点名称：</td>
            <td><asp:TextBox ID="tbSiteName" runat="server"></asp:TextBox></td>
            
            <td></td>
        </tr>
        <tr>
            <td>网站LOGO：</td>
            <td>
                <%=(!string.IsNullOrEmpty(logo))?"<div id=\"logoDiv\"><img src=\""+logo+"\" style=\"max-width:199px;\" /></div>":string.Empty %>
                <input type="button" id="logoBtn" value="选择图片" /> <span id="uploadstatus"></span>
                <input type="hidden" id="logo" name="logo" value="<%=logo %>" />
            </td>
            <td>推荐尺寸：199x73</td>
        </tr>
        <tr>
            <td>站点描述：</td>
            <td><asp:TextBox ID="tbMetaDescription" Width="248" TextMode="MultiLine" Rows="3" runat="server"></asp:TextBox></td>
            <td>请填写一段话用以描述本站，SEO。</td>
        </tr>
        <tr>
            <td>站点关键字：</td>
            <td><asp:TextBox ID="tbMetaKeyword" runat="server"></asp:TextBox></td>
            <td>请填写站点关键字，以英文逗号(,)隔开，SEO。</td>
        </tr>
        <tr>
            <td>站点域名：</td>
            <td><asp:TextBox ID="tbSiteAddress" runat="server"></asp:TextBox></td>
            <td></td>
        </tr>
        <tr>
            <td>站长邮箱：</td>
            <td><asp:TextBox ID="tbEmail" runat="server"></asp:TextBox></td>
            <td></td>
        </tr>
        <tr>
            <td>站点公告：</td>
            <td><asp:TextBox ID="tbNotice" Width="248" TextMode="MultiLine" Rows="3" runat="server"></asp:TextBox></td>
            <td>留空则不显示公告模块</td>
        </tr>
        <tr>
            <td>备案信息：</td>
            <td><asp:TextBox ID="tbCopyRight"  runat="server"></asp:TextBox></td>
            <td></td>
        </tr>
        <tr>
            <td>开启轮播图：</td>
            <td><asp:CheckBox ID="chkFlashOn" runat="server" /></td>
            <td></td>
        </tr>
        <tr>
            <td>评论自动审核：</td>
            <td><asp:CheckBox ID="chkCommentAuto" runat="server" /></td>
            <td></td>
        </tr>
        <tr>
            <td>统计代码：</td>
            <td><asp:TextBox ID="tbStatistic" Width="248" TextMode="MultiLine" Rows="5" runat="server"></asp:TextBox></td>
            <td></td>
        </tr>
        <tr>
            <td></td>
            <td>
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
            </td>
            <td></td>
        </tr>
    </table>

    <script type="text/javascript" src="<%=ResolveUrl("~/Static/Script/ajaxupload.js") %>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/Static/Script/Comm.js") %>"></script>
    <script>
        var action = '<%=ResolveUrl("~/Handler/Upload.ashx")%>';
        $(function () {
            upload("logoBtn", "uploadstatus", "image", action, callback);
        });
        function callback(file, response) {
            if (response.status) {
                $('#logo').val(response.imgurl);
                $('#uploadstatus').html('上传成功!');
                if ($('#logoDiv').length > 0) {
                    $('#logoDiv').html('<img src="' + response.imgurl + '" style=\"max-width:199px;\" />');
                } else {
                    $('#logoBtn').before('<div id="logoDiv"><img src="' + response.imgurl + '" style=\"max-width:199px;\" /></div>');
                }
            }
        }
    </script>
</asp:Content>
