<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Defult.Master" AutoEventWireup="true" CodeBehind="projectEdit.aspx.cs" Inherits="Maticsoft.Web.Admin.projectEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <link rel="stylesheet" href="../kindeditor-4.1.7/themes/default/default.css" />
    <link rel="stylesheet" href="../kindeditor-4.1.7/plugins/code/prettify.css" />
    <script charset="utf-8" src="../kindeditor-4.1.7/kindeditor.js"></script>
    <script charset="utf-8" src="../kindeditor-4.1.7/lang/zh_CN.js"></script>
    <script charset="utf-8" src="../kindeditor-4.1.7/plugins/code/prettify.js"></script>
    <script src="../Scripts/My97Date/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        KindEditor.ready(function (K) {
            var editor1 = K.create('#ctl00_ContentPlaceHolder1_jianjie', {
                cssPath: '../kindeditor-4.1.7/plugins/code/prettify.css',
                uploadJson: '../kindeditor-4.1.7/asp.net/upload_json.ashx',
                fileManagerJson: '../kindeditor-4.1.7/asp.net/file_manager_json.ashx',
                allowFileManager: true,
                //下面这行代码就是关键的所在，当失去焦点时执行 this.sync()，否则取不到值;
                afterBlur: function () { this.sync(); }
            });
        });
    </script>
    <div class="page-content">
        <div class="page-header">
            <h1>众筹项目修改
            </h1>
        </div>
        <div class="row">
            <div class="Content">
                <!-- PAGE CONTENT BEGINS -->
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        项目名称：
                    </label>
                    <div class="col-sm-9">
                        <input type="text" id="lengname" maxlength="30" placeholder="title" class="col-xs-10 col-sm-5" runat="server" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        项目短名：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="seoname" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        众筹周期：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="Duration" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <%if(Request.QueryString["type"] == "1") {%>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        出让股份：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="gufen" placeholder="%" runat="server" />
                            %
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        最小投资：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="minMoney" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <%} %>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        开始时间：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="startTime" placeholder="0" runat="server" onclick="WdatePicker()" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="statuscheckbox">
                        审核状态：
                    </label>
                    <div class="col-sm-9">
                        <div class="control-group">
                            <label>
                                <input name="checkbox" type="radio" class="ace" value="0" <%=isPast == "0" ? "checked":"" %>>
                                <span class="lbl">未通过</span>
                            </label>
                            <label>
                                <input name="checkbox" type="radio" class="ace" value="1" <%= isPast == "1"?"checked":"" %>>
                                <span class="lbl">通过</span>
                            </label>
                            <label>
                                <input name="checkbox" type="radio" class="ace" value="2" <%=isPast == "2" ? "checked":"" %>>
                                <span class="lbl">Banner推荐(需要项目背景图)</span>
                            </label>
                            <label>
                                <input name="checkbox" type="radio" class="ace" value="3" <%=isPast == "3" ? "checked":"" %>>
                                <span class="lbl">首页推荐(Banner下方位置)</span>
                            </label>
                            <label>
                                <input name="checkbox" type="radio" class="ace" value="4" <%=isPast == "4" ? "checked":"" %>>
                                <span class="lbl">成功推荐(需写成功留言)</span>
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group" id="successdiv">
                    <label class="col-sm-3 control-label no-padding-right">
                        成功留言：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="ganyan" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        众筹资金：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="target" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        项目Logo：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input id="smallImg" runat="server" type="file" />
                            <% if(!string.IsNullOrEmpty(model.smallImg)) {%>
                            <img src="../user/Image/<%=model.smallImg %>" width="300" height="230" />
                            <%} %>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        项目背景图：<small>图片长宽比例：2500*450</small></label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input id="BigImg" type="file" runat="server" />
                            <% if(!string.IsNullOrEmpty(model.bigImg)) {%>
                            <img src="../user/image/<%=model.bigImg %>" width="800" height="200" />
                            <%} %>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        项目视频：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="movies" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        浏览次数：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="lookcount" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        项目地址：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <input class="col-xs-10 col-sm-5" type="text" id="address" placeholder="0" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">
                        项目简介：</label>
                    <div class="col-sm-9">
                        <div class="clearfix">
                            <textarea id="jianjie" name="jianjie" rows="20" cols="140" runat="server"></textarea>
                        </div>
                    </div>
                </div>
                <div style="clear: both">
                </div>
                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" runat="server" id="submitButton" onserverclick="submitButton_Click">
                            <i class="icon-ok bigger-110"></i>提交
                        </button>
                        &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset">
                            <i class="icon-undo bigger-110"></i>重置
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="otherjquery" runat="server">
    <script>
        $(function () {
            // 这段代码效果为打开页面后，会根据选择项的不同而自动显示/隐藏div，不会出现必须点击对应check才有效果的尴尬
            $("input[name='checkbox']:checked").each(function () {
                var v = this.value;
                if (v == "4") {
                    $("#successdiv").css("display", "");
                } else {
                    $("#successdiv").css("display", "none")
                }
            });

            // 点击checkbox后的显示/隐藏div效果
            $("input[name='checkbox']").click(function () {
                var v = $("input[name='checkbox']:checked").val();
                if (v == 4) {
                    $("#successdiv").css("display", "");
                } else {
                    $("#successdiv").css("display", "none");
                }
            });
        });
    </script>
</asp:Content>
