<% Function sintalla(cadena1) cadena2="T/" resultado=instr(cadena1, cadena2) if resultado>0 then final=(left(cadena1, resultado-2)) else final=cadena1 end if cadena2="REF." resultado=instr(final, cadena2) if resultado>0 then final=(left(final, resultado-2)) end if cadena2="RF." resultado=instr(final, cadena2) if resultado>0 then final=(left(final, resultado-2)) end if final=replace(final, "CAMISETA", "") 'final=replace(final, "POLO", "") response.write(final) end function id=int(request.querystring("id")) idioma=int(request.querystring("idioma")) opcion=request.querystring("opcion") 'set oCOnn = server.createobject("adodb.connection") 'Oconn.connectionstring="Driver={SQL Native Client};Server=lwda241.servidoresdns.net;Database=qcq491;Uid=qcq491;Pwd=g0rfact0rY;" 'Oconn.connectionstring="Provider='SQLNCLI';Data Source=lwda241.servidoresdns.net;Initial Catalog=qcq491;User Id=qcq491;Password=g0rfact0rY" 'Oconn.Open set oConn=Server.CreateObject("ADODB.Connection") oConn.Open "DSN=oktextil;" if opcion="familias" then SQL1="SELECT * FROM catalogos2008 WHERE (id="&id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_texto=Objrs1("catalogo") end if Objrs1.close end if if opcion="articulos" then SQL1="SELECT * FROM familias2008 WHERE (id="&id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_id=Int(Objrs1("catalogo")) familia_texto=Objrs1("familia") end if Objrs1.close SQL1="SELECT * FROM catalogos2008 WHERE (id="&catalogo_id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_texto=Objrs1("catalogo") catalogo_id=Objrs1("id") end if Objrs1.close end if if opcion="ficha" then codigo=request.querystring("codigo") SQL1="SELECT * FROM articulos2008 WHERE (codigo='"&codigo&"')" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then familia_id=Int(Objrs1("familia")) articulo_nombre=Objrs1("descripcion") else familia_id=0 end if Objrs1.close SQL1="SELECT * FROM familias2008 WHERE (id="&familia_id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_id=Int(Objrs1("catalogo")) familia_texto=Objrs1("familia") familia_id=Objrs1("familia_id") end if Objrs1.close SQL1="SELECT * FROM catalogos2008 WHERE (id="&catalogo_id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_texto=Objrs1("catalogo") catalogo_id=Objrs1("id") end if Objrs1.close end if %>
<% SQL="SELECT * FROM catalogos2008;" set objRS=oConn.Execute(SQL) if not Objrs.EOF then do until Objrs.EOF %> <% Objrs.Movenext Loop end if Objrs.CLose %>
" class="email"><%=Objrs("catalogo")%>
<%if opcion="" then%> <% end if %> <%if opcion="familias" then%> <% SQL1="SELECT * FROM catalogos2008 WHERE (id="&id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_texto=Objrs1("catalogo") end if Objrs1.close %> <% end if %> <%if opcion="articulos" then%> <% SQL1="SELECT * FROM familias2008 WHERE (familia_id="&id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_id=Int(Objrs1("catalogo")) familia_texto=Objrs1("familia") end if Objrs1.close SQL1="SELECT * FROM catalogos2008 WHERE (id="&catalogo_id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_texto=Objrs1("catalogo") catalogo_id=Objrs1("id") end if Objrs1.close %> <% end if %> <%if opcion="ficha" then%> <% codigo=request.querystring("codigo") SQL1="SELECT * FROM articulos2008 WHERE (codigo='"&codigo&"')" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then familia_id=Int(Objrs1("familia")) articulo_nombre=Objrs1("descripcion") end if Objrs1.close SQL1="SELECT * FROM familias2008 WHERE (familia_id="&familia_id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_id=Int(Objrs1("catalogo")) familia_texto=Objrs1("familia") familia_id=Objrs1("id") end if Objrs1.close SQL1="SELECT * FROM catalogos2008 WHERE (id="&catalogo_id&")" set objRS1=oConn.Execute(SQL1) if not Objrs1.EOF then catalogo_texto=Objrs1("catalogo") catalogo_id=Objrs1("id") end if Objrs1.close %> <% end if %>
Bienvenido a OK Texil
Estás en <%=catalogo_texto%>
<< Volver a <%=catalogo_texto%>Estás en <%=catalogo_texto%>, <%=familia_texto%>
<< Volver a <%=familia_texto%>Estás en <%=catalogo_texto%>, <%=familia_texto%>
<%if opcion="articulos" then%> <% Objrs.Close end if %> <%if opcion="familias" then%> <% SQL="SELECT * FROM familias2008 WHERE (catalogo="&id&")" set objRS=oConn.Execute(SQL) if not Objrs.EOF then do until Objrs.EOF if idioma=1 or idioma=0 or isnull(idioma) then id_familia=Int(Objrs("id")) SQL2="SELECT * FROM articulos2008 WHERE (familia="&id_familia&") ORDER BY color DESC" set objRS2=oConn.Execute(SQL2) if not Objrs2.EOF then 'do until Objrs2.EOF imagen=Objrs2("codigo")&Objrs2("color")&".jpg" 'Objrs2.Movenext 'Loop end if Objrs2.Close %> <% else %> <% end if contador=contador+1 if contador=4 then contador=0 filas=filas+1 %> <% end if %> <% Objrs.Movenext Loop end if if filas<2 then %> <% do until filas=2 filas=filas+1 %> <% Loop end if %> <% Objrs.Close end if if opcion="" then response.redirect("catalogo.asp?opcion=familias&id=1") end if if opcion="ficha" then codigo=request.querystring("codigo") SQL="SELECT * FROM articulos2008 WHERE (codigo='"&codigo&"')" set objRS=oConn.Execute(SQL) if not Objrs.EOF then familia=Int(Objrs("familia")) SQL2="SELECT * FROM familias2008 WHERE (id="&familia&")" set objRS2=oConn.Execute(SQL2) if not Objrs2.EOF then familia_nombre=Objrs2("familia") end if Objrs2.Close imagen_busca=Objrs("codigo")&Objrs("color")&".jpg" imagen=Objrs("codigo")&Objrs("color")&".jpg" %> <% end if Objrs.Close end if %>
<% SQL="SELECT * FROM articulos2008 WHERE (familia="&id&") ORDER BY codigo" set objRS=oConn.Execute(SQL) if not Objrs.EOF then do until Objrs.EOF imagen=Objrs("codigo")&Objrs("color")&".jpg" codigo=Objrs("id") if pasado<>codigo then SQL2="SELECT * FROM fotos_entrada WHERE (codigo='"&Objrs("codigo")&"')" set objRS2=oConn.Execute(SQL2) if not Objrs2.EOF then imagen=Objrs2("imagen") pasado=Objrs("id") end if Objrs2.Close end if if idioma=1 or idioma=0 or isnull(idioma) then if code<>Objrs("codigo") then code=Objrs("codigo") %> <% contador=contador+1 if contador=4 then contador=0 %> <% end if end if else if code<>Objrs("codigo") then code=Objrs("codigo") %> %> <% contador=contador+1 end if end if if contador=6 then contador=0 filas=filas+1 %> <% end if Objrs.Movenext Loop end if if filas<3 then %> <% do until filas=3 filas=filas+1 %> <% Loop end if %>
<% SQLM="SELECT * FROM marcas WHERE (codigo='"&code&"')" set objRSM=oConn.Execute(SQLM) if not ObjrsM.EOF then marca=Objrsm("imagen") end if Objrsm.close %>
">
<%=sintalla(Objrs("descripcion"))%>

<%=Objrs("ingles")%>
">
<%=Objrs("familia")%>

<%=Objrs("ingles")%>
    <% SQL2="SELECT * FROM articulos2008 WHERE (codigo='"&codigo&"') ORDER BY color DESC" set objRS2=oConn.Execute(SQL2) if not Objrs2.EOF then do until Objrs2.EOF if colorin<>Objrs2("color") then colorin=Objrs2("color") SQLC="SELECT * FROM ColoresAuxiliares WHERE (nCodColor='"&colorin&"')" set objRSC=oConn.Execute(SQLC) if not ObjrsC.EOF then color_nombre=Objrsc("sNombre") else color_nombre=colorin end if Objrsc.close SQLC="SELECT * FROM tallas_nino WHERE (color='"&colorin&"' and codigo='"&codigo&"')" set objRSC=oConn.Execute(SQLC) if not ObjrsC.EOF then icono=1 else icono=0 end if Objrsc.close %>
  • ';">.jpg" border="0" align="absmiddle">
    <%=Objrs2("color")%>
    <%=color_nombre%>

    <%if icono=1 then%><%end if%>
  • <% end if Objrs2.Movenext Loop end if %>
<% SQLM="SELECT * FROM solo_ninos WHERE (codigo='"&Objrs("codigo")&"')" set objRSM=oConn.Execute(SQLM) if not ObjrsM.EOF then nino=1 else nino=0 end if Objrsm.close %> <% SQLM="SELECT * FROM marcas WHERE (codigo='"&Objrs("codigo")&"')" set objRSM=oConn.Execute(SQLM) if not ObjrsM.EOF then marca=Objrsm("imagen") end if Objrsm.close %> <% SQL2="SELECT * FROM composicion WHERE (codigo='"&codigo&"')" set objRS2=oConn.Execute(SQL2) if not Objrs2.EOF then %> <% end if Objrs2.Close %>
<%if nino=1 then%> <%end if%><%=Objrs("codigo")%>/<%=sintalla(Objrs("descripcion"))%>
<%=familia_nombre%>
<%=Objrs2("composicion")%>
<%=Objrs("cantidad_pack")%> Unidades/Pack
<%=Objrs("cantidad_caja")%> Unidades/Caja
<%if Objrs("talla")<>"" and Not Isnull(Objrs("talla")) then%> <% SQLX="SELECT * FROM articulos2008 WHERE (codigo='"&codigo&"') ORDER BY talla" set objRsX=oConn.Execute(SQLX) if not ObjrsX.Eof then do until Objrsx.eof if talla<>Objrsx("talla") then talla=Objrsx("talla") SQLT="SELECT * FROM medidas WHERE (codigo='"&codigo&"') AND (talla='"&talla&"')" set objRsT=oConn.Execute(SQLT) if not ObjrsT.Eof then alto=ObjrsT("alto") largo=ObjrsT("largo") end if ObjrsT.close %> <% end if Objrsx.MOvenext Loop end if Objrsx.Close %>
TallaAncho (A)Largo (B)
.jpg" border="0" align="absmiddle"><%=alto%><%=largo%>
.jpg" border="0" align="absmiddle">
<%end if%>
<%oConn.Close%>