<%@ Language=VBScript %> ICatalogo <% dim V_Connection dim V_RUsuario dim V_RCategorias dim V_RProductos dim V_RCompras dim V_RTemcat dim V_RTemprod dim V_RFichas dim sql dim sql2 dim contador dim compra const max = 15 dim total Set V_Connection = CreateObject("ADODB.Connection") Set V_RTemprod = CreateObject("ADODB.Recordset") Set V_RProductos = CreateObject("ADODB.Recordset") Set V_RUsuario = CreateObject("ADODB.Recordset") Set V_RFichas = CreateObject("ADODB.Recordset") V_Connection.ConnectionString = "DRIVER=SQL Server;SERVER=196.40.23.206;UID=quimifarma;PASSWORD=farmaquimi;APP=Microsoft Development Environment;WSID=MSSQL2000;DATABASE=Quimifarma" V_Connection.Open %>

.

<% if Request.Form("ingresar") <> "" then sql = "select * from usuarios where usuario = '" + Request.Form("Login") + "' and password ='" + Request.Form("Clave") + "'" V_RUsuario.Open sql, V_Connection if V_RUsuario.EOF <> true then session ("usuario") = V_RUsuario(2) session ("username") = Request.Form("Login") V_Connection.Execute ("delete temp_cat where usuario = '" + session("username") + "'") V_Connection.Execute ("delete temp_prod where usuario = '" + session("username") + "'") Session ("registro") = 0 Session ("registro2") = 0 Session ("maxreg") = 0 Session ("i")=0 Session ("totalreg")=0 Session("totalreg2")=0 session("maxreg")=0 Session("tempcat")=0 else Session ("usuario") = 2 end if V_RUsuario.Close else if Request.Form("sinclave" + ".x") <> "" then Session("usuario") = 2 Session("username") = "" %>

Name:

Company:

Position:

Telephone:

E-mail:

User:

Password:

Confirmation:

Fax::

<% end if end if if Request.Form("Isubmit1") = " Send " then if validar() = true then sql = "select * from usuarios where usuario = '" + Request.Form("usuario") + "'" V_RUsuario.Open sql, V_Connection if V_RUsuario.EOF = true then V_Connection.Execute ("insert into usuarios (usuario,password,tipo,nombre,empresa,puesto,telefono,fax,correo,fecha_ingreso) values ('" + Request.Form("usuario") + "','" + Request.Form("clave1") + "','" + cstr(0) + "','" + Request.Form("nombre") + "','" + Request.Form("empresa") + "','" + Request.Form("puesto") + "','" + Request.Form("telefono") + "','" + Request.Form("fax") + "','" + Request.Form("correo") + "','" + cstr(date) + "')" ) session ("usuario") = 0 session ("username") = Request.Form("usuario") V_Connection.Execute ("delete temp_cat where usuario = '" + session("username") + "'") V_Connection.Execute ("delete temp_prod where usuario = '" + session("username") + "'") V_RUsuario.close else session ("usuario") = 2 %>

El usuario ya existe, seleccione otro.

<% end if end if end if if Request.Form("sinclave" + ".x") = "" and Request.Form("ingresar") = "" and Request.Form("Isubmit1") = "" and Request.Form("submit3" + ".x") = "" and Request.Form("cotizar") = "" and Request.Form("submit8" ) = "" and Request.Form ("submit3") = "" and Request.Form ("submit4.x") = "" and Request.Form ("submit5.x")= "" and Request.Form ("submit6.x") = "" and Request.Form ("submit7.x") = "" and Request.Form ("submit1.x") = "" and Request.Form ("submit2.x") = "" then %>

In a quick and accessible way, you will be able to find in a single place, a great variety of products present in this market, guided to food, pharmaceutical, cosmetic, veterinarian industrial market.

  Our catalog is conformed by different sections, that depend on the sectors that you are interest. With great comfort, you can consent in general to the technical files and information of the products or services that can satisfy your needs immediately.

Existing users

Login:

Password:

 

 

<% else if Session ("usuario") = 2 and Request.Form("sinclave" +".x") = "" then if Request.Form("BSubmit2" + ".x") = "" and Request.Form("ISubmit1") = "" then %>

El usuario o la contraseña son inválidos, intente de nuevo.

<% end if else if Request.Form("sinclave" +".x") = "" then Set V_RCategorias = CreateObject("ADODB.Recordset") Set V_RTemcat = CreateObject("ADODB.Recordset") sql = "select count(*) from categorias where cod_idioma = 1" V_RCategorias.Open sql, V_Connection session("totalreg") = V_RCategorias(0) V_RCategorias.Close sql = "select * from categorias where cod_idioma = 1 order by cod_categoria " V_RCategorias.Open sql, V_Connection if Request.Form ("submit1.x") <> "" then Session("registro")= Session("registro") + max i = 1 while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql2 = "select cod_categoria from temp_cat where cod_categoria = '" + Request.Form("checkbox" + cstr(i)) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemcat.Open sql2, V_Connection if V_RTemcat.EOF = true then V_Connection.Execute( "insert into temp_cat (usuario,cod_categoria) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) +"')") end if V_RTemcat.Close else V_Connection.Execute( "delete from temp_cat where cod_categoria= '" + cstr(Session ("arreglo("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend else if Request.Form ("submit2.x") <> "" then if Session("registro") > 0 then Session("registro")= Session("registro") - max end if i = 1 while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql2 = "select cod_categoria from temp_cat where cod_categoria = '" + (Request.Form("checkbox" + cstr(i))) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemcat.Open sql2, V_Connection if V_RTemcat.EOF = true then V_Connection.Execute( "insert into temp_cat (usuario,cod_categoria) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) +"')") end if V_RTemcat.Close else V_Connection.Execute( "delete from temp_cat where cod_categoria = '" + cstr(Session ("arreglo("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend end if end if %>
<% if Request.Form ("submit8") <> "" then dim mensaje Set V_RCompras = CreateObject("ADODB.Recordset") sql = "select cod_compra from compras where cod_compra = '1'" V_RCompras.Open sql,V_Connection if V_RCompras.EOF = false then V_RCompras.Close sql = "select max(cod_compra) from compras" V_RCompras.Open sql,V_Connection compra = cint(V_RCompras(0)) + cint(1) else compra = 1 end if mensaje = "Ingreso una nueva orden de compra o cotizacón, Solicitud #" + cstr(compra) Set objNewMail = CreateObject("CDONTS.NewMail") objNewMail.Send "ventas@quimifarmacr.com", "ventas@quimifarmacr.com", "Orden de Compra o cotización", mensaje, 2 Set objNewMail = Nothing V_RCompras.Close V_Connection.Execute( "insert into compras (usuario,cod_compra,fecha_compra) values ('"+ cstr(session("username"))+ "','" + cstr(compra) + "','" + cstr(date) + "')") sql = "select * from temp_prod where usuario = '" + cstr(session("username")) + "'" V_RTemprod.Open sql, V_Connection while V_RTemprod.EOF <> true V_Connection.Execute( "insert into desc_compras (cod_compra,cod_producto,cantidad,precio) values ('"+ cstr(compra) + "','" + cstr(V_RTemprod(1)) + "','" + cstr(V_RTemprod(2)) + "','" + cstr(V_RTemprod(3)) + "')") V_RTemprod.MoveNext wend V_RTemprod.Close %>

Their application is being processed, soon we will be contacting you. Application # <%Response.Write(cstr(compra))%>

<% else i = 1 if Request.Form ("cotizar") <> "" then Session ("registro2")= 0 while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql = "select * from temp_prod where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemprod.Open sql, V_Connection if V_RTemprod.EOF = true then sql = "select precio from productos where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "'" V_RProductos.Open sql,V_Connection V_Connection.Execute( "insert into temp_prod (usuario,cod_producto,cantidad,precio) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) + "','" +Request.Form("field" + cstr(i)) +"','"+ cstr(V_RProductos(0)) +"')") V_RProductos.Close end if V_RTemprod.Close else V_Connection.Execute( "delete from temp_prod where cod_producto= '" + cstr(Session ("arreglo2("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend sql = "select * from temp_prod where usuario = '" + cstr(session("username")) + "'" V_RTemprod.Open sql, V_Connection %> <% if session("usuario") = 1 then %> <% else %> <% end if %>

If you want that this rate is assisted as a purchase order, please "clic" in the button and soon we will be contacting you to conclude the transaction.

If you wants to receive a rate of this order, please "clic" in then button and soon we will be contacting you to conclude the transaction.

<% while V_RTemprod.EOF <> true sql = "select descripcion, presentacion from productos where cod_producto = '" + V_RTemprod(1) + "'" V_RProductos.Open sql, V_Connection %> <% if session("usuario") = 1 then total = total + (cint(V_RTemprod(3)) * cint(V_RTemprod(2))) end if %> <% V_RProductos.Close V_RTemprod.MoveNext wend V_RTemprod.Close %>

Cod

Description

Presentation

Price

Qty.

<%Response.Write(V_RTemprod(1))%>

<%Response.Write(V_RProductos(0))%>

<%Response.Write(V_RProductos(1))%>

<%if session("usuario") = 1 then Response.write("$" +cstr((cint(V_RTemprod(3)) * cint(V_RTemprod(2))))) else Response.Write("--") end if %>

<%Response.Write(V_RTemprod(2))%>

Total:

<% if session("usuario") = 1 then Response.write("$" + cstr(total)) else Response.Write("--") end if %>

<% if session("usuario") = 1 then %> <% else %> <% end if %>
<% end if if Request.Form ("submit3") <> "" or Request.Form ("submit4.x") <> "" or Request.Form ("submit5.x") or Request.Form ("submit6.x") <> "" or Request.Form ("submit7.x") <> "" then if Request.Form ("submit7.x") <> "" then Session ("registro2")= 0 session("tempcat") = session("tempcat") + 1 while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql = "select cod_producto from temp_prod where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemprod.Open sql, V_Connection if V_RTemprod.EOF = true then sql = "select * from productos where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "'" V_RProductos.Open sql,V_Connection V_Connection.Execute( "insert into temp_prod (usuario,cod_producto,cantidad,precio) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) + "','" +Request.Form("field" + cstr(i)) +"','"+ cstr(V_RProductos(4)) +"')") V_RProductos.Close end if V_RTemprod.Close else V_Connection.Execute( "delete from temp_prod where cod_producto= '" + cstr(Session ("arreglo2("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend end if if Request.Form ("submit6.x") <> "" then Session ("registro2")= 0 session("tempcat") = session("tempcat") - 1 while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql = "select cod_producto from temp_prod where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemprod.Open sql, V_Connection if V_RTemprod.EOF = true then sql = "select precio from productos where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "'" V_RProductos.Open sql,V_Connection V_Connection.Execute( "insert into temp_prod (usuario,cod_producto,cantidad,precio) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) + "','" +Request.Form("field" + cstr(i)) +"','"+ cstr(V_RProductos(0)) +"')") V_RProductos.Close end if V_RTemprod.Close else V_Connection.Execute( "delete from temp_prod where cod_producto= '" + cstr(Session ("arreglo2("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend end if if Request.Form ("submit5.x") <> "" then Session ("registro2")= Session ("registro2") + max i = 1 while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql = "select * from temp_prod where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemprod.Open sql, V_Connection if V_RTemprod.EOF = true then sql = "select precio from productos where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "'" V_RProductos.Open sql,V_Connection V_Connection.Execute( "insert into temp_prod (usuario,cod_producto,cantidad,precio) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) + "','" +Request.Form("field" + cstr(i)) +"','"+ cstr(V_RProductos(0)) +"')") V_RProductos.Close end if V_RTemprod.Close else V_Connection.Execute( "delete from temp_prod where cod_producto= '" + cstr(Session ("arreglo2("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend else if Request.Form ("submit4.x") <> "" then if Session ("registro2") > 0 then Session ("registro2")= Session ("registro2") - max end if i = 1 while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql = "select cod_producto from temp_prod where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemprod.Open sql, V_Connection if V_RTemprod.EOF = true then sql = "select precio from productos where cod_producto = '" + cstr(Request.Form("checkbox" + cstr(i))) + "'" V_RProductos.Open sql,V_Connection V_Connection.Execute( "insert into temp_prod (usuario,cod_producto,cantidad,precio) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) + "','" +Request.Form("field" + cstr(i)) +"','"+ cstr(V_RProductos(0)) +"')") V_RProductos.Close end if V_RTemprod.Close else V_Connection.Execute( "delete from temp_prod where cod_producto= '" + cstr(Session ("arreglo2("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend end if end if i = 1 if Request.Form ("submit3") <> "" then while i =< max if Request.Form("checkbox" + cstr(i)) <> "" then sql = "select cod_categoria from temp_cat where cod_categoria = '" + Request.Form("checkbox" + cstr(i)) + "' and usuario = '" + cstr(session("username")) + "'" V_RTemcat.Open sql, V_Connection if V_RTemcat.EOF = true then V_Connection.Execute( "insert into temp_cat (usuario,cod_categoria) values ('"+ cstr(session("username"))+ "','" + Request.Form("checkbox" + cstr(i)) +"')") end if V_RTemcat.Close else V_Connection.Execute( "delete from temp_cat where cod_categoria= '" + cstr(Session ("arreglo("+ cstr(i) + ")"))+ "' and usuario = '" + cstr(session("username")) + "'") end if i = i + 1 wend end if %> <% sql = "select count(*) from temp_cat where usuario = '" + session("username") + "'" V_RTemcat.Open sql, V_Connection session("totalreg") = V_RTemcat(0) V_RTemcat.Close sql = "select * from temp_cat where usuario = '" + session("username") + "'" V_RTemcat.Open sql, V_Connection if V_RTemcat.EOF <> true then V_RTemcat.Move(session("tempcat")) end if V_RCategorias.Close contador = 1 if V_RTemcat.EOF <> true and contador =< max then sql = "select descripcion from categorias where cod_categoria = '" + cstr(V_RTemcat(1)) + "'" V_RCategorias.Open sql, V_Connection %>

<%Response.Write(V_RCategorias(0))%>

<% sql = "select count(*) from productos where cod_categoria = '" + cstr(V_RTemcat(1)) + "'" V_RProductos.Open sql, V_Connection session("totalreg2") = V_RProductos(0) V_RProductos.Close sql = "select * from productos where cod_categoria = '" + cstr(V_RTemcat(1)) + "' order by cod_producto" V_RProductos.Open sql, V_Connection V_RProductos.move (Session("registro2")) while V_RProductos.EOF <> true and contador =< max %> <% sql = "select * from ficha where cod_producto = '" + V_RProductos(0) + "'" + " and cod_idioma = '1'" V_RFichas.Open sql, V_Connection if V_RFichas.EOF = true then %> <% else %> <% end if V_RFichas.Close %> <% Session ("arreglo2("+ cstr(contador) + ")") = V_RProductos(0) V_RProductos.MoveNext Contador = contador + 1 wend while contador <= max Session ("arreglo2("+ cstr(contador) + ")") = 0 Contador = contador + 1 wend V_RProductos.Close %>

Cod

Description

Presentation

Price

Qty.

NAME="<%check(contador)%>" VALUE="<%Response.Write(V_RProductos(0))%>"> 

<%Response.Write(V_RProductos(0))%>

<%Response.Write("" + cstr(V_RProductos(0)) + "")%>

<%Response.Write(V_RProductos(2))%>

<%Response.Write(V_RProductos(3))%>

<% if session("usuario") = 1 then Response.Write("$" + cstr(V_RProductos(4))) else Response.Write("---") end if%>

 

<% V_RCategorias.Close end if V_RTemcat.Close %>
<%anterior2()%>
<%anterior3()%>
<%siguiente2()%>

<% if (session("tempcat")) <> 0 or (session("tempcat") + 1) < Session("totalreg") then Response.Write("   Categorías   ") end if %>

<%siguiente3()%>

"Clic" the button to continue
<% else if Request.Form("cotizar") = "" then %>
<% contador = 1 V_RCategorias.move (Session("registro")) %> <% while V_RCategorias.EOF <> true and contador =< max %> <% Session ("arreglo("+ cstr(contador) + ")") = V_RCategorias(0) contador = contador + 1 V_RCategorias.MoveNext wend while contador <= max Session ("arreglo("+ cstr(contador) + ")") = 0 Contador = contador + 1 wend %>

Categories

NAME="<%check(contador)%>" VALUE="<%Response.Write(V_RCategorias(0)) %>" > 

<%Response.Write(V_RCategorias(2)) %>

<% anterior()%> <% siguiente()%>

"Clic" the button to continue
<% end if end if end if end if end if end if %>