<%@ page language="C#" autoeventwireup="true" inherits="e_info_do, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
<%@ Register TagName="meta" TagPrefix="UC" Src="~/e/meta.ascx" %>
<%@ Register TagName="head" TagPrefix="UC" Src="~/e/head.ascx" %>
<%@ Register TagName="foot" TagPrefix="UC" Src="~/e/foot.ascx" %>
<!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 runat="server">
    <UC:meta ID="meta1" runat="server" />
</head>
<body>
    <form id="form1" runat="server" autocomplete="off">
    <asp:Label ID="pathcode" runat="server" Style="display: none">
    &nbsp;&raquo;&nbsp;信息资讯&nbsp;&raquo;&nbsp;发布/修改信息
    </asp:Label>
    <UC:head ID="head1" runat="server" />
    <%--main start--%>
    <div class="c1">
        <div class="b1">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="b1_l">
                    </td>
                    <td>
                        <div class="con1">
                            <ul>
                                <li class="on"><a title="刷新本页" href="javascript:void(0)" onclick="window.location=location.href">
                                    <asp:Literal ID="Literal_pathname" runat="server">添加信息</asp:Literal></a></li>
                            </ul>
                            <div class="clear">
                            </div>
                        </div>
                    </td>
                    <td align="right">
                        <div class="con2">
                        </div>
                    </td>
                    <td class="b1_r">
                    </td>
                </tr>
            </table>
        </div>
        <div class="v1">
            <div class="do1">

                <script type="text/javascript" src="../s/skin/image.js"></script>

                <script type="text/javascript">
                function check(){
                if(document.getElementById("HiddenField_classid").value==""){alert("请选择信息类别！");return false;}
                if(document.getElementById("title").value.replace(/ /g,"").replace(/　/g,"")==""){alert("信息标题不能为空！");return false;}
                }
                function del_thumbnail(){
                document.getElementById("HiddenField_thumbnail").value="";document.getElementById("thumbnail_td_td1").style.display="none";document.getElementById("thumbnail_td_td2").style.display="none";
                }
                </script>

                <table border="0" cellpadding="0" cellspacing="0" class="table1">
                    <tr>
                        <td class="tt">
                            <b>添加到：</b>
                        </td>
                        <td>

                            <script type="text/javascript">
                        function info_do_select_classid(classid){
                        document.getElementById("HiddenField_classid").value=classid;                      
                        var list =document.getElementById("info_do_select_classid_box").getElementsByTagName("a");
                        for(var i=0;i<list.length;i++)list[i].className="";
                        if(document.getElementById("info_do_select_classid"+classid))document.getElementById("info_do_select_classid"+classid).className="on";else {alert("没有找到相应类别！");document.getElementById("HiddenField_classid").value="";}
                        }
                            </script>

                            <style type="text/css">
                                .self_class
                                {
                                    padding: 5px 5px 5px 5px;
                                }
                                .self_class li
                                {
                                }
                                .self_class li a
                                {
                                    font-size: 12px;
                                    line-height: 20px;
                                    display: block;
                                    color: #333;
                                    background-color: #fff;
                                    padding-left: 5px;
                                }
                                .self_class li a:hover, .self_class .on
                                {
                                    color: #fff;
                                    background-color: #55a0e6;
                                    text-decoration: none;
                                }
                                .self_class .on
                                {
                                    background-color: #1a7cd8;
                                }
                                .self_class .self_paddingleft
                                {
                                    padding-left: 48px;
                                }
                            </style>
                            <div class="inp1 self_class" id="info_do_select_classid_box" style="height: 120px;
                                width: 387px; overflow-y: scroll">
                                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            <b>信息标题：</b>
                            <asp:HiddenField ID="HiddenField_classid" runat="server" />
                            <asp:HiddenField ID="HiddenField_thumbnail" runat="server" />
                            <asp:Literal ID="JS1" runat="server"></asp:Literal>
                        </td>
                        <td>
                            <asp:TextBox ID="title" runat="server" MaxLength="200" CssClass="inp1" Width="396" autocomplete="off"></asp:TextBox>

                            <script type="text/javascript">document.getElementById("title").focus();</script>
                            
                            <span class="msgon" style="background-image:none; padding-left:0"><asp:HyperLink ID="HyperLink1" runat="server" Visible="false" Target="_blank" style="color:#ff0000">[打开页面]</asp:HyperLink></span>
  
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            外部链接：
                        </td>
                        <td>
                            <asp:TextBox ID="url" runat="server" MaxLength="500" CssClass="inp1" Width="396" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt" style="color:#999;">
                            页面标题：
                        </td>
                        <td>
                            <asp:TextBox ID="pagetitle" runat="server" MaxLength="200" CssClass="inp1" Width="396" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt" style="color:#999;">
                            关键字：
                        </td>
                        <td>
                            <asp:TextBox ID="keywords" runat="server" MaxLength="200" CssClass="inp1" Width="396" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt" style="color:#999;">
                            页面描述：
                        </td>
                        <td>
                            <asp:TextBox ID="description" runat="server" TextMode="MultiLine" CssClass="inp1" Width="396" Height="100" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            代表图片：
                        </td>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" style="cursor: default">
                                <tr>
                                    <td>
                                        <div class="abs" style="*display: none">
                                            <table width="400" border="0" cellspacing="0" cellpadding="0" height="24">
                                                <tr>
                                                    <td id="upimg1_txt" width="322" style="border: solid 1px #ccc">
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td width="72" style="border: solid 1px #ccc" class="ce" style="color: #333">
                                                        浏览...
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <asp:FileUpload ID="upimg1" runat="server" size="55" CssClass="inp1 self_inp1" ToolTip="jpg,jpeg,png,bmp,gif" autocomplete="off" />
                                    </td>
                                    <td style="padding-left: 15px" id="thumbnail_td_td1" class="thumbnail_td">
                                        <asp:Literal ID="Literal_thumbnail" runat="server"></asp:Literal>
                                    </td>
                                    <td style="padding-left: 10px" id="thumbnail_td_td2" class="thumbnail_td">
                                        <asp:HyperLink ID="HyperLink_thumbnail" runat="server" Visible="false" href="javascript:void(0)"
                                            onclick="del_thumbnail()">[删除图片]</asp:HyperLink>
                                        <style type="text/css">
                                            .thumbnail_td a
                                            {
                                                color: #666;
                                            }
                                            .thumbnail_td a:hover
                                            {
                                                color: #ff6600;
                                            }
                                        </style>
                                    </td>
                                </tr>
                            </table>
                            <style type="text/css">
                                .self_inp1
                                {
                                    width: 393px; *width:400px;height:20px;*height:24px;filter:-moz-opacity:0;opacity:0;}</style>

                            <script type="text/javascript">
                                     if (navigator.userAgent.indexOf('Firefox') >= 0){document.getElementById("upimg1").style.width="400px";  document.getElementById("upimg1").style.height="24px";}
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            <b>信息内容：</b>
                            <div class="self_funlink1">
                                <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_OnClick" CommandArgument="1">(删除表格)</asp:LinkButton>
                                <br />
                                <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton1_OnClick" CommandArgument="2">(整理换行)</asp:LinkButton>
                            </div>
                            <style type="text/css">
                                .self_funlink1
                                {
                                    padding-top: 3px;
                                }
                                .self_funlink1 a
                                {
                                    font-weight: normal;
                                    padding-right: 10px;
                                    color: #999;
                                }
                                .self_funlink1 a:hover
                                {
                                    color: #666;
                                    text-decoration: none;
                                }
                            </style>
                        </td>
                        <td>
                          
                            <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="~/s/tool/fck/" Height="550"
                                Width="850" ToolbarSet="Edit2_a_fontsize">
                            </FCKeditorV2:FCKeditor>
                            <asp:Panel ID="Panel1" runat="server">                            
                            <link rel="stylesheet" href="/s/tool/editor/themes/default/default.css" />
                            <link rel="stylesheet" href="/s/tool/editor/plugins/code/prettify.css" />
                            <script charset="utf-8" src="/s/tool/editor/kindeditor.js"></script>
                            <script charset="utf-8" src="/s/tool/editor/lang/zh_CN.js"></script>
                            <script charset="utf-8" src="/s/tool/editor/plugins/code/prettify.js"></script>
	                        <script>
		                        KindEditor.ready(function(K) {
			                        var editor1 = K.create('#Content1', {
				                        cssPath : '/s/tool/editor/plugins/code/prettify.css',
				                        uploadJson : '/s/tool/editor/asp.net/upload_json.ashx',
				                      
				                        fileManagerJson : '/s/tool/editor/asp.net/file_manager_json.ashx',				                        
				                        allowFileManager : true,
				                        filterMode:false,
				                        resizeType : 1,
				                        afterCreate : function() {
					                        var self = this;					                   
					                        K.ctrl(self.edit.doc, 13, function() {
						                        self.sync();
						                        document.getElementById("Button1").click();
					                        });
				                        }
			                        });
			                        prettyPrint();
		                        });
	                        </script>
	                        </asp:Panel>
                            <asp:TextBox ID="Content1" runat="server" style="width:850px;height:550px;visibility:hidden;"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            其它选项：
                        </td>
                        <td>
                            <asp:DropDownList ID="slide" runat="server" Width="100">
                                <asp:ListItem Value="0">普通</asp:ListItem>
                                <asp:ListItem Value="1">设为幻灯片</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="istop" runat="server" Width="100">
                                <asp:ListItem Value="0">普通</asp:ListItem>
                                <asp:ListItem Value="1">设为置顶</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="isred" runat="server" Width="100">
                                <asp:ListItem Value="0">普通</asp:ListItem>
                                <asp:ListItem Value="1">标题套红</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="plswitch" runat="server" Width="100">
                                <asp:ListItem Value="1">开启允许评论</asp:ListItem>
                                <asp:ListItem Value="0">关闭禁止评论</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            发布时间：
                        </td>
                        <td>
                            <asp:TextBox ID="time" runat="server" MaxLength="19" CssClass="inp1" Width="150" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                        <td class="tt">
                            FLV视频：
                        </td>
                        <td>
                            <asp:TextBox ID="flv" runat="server" MaxLength="500" CssClass="inp1" Width="396" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            信息来源：
                        </td>
                        <td>
                            <asp:TextBox ID="infofrom" runat="server" MaxLength="50" CssClass="inp1" Width="200" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            UID：
                        </td>
                        <td>
                            <asp:TextBox ID="uid" runat="server" MaxLength="8" CssClass="inp1" Width="100" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            排序值：
                        </td>
                        <td>
                            <asp:TextBox ID="sorting" runat="server" MaxLength="8" CssClass="inp1" Width="100" Text="0" ToolTip="只对首页信息排序起效" autocomplete="off"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            展现形式：
                        </td>
                        <td>
                            <asp:DropDownList ID="ShowPageType" runat="server" Width="200">
                                <asp:ListItem Value="">默认</asp:ListItem>
                                <asp:ListItem Value="wide">宽页面</asp:ListItem>
                                <asp:ListItem Value="gallery1">画廊一</asp:ListItem>
                                <asp:ListItem Value="gallery2">画廊二</asp:ListItem>
                            </asp:DropDownList>                            
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            &nbsp;
                        </td>
                        <td>
                            <asp:CheckBox ID="CheckBox1" runat="server" Text="保存远程图片" Style="color: #999" />
                            &nbsp;&nbsp;
                            <asp:CheckBox ID="CheckBox2" runat="server" Text="添加水印" Style="color: #999" />
                            &nbsp;&nbsp;
                            <asp:CheckBox ID="CheckBox3" runat="server" Text="过滤内容中的链接" Style="color: #999" />
                            &nbsp;&nbsp;
                            <asp:CheckBox ID="CheckBox4" runat="server" Text="限制图片宽度" Style="color: #999" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            &nbsp;
                        </td>
                        <td>
                            <asp:Button ID="ButtonSubmit" runat="server" CssClass="but1" Text="添加" OnClick="ButtonSubmit_Click"
                                OnClientClick="return check()" />&nbsp;
                            <input type="button" value="返回" class="but1" onclick="window.location='info.aspx'" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <%--main end--%>
    <UC:foot ID="foot1" runat="server" />
    </form>
</body>
</html>
