<%@ page language="VB" autoeventwireup="false" inherits="parrot_admin_goods, App_Web_admin_goods.aspx.25f04327" %>
<html>
<title>物品管理</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<script language="JavaScript" src="js/tanbox.js"></script>
   <style type="text/css">
<!--
.redparrot {
	position: absolute;
	text-align: left;
	z-index: 100;
	float: left;
}
-->
   </style>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<link href="css/body.css" rel="stylesheet" type="text/css" />
<link href="css/text.css" rel="stylesheet" type="text/css" />
<link href="css/button.css" rel="stylesheet" type="text/css" />
<script src="js/intjs.js" type="text/javascript"></script>
<script language="JScript.Encode" src="js/resources_zh_CN.js"></script>
<script language="JScript.Encode" src="js/calendar.js"></script>
<script src="js/web_alt.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">

    var inputs = document.getElementsByTagName("input"); ;
    var checks = new Array();
    function getChecks() {
        var j = 0;
        for (var i = 0; i < inputs.length; i++) {
            if (inputs[i].type == "checkbox") {
                checks[j] = inputs[i]; j++;
            }
        }
    }

    function selectAll(obj) {
        getChecks();
        if (obj.checked == false) {
            for (var i = 1; i < checks.length; i++) {
                if (checks[i].checked == true) checks[i].checked = false;
            }
            document.getElementById("nameList").value = "";
        }
        else if (obj.checked == true) {
            var value = "";
            for (var i = 1; i < checks.length; i++) {
                value = value + checks[i].value + ";";
                if (checks[i].checked == false) checks[i].checked = true;
            }

        }
    }
    function selectMe(obj) {

        var index = value.indexOf(obj.value);
        if (obj.checked == false && index != -1) {
            if (document.getElementById("all").checked == true)
                document.getElementById("all").checked = false;
            value = value.replace(obj.value + ";", "");

        }
    }
	
    function img_mappath(img_val, input_val) {
	var arr = showModalDialog("admin_select_img.aspx?temp="+ Math.random , "", "dialogWidth:963px; dialogHeight:600px; status:0; help:0");
        if (arr != null) {
            document.getElementById(input_val).value = arr;
        }
    }
document.oncontextmenu=new Function('event.returnValue=false;'); 
    </script>
    <style type="text/css">
.mygoods_img_div {
	height: auto;
	width: 236px;
	float: left;
	margin-left: 1px;
}
        </style>
</head>

<body>
<form id="form1" runat="server">
<table width="100%" border="0" cellspacing="3" cellpadding="0">
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td bgcolor="#E7E7E7"><table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td bgcolor="#FFFFFF"><table width="100%" height="29" border="0" cellpadding="0" cellspacing="5">
                  <tr>
                    <td height="19" bgcolor="#EBEBEB"><table width="100%" border="0" cellspacing="8" cellpadding="0">
                        <tr>
                          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="3" cellpadding="0">
                              <tr>
                                <td width="15%" height="25" align="center" class="wuse16">管理中心</td>
                                <td width="76%" valign="bottom" class="huise12">物品管理</td>
                                <td width="9%" valign="bottom" class="huise12">&nbsp;</td>
                              </tr>
                          </table></td>
                        </tr>
                    </table></td>
                  </tr>
              </table></td>
            </tr>
            
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

<fieldset style="margin:10px 5px 5px 5px; padding:0px 5px 5px 5px;"><legend class="wuse12"><strong>添加新物品</strong></legend>
 <table width="100%" border="1" cellpadding="0" cellspacing="1" bordercolor="#E7E7E7" class="wuse12" style="margin-top:5px;">
   <tr>
     <td width="21%" height="30" align="right" bgcolor="#F6F6F6">物品名称：</td>
     <td width="79%" height="30"><table border="0" cellpadding="0">
         <tr>
           <td><asp:TextBox ID="g_name" runat="server" CssClass="text_autox22_cccccc" 
                                                          Width="150px" MaxLength="50"></asp:TextBox></td>
           <td class="wuse12">&nbsp;&nbsp;&nbsp;&nbsp;有效时间至： </td>
           <td><asp:TextBox ID="g_effective_time" runat="server" CssClass="text_autox22_cccccc" Width="70px" 
                                                              onclick="showCalendar(this,document.form1.g_effective_time)" MaxLength="25"></asp:TextBox>
           </td>
         </tr>
     </table></td>
   </tr>
   <tr>
     <td height="30" align="right" bgcolor="#F6F6F6"> 物品图片：</td>
     <td height="30"><table border="0" cellpadding="0">
         <tr>
           <td><asp:TextBox ID="g_img_url" runat="server" CssClass="text_autox22_cccccc" 
                                                          Width="350px" MaxLength="255"></asp:TextBox>
           </td>
           <td class="wuse12">&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:img_mappath(this,'g_img_url');">打开图象库</a> </td>
         </tr>
     </table></td>
   </tr>
   <tr>
     <td height="30" align="right" bgcolor="#F6F6F6">使用规则：</td>
     <td height="30"><asp:DropDownList ID="g_site" runat="server" AutoPostBack="True" 
                                                          CssClass="text_autox22_cccccc">
         <asp:ListItem Value="-1">请选择使用方式</asp:ListItem>
         <asp:ListItem>订单运算</asp:ListItem>
         <asp:ListItem>自定使用</asp:ListItem>
       </asp:DropDownList>
         <asp:DropDownList ID="g_manner" runat="server" CssClass="text_autox22_cccccc" AutoPostBack="True">
           <asp:ListItem Value="-1">请选择运算对象</asp:ListItem>
         </asp:DropDownList>
         <asp:DropDownList ID="g_equation" runat="server" CssClass="text_autox22_cccccc">
           <asp:ListItem Value="-1">请选择运算方式</asp:ListItem>
         </asp:DropDownList>
         <asp:DropDownList ID="g_vip_uid" runat="server" Visible="False"></asp:DropDownList>
         <asp:TextBox ID="g_quantity" runat="server" CssClass="text_autox22_cccccc" 
                                                          onkeydown="intjs()" Width="60px" Visible="False" MaxLength="10"></asp:TextBox>
     </td>
   </tr>
   <tr>
     <td height="30" align="right" bgcolor="#F6F6F6">使用下限：</td>
     <td height="30" class="hongse12"><asp:TextBox ID="g_use_fw" runat="server" CssClass="text_autox22_cccccc" 
                                                          Width="50px" Text='0' Enabled="False" onkeydown="intjs()" MaxLength="10"></asp:TextBox>
       相对订单运算，订单金额少于指定下限不能使用该物品 </td>
   </tr>
   <%If ubb.query_string("up_goods") <> "True" Then%>
   <tr>
     <td height="30" align="right" bgcolor="#F6F6F6">发放规则：</td>
     <td height="30"><table border="0" cellspacing="5" cellpadding="0">
         <tr>
           <td><asp:CheckBox ID="g_user_id" runat="server" CssClass="hongse12" 
                                                              Text="创建物品并发放给所有" /> 
           </td>
           <td class="hongse14"></td>
           <td><asp:DropDownList ID="g_user_lei" runat="server"></asp:DropDownList></td>
         </tr>
     </table></td>
   </tr>
   <%End If%>
   <tr>
     <td height="30" align="right" bgcolor="#F6F6F6">&nbsp;</td>
     <td height="30"><asp:Button ID="good_up" runat="server" Text="提交修改" CssClass="btn_2k3" 
                                                          Visible="False" /> 
         <asp:Button ID="good_ok" runat="server" Text="提交录入" CssClass="btn_2k3" />   
         <asp:Label ID="g_ts" runat="server" CssClass="hongse12"></asp:Label>
     </td>
   </tr>
 </table>
</fieldset>
                                    <fieldset style="margin:10px 5px 5px 5px; padding:0px 5px 5px 5px;"><legend class="wuse12"><strong>已建立的物品项</strong></legend>
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                       <tr>
                                         <td width="0%" align="right"><strong class="wuse12"> <a href="?">刷新列表</a> </strong></td>
                                       </tr>
                                     </table>
                                     <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                       <tr>
                                         <td bgcolor="#FFFFFF"><table border="0" cellpadding="0" cellspacing="5" class="wuse12">
                                           <tr>
                                             <td><asp:DropDownList ID="select_g_site" runat="server">
                                                 <asp:ListItem>使用方式</asp:ListItem>
                                                 <asp:ListItem>订单运算</asp:ListItem>
                                                 <asp:ListItem>自定使用</asp:ListItem>
                                               </asp:DropDownList>
                                             </td>
                                             <td><asp:DropDownList ID="select_g_manner" runat="server">
                                                 <asp:ListItem>运算对象</asp:ListItem>
                                                 <asp:ListItem>产品价格</asp:ListItem>
                                                 <asp:ListItem>运输费用</asp:ListItem>
                                                 <asp:ListItem>会员积分</asp:ListItem>
                                                 <asp:ListItem>会员等级</asp:ListItem>
                                               </asp:DropDownList>
                                             </td>
                                             <td><asp:DropDownList ID="select_g_equation" runat="server">
                                                 <asp:ListItem>运算方式</asp:ListItem>
                                                 <asp:ListItem>修改</asp:ListItem>
                                                 <asp:ListItem>累加</asp:ListItem>
                                                 <asp:ListItem>递减</asp:ListItem>
                                                 <asp:ListItem>乘以</asp:ListItem>
                                               </asp:DropDownList>
                                             </td>
                                             <td><asp:TextBox ID="select_g_effective_time" runat="server" Width="70px"  onclick="showCalendar(this,document.form1.select_g_effective_time)"
      onfocus="if(this.value=='有效时间'){this.value='';}"  
      onblur="if(this.value==''){this.value='有效时间';}" value="有效时间"></asp:TextBox>
                                             </td>
                                             <td><asp:DropDownList ID="select_g_effective" runat="server">
                                                 <asp:ListItem>筛选状态</asp:ListItem>
                                                 <asp:ListItem>有效</asp:ListItem>
                                                 <asp:ListItem>无效</asp:ListItem>
                                                 <asp:ListItem>已使用</asp:ListItem>
                                                 <asp:ListItem>已过期</asp:ListItem>
                                                 <asp:ListItem>未发放</asp:ListItem>
                                               </asp:DropDownList>
                                             </td>
                                             <td><asp:DropDownList ID="select_g_item" runat="server">
                                                 <asp:ListItem Value="g_name">物品名称</asp:ListItem>
                                                 <asp:ListItem Value="g_user_id">会员ID号</asp:ListItem>
                                               </asp:DropDownList>
                                             </td>
                                             <td><asp:TextBox ID="select_string" runat="server" 
                                          onfocus="if(this.value=='请输入筛选关键字...'){this.value='';}"  
                                          onblur="if(this.value==''){this.value='请输入筛选关键字...';}"  value="请输入筛选关键字..." 
                                          Width="150px" ></asp:TextBox>
                                             </td>
                                             <td><asp:Button ID="select_button_ok" runat="server" CssClass="btn" Text="提交筛选" />                                         
                                             </td>
                                           </tr>
                                         </table></td>
                                       </tr>
                                       <tr>
                                         <td bgcolor="#FFFFFF"><asp:Repeater ID="repeater_admin_goods" runat="server">
                                                     <ItemTemplate>
                                                       <div class="mygoods_img_div">
                                                         <table border="0" cellpadding="0" cellspacing="0">
                                                           <tr>
                                                             <td width="8"><img src="image/img_i1.gif" width="8" height="8"></td>
                                                             <td background="image/img_i2.gif"><img src="image/img_i2.gif" width="8" height="8"></td>
                                                             <td width="8"><img src="image/img_i3.gif" width="8" height="8"></td>
                                                           </tr>
                                                           <tr>
                                                             <td background="image/img_i8.gif"><img src="image/img_i8.gif" width="8" height="8"></td>
                                                             <td><a href="../file_document/jifen.JPG" target="_blank"> </a>
                                                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                   <tr>
                                                                     <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="huise12">
                                                                         <tr>
                                                                           <td width="9%"><input name="checkbox_id" type="checkbox" id="checkbox_id" value="<%#Eval("g_id")%>" /></td>
                                                                           <td width="68%" align="center"><%# Eval("g_name")%></td>
                                                                           <td width="23%" align="right">No.：<%#Eval("g_id")%></td>
                                                                         </tr>
                                                                         <tr>
                                                                           <td colspan="3"><a onMouseOver="wsug(event, '<table width=190 border=0 cellpadding=0 cellspacing=0 class=wuse12><tr><td width=80 height=20 align=center>所属会员：</td><td><%#Eval("g_user_id")%></td></tr><tr><td height=20 align=center>使用方式：</td><td><%#Eval("g_site")%></td></tr><tr><td height=20 align=center>运算对象：</td><td><%#Eval("g_manner")%></td></tr><tr><td height=20 align=center>运算方式：</td><td class=hongse12><%#Eval("g_equation")%></td></tr><tr><td height=20 align=center>运算单位：</td><td class=12lanse><%#Eval("g_quantity")%></td></tr><tr><td height=20 align=center>使用下限：</td><td class=12lanse><%#Eval("g_use_fw")%></td></tr><tr><td height=20 align=center>创建时间：</td><td class=huise12><%#Eval("g_add_time")%></td></tr><tr><td height=20 align=center>使用时间：</td><td><%#Eval("g_use_time")%></td></tr><tr><td height=20 align=center>发放时间：</td><td><%#Eval("g_outuser_time")%></td></tr></table>')" onMouseOut="wsug(event, 0)"><%#Eval("g_img_url")%></a></td>
                                                                         </tr>
                                                                         <tr>
                                                                           <td height="19" colspan="3" valign="bottom"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="huise12">
                                                                               <tr>
                                                                                 <td>有效至：<%# Eval("g_effective_time")%></td>
                                                                                 <td align="right"><%#Eval("g_effective")%></td>
                                                                               </tr>
                                                                           </table></td>
                                                                         </tr>
                                                                     </table></td>
                                                                   </tr>
                                                               </table></td>
                                                             <td background="image/img_i4.gif"><img src="image/img_i4.gif" width="8" height="0"></td>
                                                           </tr>
                                                           <tr>
                                                             <td><img src="image/img_i7.gif" width="8" height="8"></td>
                                                             <td background="image/img_i6.gif"><img src="image/img_i6.gif" width="8" height="8"></td>
                                                             <td><img src="image/img_i5.gif" width="8" height="8"></td>
                                                           </tr>
                                                         </table>
                                                       </div>
                                                     </ItemTemplate>
                                                  </asp:Repeater></td>
                                               </tr>
                                       <tr>
                                         <td bgcolor="#FFFFFF"><table border="0" cellspacing="5" cellpadding="0" class="wuse12">
                                           <tr>
                                             <td><input name="chkAll" type="checkbox" id="chkAll" onClick="selectAll(this)" value="checkbox" style="border:0" /></td>
                                             <td>全选/反选</td>
                                             <td><asp:Button ID="goods_fafang_false" runat="server" CssClass="btn" Text="批量回收" />                                         
                                             </td>
                                             <td><asp:Button ID="g_site_false" runat="server" CssClass="btn" Text="批量无效" />                                         
                                             </td>
                                             <td><asp:Button ID="g_site_true" runat="server" CssClass="btn" Text="批量有效" />                                         
                                             </td>
                                             <td><asp:Button ID="g_fuzhi" runat="server" CssClass="btn" Text="批量复制" />                                         
                                             </td>
                                             <td><asp:Button ID="g_delete" runat="server" CssClass="btn_2k3" 
                                            onclientclick="return confirm('你确定要批量删除会员物品吗？')" Text="批量删除" />                                         
                                             </td>
                                           </tr>
                                         </table></td>
                                       </tr>
                                             </table>
                                        </fieldset>
</form>
</body>
</html>