<%@ page language="C#" autoeventwireup="true" inherits="admin_addapi, shazhiqiu_taoke_free" %>

<!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>
    <title></title>
<link href="images/skin.css" rel="stylesheet" type="text/css" />

 <script src="date.js" type="text/javascript"></script>
  <script src="../ckeditor/ckeditor.js" type="text/javascript"></script>
      <script language="javascript" type="text/javascript">
          /*-----------------*/
          function addproduct() {
              var f = document.forms[0];

              if (f.siteurl.value == "0") {
                  alert("请选择网站!");
                  f.siteurl.focus();
                  return false;
              }
              else if (f.classfather1.value == "") {
                  alert("请选择网站大类目!");
                  f.classfather1.focus();
                  return false;
              }
              else if (f.classid1.value == "") {
                  alert("请选择网站小类目!");
                  f.classid1.focus();
                  return false;
              }

              else if (f.tagname.value == "") {
                  alert("请输入标签!");
                  f.tagname.focus();
                  return false;
              }
              else if (f.p1.value == "") {
                  alert("请输入开始页!");
                  f.p1.focus();
                  return false;
              }
              else if (f.p2.value == "") {
                  alert("请输入结束页!");
                  f.p2.focus();
                  return false;
              }
              else if (f.keywords.value == "") {
                  alert("请输入关键字!");
                  f.keywords.focus();
                  return false;
              }
              else {
                  return true;
              }
          }
    </script>

</head>
<body>
  <form id="form1" runat="server">
       <div class="divtext">
    <div class="righttitle"><img src="images/biaoti.png" /> 添加API商品</div>
 <table cellspacing="0" cellpadding="0" width="100%" class="tablexian" border="0">
     
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             网站：</td>
         <td align="left">
             <asp:DropDownList ID="siteurl" runat="server" AutoPostBack="True" OnSelectedIndexChanged="classid_SelectedIndexChanged">
             </asp:DropDownList>
             <asp:HiddenField ID="appkey" runat="server" />
             <asp:HiddenField ID="appsecret" runat="server" />
         </td>
     </tr>
     
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             网站分类：</td>
         <td align="left">
             <asp:DropDownList ID="classfather1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="classfather_SelectedIndexChanged">
             </asp:DropDownList>
             <asp:DropDownList ID="classid1" runat="server">
             </asp:DropDownList>
         </td>
     </tr>
     
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             tag标签名：</td>
         <td align="left">
             <asp:TextBox ID="tagname" runat="server" Width="200px"></asp:TextBox>
&nbsp;多个标签用|隔开，建议5个标签内</td>
     </tr>
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             多少页：</td>
         <td align="left">
             <asp:TextBox ID="p1" runat="server" Width="60px"></asp:TextBox>
             &nbsp;-
             <asp:TextBox ID="p2" runat="server" Width="60px"></asp:TextBox>
             &nbsp;数字如：1最小</td>
     </tr>
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             关键字：</td>
         <td align="left">
             <input id="keywords" runat="server" maxlength="25" size="20" type="text" class="input" /></td>
     </tr>
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             佣金比例：</td>
         <td align="left">
             <asp:TextBox ID="start_tk_rate" runat="server" Width="60px">10</asp:TextBox>
             % - <asp:TextBox ID="end_tk_rate" runat="server" Width="60px">50</asp:TextBox>
             &nbsp;20%就输入20</td>
     </tr>
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             排序：</td>
         <td align="left">
             <asp:DropDownList ID="sort" runat="server">
                 <asp:ListItem Value="total_sales_des">销量降序(高-低)</asp:ListItem>
                 <asp:ListItem Value="total_sales_asc">销量升序（低-高）</asp:ListItem>
                <asp:ListItem Value="tk_rate_des">淘客佣金比率降序(高-低)</asp:ListItem>
                 <asp:ListItem Value="tk_rate_asc">淘客佣金比率升序（低-高）</asp:ListItem>
                 <asp:ListItem Value="tk_total_sales_desc"> 累计推广量降序(高-低)</asp:ListItem>
                 <asp:ListItem Value="tk_total_sales_asc"> 累计推广量升序（低-高）</asp:ListItem>
                 <asp:ListItem Value=" tk_total_commi_desc"> 总支出佣金降序(高-低)</asp:ListItem>
                 <asp:ListItem Value=" tk_total_commi_asc"> 总支出佣金升序（低-高）</asp:ListItem>

  
             </asp:DropDownList>
         </td>
     </tr>
     <tr>
         <td align="right" style="width: 100px" class="tablexianbg">
             天猫商品：</td>
         <td align="left">
             <asp:RadioButtonList ID="is_tmall" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                 <asp:ListItem Value="true" Selected="True">天猫</asp:ListItem>
                                  <asp:ListItem Value="false">天猫和淘宝</asp:ListItem>
             </asp:RadioButtonList>
         </td>
     </tr>
    <tr>
        <td align="right" style="width:100px"; class="tablexianbg">
            
            </td>
        <td align="left">
            <asp:Button ID="Button1" runat="server" CssClass="button" Text="Api获取" OnClientClick="return addproduct()" OnClick="Button1_Click" />
        </td>
    </tr>

</table>

     </div>

  <asp:Label ID="message" runat="server"></asp:Label>
    </form>
</body>
</html>