<!--#include file="conn.asp"-->

<% 
if session("login")<>"1" then
response.Redirect("login.asp") 
end if

 
 conn.open Str

if request.QueryString("ac")="c"  and request.Form("key")<>""   then
 sql = "select * from articulo where ArticuloID = '"&request.Form("key")&"' or Codigobarra ='"&request.Form("key")&"' or FIND_IN_SET('"& request.Form("key") &"',replace(multicodigo,' ',','))"
 set rs = conn.execute(sql)
  
  
if not(rs.bof and rs.eof) then 

ptext1=request.Form("ptext1")
ptext2=request.Form("ptext2")
ptext3=request.Form("ptext3")
ptext4=request.Form("ptext4")
ptext5=request.Form("ptext5")



session("ptext1")=request.Form("ptext1")
session("ptext2")=request.Form("ptext2")
session("ptext3")=request.Form("ptext3")
session("ptext4")=request.Form("ptext4")
session("ptext5")=request.Form("ptext5")

if PName2IgualPName1="0" then
name1=left(rs("nombrees"),PName1MAX)
name2=left(rs("nombrecn"),PName2MAX)
else
name1=left(rs("nombrees"),PName1MAX)
name2=mid(rs("nombrees"),PName1MAX+1,PName2MAX)
end if

if Printidocodigo="2" and rs("Codigobarra")<>"" then
code=rs("Codigobarra")
else
code=rs("ArticuloID")
end if


response.Redirect("impremir.asp?ac=imp&tipo=5&articuloid="&code&"&ptext1="&Server.URLEncode(ptext1)&"&ptext2="&Server.URLEncode(ptext2)&"&ptext3="&Server.URLEncode(ptext3)&"&ptext4="&Server.URLEncode(ptext4)&"&ptext5="&Server.URLEncode(ptext5)&"&Url=Proveedor&nombrees="&Server.URLEncode(name1)&"&cantidad="&request.Form("cantidad")&" ")
else
response.write("<script language='javascript'>alert('无此产品\nNo hay Producto');")   
response.write("javascript:history.go(-1);window.android.playFailed();</script>")
response.End()
end if

end if


  %>
 <table width="100%"  height="100" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">供应商打印<br />
          <span class="STYLE14">PEGATINA DE PROVEEDOR </span><br />
          <span class="STYLE2"><%= request.Form("key") %></span>
  <div align="center" class="STYLE15"></div>
    </div></td>
  </tr>
</table>
<form id="form1" name="form1" method="post" action="?ac=c">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
      <label>
        <div align="center">
          <p>
            <input name="key" type="text" id="key" style=" width:90%;height:60px; font-size:24px;" autofocus="autofocus" autocomplete="off"  value="<%= request.QueryString("key") %>" />
          </p>
        </div>
      <div align="center">
	    <p><br />
            <INPUT type=image height="50" width="50" src="img/BUSCA.png" border=0 name="Submit2" onClick="this.form.submit()" autocomplete="off" />
	    </p> 
		<table width="90%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="40"><div align="right" style="font-size: 18px"><span style="font-weight: bold">供应商名称&amp;CIF：</span></div></td>
            <td height="40"><label>
              <div align="center">
                <input name="ptext1" type="text" id="ptext1" style="width:150px; height:30px;" value="<%= session("ptext1") %>" required="required" />
                </div>
            </label></td>
          </tr>
          <tr>
            <td height="40"><div align="right" style="font-size: 18px"><span style="font-weight: bold">供应商联系地址：</span></div></td>
            <td height="40"><div align="center">
              <textarea name="ptext2" id="ptext2" style="width:150px; height:40px;" required="required"><%= session("ptext2") %></textarea>
            </div></td>
          </tr>
          <tr>
            <td height="40"><div align="right" style="font-size: 18px"><span style="font-weight: bold">供应商联系方式：</span></div></td>
            <td height="40"><div align="center">
              <label>
              <input name="ptext3" type="text" id="ptext3" style="width:150px; height:30px;" value="<%= session("ptext3") %>" required="required" />
              </label>
            </div></td>
          </tr>
          <tr>
            <td height="40"><div align="right" style="font-size: 18px"><span style="font-weight: bold">供应商其他信息：</span></div></td>
            <td height="40"><div align="center">
              <input name="ptext4" type="text" id="ptext4" style="width:150px; height:30px;" value="<%= session("ptext4") %>" required="required" />
            </div></td>
          </tr>
          <tr>
            <td height="40"><div align="right" style="font-size: 18px"><span style="font-weight: bold">产品制造国信息：</span></div></td>
            <td height="40"><div align="center">
              <input name="ptext5" type="text" id="ptext5" style="width:150px; height:30px;" value="MADE IN P.R.C"  required="required"/>
            </div></td>
          </tr>
          <tr>
            <td height="40"><div align="right" style="font-size: 18px"><span style="font-weight: bold">打印份数：</span></div></td>
            <td height="40"><div align="center">
              <input name="cantidad" type="text" id="cantidad" style="width:150px; height:30px;" value="1" maxlength="2"  required="required"/>
            </div></td>
          </tr>
        </table>
		<p>&nbsp;</p>
	    </div></td>
  </tr>
</table>
</form>
<!--#include file="fooder.asp"-->