<!--#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 

name2=rs("nombrecn")



TEXT1=request.Form("TEXT1")
TEXT2=request.Form("TEXT2")
TEXT3=request.Form("TEXT3")
DTOTIPO=request.Form("DTOTIPO")
borra=request.Form("borra")

if request.Form("PREANTES")="" then

PREANTES="0"
else
PREANTES=request.Form("PREANTES")
end if


if request.Form("FECHA")<>"" then

FECHA="Hasta:"&request.Form("FECHA")

end if



session("TEXT1")=request.Form("TEXT1")
session("TEXT2")=request.Form("TEXT2")
session("TEXT3")=request.Form("TEXT3")
session("DTOTIPO")=request.Form("DTOTIPO")
if request.Form("borra")="" then
session("borrack")=""
else
session("borrack")="checked=checked"
end if


response.Redirect("impremir.asp?ac=imp&tipo=3&articuloid="&rs("articuloid")&"&preciodetalle="&formatnumber(rs("preciodetalle"),2,-1,-1,0)&"&Url=oferta&nombrees="&left(rs("nombrees"),30)&"&nota="& nota &"&name2="& name2 &"&tiendaname="&tiendaname&"&cantidad="&request.Form("cantidad")&" &TEXT1="&TEXT1&"&TEXT2="&TEXT2&"&TEXT3="&TEXT3&"&DTOTIPO="&DTOTIPO&"&PREANTES="&PREANTES&"&borra="&borra&"&FECHA="&FECHA&"")
else
response.write("<script language='javascript'>alert('无此产品\nNo hay Producto');")   
response.write("javascript:history.go(-1);</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 PRECIO OFERTAS </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="oferta.asp?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"  />
          </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">折扣标题：</span></div></td>
            <td height="40"><label>
              <div align="center">
                <input name="text1" type="text" id="text1" style="width:150px; height:30px;" value="<%= session("TEXT1") %>" />
                </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">
              <input name="dtotipo" type="text" id="dtotipo" style="width:150px; height:30px;" value="<%= session("dtotipo") %>" />
            </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 type="text" name="text2" style="width:150px; height:30px;" value="<%= session("TEXT2") %>">
</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="preantes" type="text" id="preantes" style="width:150px; height:30px;"/>
            </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="text3" type="text" id="text3" style="width:150px; height:30px;" value="<%= session("TEXT3") %>" />
            </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 type="date" name="fecha" style="width:150px; height:30px;" value="<%= date() %>"/>
		
			  
            </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"><label>
              <div align="center">
                <input name="borra" type="checkbox" id="borra" value="1" <%= session("borrack") %>/>
                </div>
            </label></td>
          </tr>
        </table>
		<p>&nbsp;</p>
	    </div></td>
  </tr>
</table>
</form>
<!--#include file="fooder.asp"-->