<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrintEdit.aspx.cs" Inherits="LMN.Web.Admin.Order.PrintEdit" %>

<%@ Import Namespace="LMN.Common" %>
<!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></title>
<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<link href="../Scripts/wbox/wbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../Scripts/jquery-1.4.1.min.js"></script>
<script src="../Scripts/wbox.js" type="text/javascript"></script>
<script src="../Scripts/common.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server" target="iframe">
    <div style="padding: 20px;">
        <h4 class="title">文章信息</h4>
        <div class="division">
            <table width="100%">
                <tr>
                    <th class="w120">快递公司: </th>
                    <td>
                        <asp:DropDownList ID="express" runat="server">
                        </asp:DropDownList>
                        &nbsp;<input type="checkbox" id="enable" name="enable" value="1" runat="server" /><label for="enable">启用</label></td>
                </tr>
                <tr>
                    <th>打印别名:</th>
                    <td><input type="text" runat="server" size="20" name="name" id="name" /> 宽:<input type="text" name="width" id="width" runat="server" size="3" value="0" /> 高:<input type="text" name="height" id="height" runat="server" size="3" value="0" /></td>
                </tr>
                <tr>
                    <th>设置背景:</th>
                    <td><input type="text" id="bgimage" name="bgimage" runat="server" /> <a href="javascript:;" onclick="imageSel(this)">选择图片</a>
                        <%--<input type="button" value="选择图片" onclick="OpenDialog('txtBg')" />--%>
                        <input type="button" value="设置背景" onclick="document.getElementById('dly_printer_editor_flash').setBg(document.getElementById('bgimage').value)" /></td>
                </tr>
                <tr>
                    <th>排序:</th>
                    <td>添加打印项： <select id="selectPrintObj">
                        <option>请选择要插入的打印项</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_name','收货人-姓名');">收货人-姓名</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_area_0','收货人-地区1级')">收货人-地区1级</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_area_1','收货人-地区2级')">收货人-地区2级</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_area_2','收货人-地区3级')">收货人-地区3级</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_addr','收货人-地址')">收货人-地址</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_tel','收货人-电话')">收货人-电话</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_mobile','收货人-手机')">收货人-手机</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_zip','收货人-邮编')">收货人-邮编</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_name','发货人-姓名')">发货人-姓名</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_area_0','发货人-地区1级')">发货人-地区1级</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_area_1','发货人-地区2级')">发货人-地区2级</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_area_2','发货人-地区3级')">发货人-地区3级</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_address','发货人-地址')">发货人-地址</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_tel','发货人-电话')">发货人-电话</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_mobile','发货人-手机')">发货人-手机</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_zip','发货人-邮编')">发货人-邮编</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('date_y','当日日期-年')">当日日期-年</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('date_m','当日日期-月')">当日日期-月</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('date_d','当日日期-日')">当日日期-日</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_id','订单-订单号')">订单-订单号</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_price','订单总金额')">订单总金额</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_weight','订单物品总重量')">订单物品总重量</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_count','订单-物品数量')">订单-物品数量</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_memo','订单-备注')">订单-备注</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_time','订单-送货时间')">订单-送货时间</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('shop_name','网店名称')">网店名称</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('tick','对号 - √')">对号 - √</option>
                        <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('text','自定义内容')">自定义内容</option>
                    </select> <input type="button" value="插入" onclick="window.location.href=document.getElementById('selectPrintObj').options[document.getElementById('selectPrintObj').options.selectedIndex].value" /> <input type="button" value="删除项" onclick="dly_printer_editor_flash.delItem()" />
                        <%--&nbsp;&nbsp; 快递单名称：<asp:TextBox ID="txtName" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
                  <span class="NeedMsg">*</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtName"
                                    ErrorMessage="不能为空"></asp:RequiredFieldValidator>--%>
                        <br />
                        <select id="jianju2" style="height: 20px" onchange="if(this.value!='--')document.getElementById('dly_printer_editor_flash').setFontSize(this.value);" name="font">
                            <option value="--">大小</option>
                            <option value="10">10</option>
                            <option value="12">12</option>
                            <option value="14">14</option>
                            <option value="18">18</option>
                            <option value="20">20</option>
                            <option value="24">24</option>
                            <option value="27">27</option>
                            <option value="30">30</option>
                            <option value="36">36</option>
                        </select> <select onchange="if(this.value!='--')document.getElementById('dly_printer_editor_flash').setFont(this.value);">
                            <option value="--">字体</option>
                            <option value="宋体">宋体</option>
                            <option value="黑体">黑体</option>
                            <option value="Arial">Arial</option>
                            <option value="Verdana">Verdana</option>
                            <option value="Serif">Serif</option>
                            <option value="Cursive">Cursive</option>
                            <option value="Fantasy">Fantasy</option>
                            <option value="Sans-Serif">Sans-Serif</option>
                        </select> <select id="jianju" style="height: 20px" onchange="if(this.value!='--')document.getElementById('dly_printer_editor_flash').setFontSpace(this.value);" name="jianju">
                            <option value="--">间距</option>
                            <option value="-4">-4</option>
                            <option value="-2">-2</option>
                            <option value="0">0</option>
                            <option value="2">2</option>
                            <option value="4">4</option>
                            <option value="6">6</option>
                            <option value="8">8</option>
                            <option value="10">10</option>
                            <option value="12">12</option>
                            <option value="14">14</option>
                            <option value="16">16</option>
                            <option value="18">18</option>
                            <option value="20">20</option>
                            <option value="22">22</option>
                            <option value="24">24</option>
                            <option value="26">26</option>
                            <option value="28">28</option>
                            <option value="30">30</option>
                        </select> <input type="button" value="B" onclick="document.getElementById('dly_printer_editor_flash').setBorder()" /> <input type="button" value="I" onclick="document.getElementById('dly_printer_editor_flash').setItalic()" /> <input type="button" value="居左" onclick="document.getElementById('dly_printer_editor_flash').setAlign('left')" /> <input type="button" value="居中" onclick="document.getElementById('dly_printer_editor_flash').setAlign('center')" /> <input type="button" value="居右" onclick="document.getElementById('dly_printer_editor_flash').setAlign('right')" />
                        <!--<SPAN class="sysiconBtnNoIcon" onclick="printer_editor.setBorder(1)"><STRONG>B</STRONG></SPAN></TD><TD><SPAN class="sysiconBtnNoIcon" onclick="printer_editor.setItalic(1)"><EM><STRONG>I</STRONG></EM></SPAN></TD><TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><IMG style="BACKGROUND-POSITION: 0px -608px; BACKGROUND-IMAGE: url(images/ImageBundle.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 16px" onclick="printer_editor.setAlign('left')" src="http://192.168.1.186/shopex/shopadmin/images/transparent.gif" border="0" /></TD><TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><IMG style="BACKGROUND-POSITION: 0px -640px; BACKGROUND-IMAGE: url(images/ImageBundle.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 16px" onclick="printer_editor.setAlign('center')" src="http://192.168.1.186/shopex/shopadmin/images/transparent.gif" border="0" /></TD><TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><IMG style="BACKGROUND-POSITION: 0px -656px; BACKGROUND-IMAGE: url(images/ImageBundle.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 16px" onclick="printer_editor.setAlign('right')" src="http://192.168.1.186/shopex/shopadmin/images/transparent.gif" border="0" />-->
                        <input id="flashData" name="flashData" type="hidden" /></td>
                </tr>
                <tr>
                    <th colspan="2" style="text-align: left; height: 615px;">
                        <object id="dly_printer_editor_flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="100%" height="615">
                            <param name="movie" value="../images/printer.swf" />
                            <param name="quality" value="high" />
                            <param name="wmode" value="transparent" />
                            <param value="<%=ItemContent %>" name="flashVars" />
                            <!--[if !IE]>-->
                            <object id="dly_printer_editor_flash" data="../images/printer.swf" width="100%" height="615" type="application/x-shockwave-flash">
                                <param name="quality" value="high" />
                                <param name="pluginurl" value="http://www.adobe.com/go/getflashplayer" />
                                <param name="wmode" value="transparent" />
                                <param value="<%=ItemContent %>" name="flashVars" />
                            </object>
                            <!-- <![endif]-->
                        </object>
                        <%--<object id='dly_printer_editor_flash' height="615px" width="831px" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
                            <param value="high" name="quality" />
                            <param value="always" name="allowScriptAccess" />
                            <param value="opaque" name="wMode" />
                            <param value="true" name="swLiveConnect" />
                            <param value="<%=ItemContent %>" name="flashVars" />
                            <param value="../images/printer.swf" name="movie" />
                        </object>--%>
                        <%--<div id="dly_printer_editor" style="border-right: #999 1px solid; border-top: #999 1px solid; border-left: #999 1px solid; width: 831px; border-bottom: #999 1px solid; height: 615px; border-solid: 1px 1px 0 0">
                        </div>--%>
                    </th>
                </tr>
                <tr>
                    <th>&nbsp;</th>
                    <td><b class="submitBtn"><input type="submit" value="保存" onclick="saveData()" /></b><%--<asp:Button ID="Button1" runat="server" CssClass="button" Text="保存快递单" OnClientClick="saveData()"/>--%></td>
                </tr>
            </table>
        </div>
    </div>
</form>
<iframe id="iframe" name="iframe" src="about:blank" style="display: ;"></iframe>
<script type="text/javascript">
<!--
    function saveData() {
        var obj = document.getElementById('dly_printer_editor_flash');
        //alert(obj.getData());
        form1.flashData.value = 'data=' + escape(obj.getData()) + '&bg=' + document.getElementById('bgimage').value + '&copyright=shopex';
        this.form.submit();
    }
    $.ready(function() {
        if ($('#bgimage').va() != "") {
            document.getElementById('dly_printer_editor_flash').setBg($('#bgimage').va());
        }
    });

    //    $(document).ready(function() {
    //        // ckeditor
    //        var oFcKeditor = new FCKeditor('content');
    //        oFcKeditor.Config['ToolbarStartExpanded'] = false;
    //        oFcKeditor.BasePath = "<%=Config.SitePath %>ckeditor/";
    //        oFcKeditor.Height = 80;
    //        oFcKeditor.ToolbarSet = 'Desc';
    //        oFcKeditor.ReplaceTextarea();
    //    });
//-->
</script>
</body>
</html>
