<!--#include virtual="/incs/config.asp"-->
<!--#include virtual="/incs/top.asp"-->
<% chk_log()%>
<%
chk_newpwr 4,20,1
%>
<script language=javascript>
function ifdel(pcid)
{
if(confirm("提示：是否确认删除！"))
location.href="pdt_mng.asp?module=<%=server.urlencode("pc_del")%>&pcid="+pcid;
}
</script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle" align="center"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>产品二级分类</strong></span></b></font></td>
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="pdt_lst.asp" class=commonface>产品列表</a> 
            <font color="#000000">|</font> <a href="javascript:showurl('pdt_add.asp');" class=commonface>产品增加</a> 
            <font color="#000000">|</font> <a href="pdt_tpe.asp" class=commonface>产品分类</a> 
          </td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2  class=menuline></td>
        </tr>
        </tbody> 
      </table>
      <br>
      <a href="pdt_cls.asp"  class=commonface >列出所有二级分类</a><br>
      <br>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="top" height="28" align="center"> 
      <div align="center"></div>
      <form action="pdt_mng.asp" method=post name=pcmng>
        <table border="0" width=100% align="center" cellPadding="0" cellSpacing="0" class="datalist">
          <tbody> 
          <tr  > 
            <th height="20" width="10%" align=center class=datalistheader> 序号 
            </th>
            <th width="12%" align=center class=datalistheader>分类名称</th>
            <th width="12%" align=center class=datalistheader>上级分类</th>
            <th width="10%" align=center class=datalistheader>分类编号</th>
            <th width="10%" align=center class=datalistheader>顺序</th>
            <th width="16%" align=center class=datalistheader>是否在价格表显示</th>
            <th width="16%" align=center class=datalistheader>下级平台可获取</th>
            <th width="20%" align=center class=datalistheader>管理</th>
          </tr>
          <%
					   conn.open constr
					   ptid=SafeRequest("ptid")
					   if chk_int(ptid)=false then
					   query="select * from v_pdtcls  order by pt_odr,pc_odr"
					   else
					   query="select * from v_pdtcls where pc_tid="&ptid&" order by pt_odr,pc_odr"
					   end if
					   rs.open query,conn,1,1
					   while not rs.eof
					    %>
          <tr > 
            <td height="22"  align=center class=datalistgridb><%=rs("pcid")%></td>
            <td  align=center class=datalistgridb> 
              <input type="text" name="pc_name_<%=rs("pcid")%>" value="<%=rs("pc_nme")%>" size=15 class=normalform>
            </td>
            <td  align=center class=datalistgridb> 
              <select class=normalform name="pc_tid_<%=rs("pcid")%>">
                <option value=0>其它</option>
                <% query2="select * from pdttpe order by pt_odr"
			  rs2.open query2,conn,1,1
			  while not rs2.eof 
			  response.write "<option value="&rs2("pt_id")
			  if cint(rs2("pt_id"))=cint(rs("pc_tid")) then
			  response.write " selected "
			  end if
			  response.write " >"&trim(rs2("pt_nme"))&"</option>"
			  rs2.movenext
			  wend
			  rs2.close
			  %>
              </select>
            </td>
            <td  align=center class=datalistgridb> 
              <input type="text" name="pssc_id" value="<%=rs("pc_id")%>"  size=10  class=normalform disabled=1>
              <input type="hidden" name="pc_id_<%=rs("pcid")%>" value="<%=rs("pc_id")%>" >
            </td>
            <td  align=center class=datalistgridb> 
              <input type="text" name="pc_order_<%=rs("pcid")%>" value="<%=rs("pc_odr")%>"  size=10  class=normalform>
            </td>
            <td  align=center class=datalistgridb> 
              <select name="pc_show_<%=rs("pcid")%>" class=normalform>
                <option value="1" <%if rs("pc_shw")=1 then
							response.write " selected"
							end if %>>显示</option>
                <option value="0" <%if rs("pc_shw")=0 then
							response.write " selected"
							end if %> style='color:#ff0000'>不显示</option>
              </select>
            </td>
            <td  align=center class=datalistgridb> 
              <select name="pc_ifagt_<%=rs("pcid")%>" class=normalform>
                <option value="1" <%if rs("pc_ifagt")=1 then
							response.write " selected"
							end if %>>允许</option>
                <option value="0" <%if rs("pc_ifagt")=0 then
							response.write " selected"
							end if %> style='color:#ff0000'>禁止</option>
              </select>
            </td>
            <td  align=center class=datalistgridb> <a href="javascript:ifdel('<%=rs("pcid")%>');" class=commonface>删除</a> 
              <input type="hidden" name="pcids" value="<%=rs("pcid")%>" >
            </td>
          </tr>
          <% 
					 
					newodr=cint(rs("pc_odr"))+1
					rs.movenext
					wend
					rs.close
					
					%>
          </tbody> 
        </table>
        <br>
        <input type="hidden" name="module" value="pc_edt" >
        <input type="hidden" name="pc_tid" value="<%=ptid%>" >
        <input type="submit" name="Submit" value="提交" class=btxx onClick="javascript:return confirmit();">
        <input type="reset" name="Submit" value="重填"  class=btxx>
      </form>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="top" height="20"> 
      <div align="center"> <b>二级分类添加</b><br>
        <br>
      </div>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="top" height="28"> 
      <table border=0 cellpadding=0 
                        cellspacing=0  align="center" width="100%" class=datalist>
        <tbody> 
        <form action="pdt_mng.asp" method=post name=pcadd>
          <tr  > 
            <th height="20" width="10%" align=center class=datalistheader> 序号 
            </th>
            <th width="12%" align=center class=datalistheader>分类名称</th>
            <th width="12%" align=center class=datalistheader>上级分类</th>
            <th width="10%" align=center class=datalistheader>分类编号</th>
            <th width="10%" align=center class=datalistheader>顺序</th>
            <th width="16%" align=center class=datalistheader>是否在价格表显示</th>
            <th width="16%" align=center class=datalistheader>下级平台可获取</th>
            <th width="20%" align=center class=datalistheader>添加</th>
          <tr > 
            <td height="22"  align=center class=datalistgridb>&nbsp;</td>
            <td  align=center class=datalistgridb> 
              <input type="text" name="pc_name" size="15" maxlength="20" class=normalform>
            </td>
            <td  align=center class=datalistgridb> 
              <select class=normalform name=pc_tid>
                <% query2="select * from pdttpe order by pt_odr"
			  rs2.open query2,conn,1,1
			  while not rs2.eof 
			  response.write "<option value="&rs2("pt_id")
			  if cint(rs2("pt_id"))=cint(ptid) then
			  response.write " selected "
			  end if
			  response.write " >"&trim(rs2("pt_nme"))&"</option>"
			  rs2.movenext
			  wend
			  rs2.close
			  query="select max(pc_id) as maxpc_id from pdtcls"
			  rs2.open query,conn,1,1
			  if not rs2.eof then
			  maxpc_id=clng(rs2("maxpc_id"))+1
			  end if
			  rs2.close
			  conn.close
			  %>
              </select>
            </td>
            <td  align=center class=datalistgridb> 
              <input type="text" name="pc_id" size="10" maxlength="5" value="<%=maxpc_id%>" class=normalform>
            </td>
            <td  align=center class=datalistgridb> 
              <input type="text" name="pc_order" size="10" value="<%=newodr%>" maxlength="5" class=normalform>
            </td>
            <td  align=center class=datalistgridb> 
              <select name="pc_show" class=normalform>
                <option value="1" >显示</option>
                <option value="0"  style='color:#ff0000'>不显示</option>
              </select>
            </td>
            <td  align=center class=datalistgridb> 
              <select name="pc_ifagt" class=normalform>
                <option value="1"  >允许</option>
                <option value="0"   style='color:#ff0000'>禁止</option>
              </select>
            </td>
            <td  align=center class=datalistgridb> <a href="javascript:document.pcadd.submit();" class=commonface>添加</a> 
              <input type="hidden" name="module" value="pc_add" >
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
    </td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->

