<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productedit.aspx.cs" Inherits="QiZhanBang.Web.backend.productedit" ValidateRequest="false" %>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>产品管理</title>
<link href="images/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="demo.css" media="all">
<style type="text/css">
<!--
body { padding:10px }
-->
</style>
    <link rel="stylesheet" href="editor/themes/default/default.css" />
	<link rel="stylesheet" href="editor/plugins/code/prettify.css" />
	<script charset="utf-8" src="editor/kindeditor.js" type="text/javascript"></script>
	<script charset="utf-8" src="editor/lang/zh_CN.js" type="text/javascript"></script>
	<script charset="utf-8" src="editor/plugins/code/prettify.js" type="text/javascript"></script>
	<script type="text/javascript">
	    KindEditor.ready(function (K) {
	        var editor1 = K.create('#editorcontent', {
	            cssPath: 'editor/plugins/code/prettify.css',
	            uploadJson: 'editor/upload_json.ashx',
	            fileManagerJson: 'editor/file_manager_json.ashx',
	            allowFileManager: true,
	            afterCreate: function () {
	                var self = this;
	                K.ctrl(document, 13, function () {
	                    self.sync();
	                    K('form[name=Form1]')[0].submit();
	                });
	                K.ctrl(self.edit.doc, 13, function () {
	                    self.sync();
	                    K('form[name=Form1]')[0].submit();
	                });
	            }
	        });
	        prettyPrint();
	    });
	</script>
<script type="text/javascript">
    KindEditor.ready(function (K) {
        var uploadbutton = K.uploadbutton({
            button: K('#uploadButton')[0],
            fieldName: 'imgFile',
            url: 'editor/upload_json.ashx',
            afterUpload: function (data) {
                if (data.error === 0) {
                    var txtincludepicpath = K.formatUrl(data.url, 'absolute');
                    K('#txtincludepicpath').val(txtincludepicpath);
                } else {
                    alert(data.message);
                }
            },
            afterError: function (str) {
                alert('自定义错误信息: ' + str);
            }
        });
        uploadbutton.fileBox.change(function (e) {
            uploadbutton.submit();
        });

        //button2
        var uploadbutton2 = K.uploadbutton({
            button: K('#uploadButton2')[0],
            fieldName: 'imgFile',
            url: 'editor/upload_json.ashx',
            afterUpload: function (data) {
                if (data.error === 0) {
                    var txtincludepicpath2 = K.formatUrl(data.url, 'absolute');
                    K('#txtincludepicpath2').val(txtincludepicpath2);
                } else {
                    alert(data.message);
                }
            },
            afterError: function (str) {
                alert('自定义错误信息: ' + str);
            }
        });
        uploadbutton2.fileBox.change(function (e) {
            uploadbutton2.submit();
        });

        //button3
        var uploadbutton3 = K.uploadbutton({
            button: K('#uploadButton3')[0],
            fieldName: 'imgFile',
            url: 'editor/upload_json.ashx',
            afterUpload: function (data) {
                if (data.error === 0) {
                    var txtincludepicpath3 = K.formatUrl(data.url, 'absolute');
                    K('#txtincludepicpath3').val(txtincludepicpath3);
                } else {
                    alert(data.message);
                }
            },
            afterError: function (str) {
                alert('自定义错误信息: ' + str);
            }
        });
        uploadbutton3.fileBox.change(function (e) {
            uploadbutton3.submit();
        });

        //button4
        var uploadbutton4 = K.uploadbutton({
            button: K('#uploadButton4')[0],
            fieldName: 'imgFile',
            url: 'editor/upload_json.ashx',
            afterUpload: function (data) {
                if (data.error === 0) {
                    var txtincludepicpath4 = K.formatUrl(data.url, 'absolute');
                    K('#txtincludepicpath4').val(txtincludepicpath4);
                } else {
                    alert(data.message);
                }
            },
            afterError: function (str) {
                alert('自定义错误信息: ' + str);
            }
        });
        uploadbutton4.fileBox.change(function (e) {
            uploadbutton4.submit();
        });

        //button5
        var uploadbutton5 = K.uploadbutton({
            button: K('#uploadButton5')[0],
            fieldName: 'imgFile',
            url: 'editor/upload_json.ashx',
            afterUpload: function (data) {
                if (data.error === 0) {
                    var txtincludepicpath5 = K.formatUrl(data.url, 'absolute');
                    K('#txtincludepicpath5').val(txtincludepicpath5);
                } else {
                    alert(data.message);
                }
            },
            afterError: function (str) {
                alert('自定义错误信息: ' + str);
            }
        });
        uploadbutton5.fileBox.change(function (e) {
            uploadbutton5.submit();
        });

    });
</script>
</head>
<body>
<form id="Form1" runat="server">
<h3 class="boxtitle">后台管理 &gt;&gt; 产品管理</h3>
<table height="0" border="0" cellpadding="0" cellspacing="1" class="tabBgColor">
<tr>
  <td height="25" background="Images/Top.gif"></td>
</tr>
</table>
  <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" id="tagContent0">
	<tr>
      <td width="100" align="center" class="tdbg">产品名称：      </td>
      <td  class="tdbg"><asp:TextBox runat="server" ID="txtproductname" CssClass="input" Width="270px" />
      </td>
    </tr>
    <tr style="display:none">
      <td align="center" class="tdbg">语言：      </td>
      <td  class="tdbg">
      <asp:DropDownList runat="server" ID="ddlLanguage">
         <asp:ListItem Text="繁体" Value="zh" />
         <asp:ListItem Text="英语" Value="en" />
         <asp:ListItem Text="德语" Value="de" />
      </asp:DropDownList> </td>
    </tr>
    <tr class="tdbg" id="sdcms_pic">
      <td align="center" >产品图片1：</td>
      <td><asp:TextBox runat="server" ID="txtincludepicpath" name="txtincludepicpath" CssClass="inputs" Width="270px" /> <input type="button" id="uploadButton" value="上传" />  <span></span></td>
    </tr>
    <tr class="tdbg" id="Tr1">
      <td align="center" >产品图片2：</td>
      <td><asp:TextBox runat="server" ID="txtincludepicpath2" name="txtincludepicpath2" CssClass="inputs" Width="270px" /> <input type="button" id="uploadButton2" value="上传" />  <span></span></td>
    </tr>
    <tr class="tdbg" id="Tr2">
      <td align="center" >产品图片3：</td>
      <td><asp:TextBox runat="server" ID="txtincludepicpath3" name="txtincludepicpath3" CssClass="inputs" Width="270px" /> <input type="button" id="uploadButton3" value="上传" />  <span></span></td>
    </tr>
    <tr class="tdbg" id="Tr3">
      <td align="center" >产品图片4：</td>
      <td><asp:TextBox runat="server" ID="txtincludepicpath4" name="txtincludepicpath4" CssClass="inputs" Width="270px" /> <input type="button" id="uploadButton4" value="上传" />  <span></span></td>
    </tr>
    <tr class="tdbg" id="Tr4">
      <td align="center" >产品图片5：</td>
      <td><asp:TextBox runat="server" ID="txtincludepicpath5" name="txtincludepicpath5" CssClass="inputs" Width="270px" /> <input type="button" id="uploadButton5" value="上传" />  <span></span></td>
    </tr>
	<tr>
      <td  align="center" class="tdbg">产品分类：      </td>
      <td class="tdbg"><asp:DropDownList runat="server" ID="ddlProductCategory" DataTextField="categoryname" DataValueField="categoryid"></asp:DropDownList> <asp:CheckBox runat="server" ID="chkiscommend"  /><label for="t6">推荐产品</label></td>
    </tr>
    <tr>
      <td align="center" class="tdbg">兑换类别：      </td>
      <td  class="tdbg">
      <asp:RadioButtonList runat="server" ID="rblproductcode" RepeatLayout="Flow" RepeatDirection="Horizontal">
         <asp:ListItem Text="金币" Value="1" Selected="True" />
         <asp:ListItem Text="积分" Value="2" />
      </asp:RadioButtonList>
      </td>
    </tr>
    <tr>
      <td align="center" class="tdbg">积分数：      </td>
      <td  class="tdbg"><asp:TextBox runat="server" ID="txtsalecount" CssClass="input" Width="150px" />　<span></span></td>
    </tr>
    <tr>
      <td align="center" class="tdbg">市场单价：      </td>
      <td  class="tdbg"><asp:TextBox runat="server" ID="txtprice" CssClass="input" Width="150px" /></td>
    </tr>
    <tr class="tdbg">
      <td align="center">产品详情：      </td>
      <td valign="top">
        <textarea name="editorcontent" id="editorcontent" style="width:700px;height:460px;visibility:hidden;" runat="server"></textarea>
      </td>
    </tr>
  </table>  
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" >
    <tr class="tdbg">
	  <td width="100">&nbsp;</td>
      <td><asp:Button runat="server" CssClass="bnt" Text="保存" ID="btnSave" onclick="btnSave_Click" /> </td>
	  </tr>
  </table>
</form>
</body>
</html>