<%@ LANGUAGE = "VBScript" %> <% Path_index=Request.ServerVariables("PATH_INFO") 'Check if user is already signed in if session("custid")="" or session("custid")=null then 'response.redirect("firmar.asp?Origen=" & Path_index) end if busca=request.QueryString("busca") doc=request.QueryString("doc") origen=request.QueryString("origen") Rango=Request.Form("Tipo") criterio=Request.Form("criterio") if criterio="" or criterio=null then criterio="" end if criterio2=Request.Form("criterio2") campo=Request.Form("campo") if campo=1 then vinicial=len(criterio) vfinal=len(criterio2) end if if campo=3 then finicial=criterio ffinal=criterio2 if criterio2="" or criterio2=null then ffinal=finicial end if dia1=right("00"&day(finicial),2) mes1=right("00"&month(finicial),2) anno1=right("00"&year(finicial),4) cfechai=cdbl(anno1+mes1+dia1) dia2=right("00"&day(ffinal),2) mes2=right("00"&month(ffinal),2) anno2=right("00"&year(ffinal),4) cfechaf=cdbl(anno2+mes2+dia2) end if %> Buscar datos <% header if busca="" or busca=null then origen=doc end if %>
LISTADO DE ENCUESTAS
Por Cliente Por Numero Por Fecha Por Estatus  
Que contenga Concidir todo Rango de datos
Valor a buscar: de: a:
<% 'else %>

Resultados obtenidos con <%=Request("Criterio") %>

<% sla="/" cero1="00" cero2="0000" If Rango=1 or Rango="" Then if campo=1 then set rsprod=cnn2.execute("select * from encuesta where InStr(UCase([nombre]),'"&UCase(criterio)&"')>0 order by ID") end if if campo="" then set rsprod=cnn2.execute("select * from encuesta order by ID") end if if campo=2 then set rsprod=cnn2.execute("select * from encuesta where ID="&criterio&" order by ID") end if if campo=3 then set rsprod=cnn2.execute("select * from encuesta where fday="&day(finicial)&" and fmonth="&month(finicial)&" and fyear="&year(finicial)&" order by ID") end if if campo=4 then if Criterio="Satisfecho" then Resultado1=0 Resultado2=11 end if if Criterio="No Satisfecho" then Resultado1=10 Resultado2=15 end if if Criterio="Muy Insatisfecho" then Resultado1=14 Resultado2=26 end if set rsprod=cnn2.execute("select * from encuesta where (Calidad+Tiempos+Precio+Atencion+General)>"&resultado1&" and (Calidad+Tiempos+Precio+Atencion+General)<"&resultado2&" order by ID") end if End If If Rango=2 Then if campo=1 then set rsprod=cnn2.execute("select * from encuesta where UCase(nombre)='" &UCase(criterio)&"' order by ID") end if if campo=2 then set rsprod=cnn2.execute("select * from encuesta where ID="&criterio&" order by ID") end if if campo=3 then set rsprod=cnn2.execute("select * from encuesta where fday(fecha)="&day(finicial)&" and fmonth(fecha)="&month(finicial)&" and fyear(fecha)="&year(finicial)&" order by ID") end if if campo=4 then if Criterio="Satisfecho" then Resultado1=0 Resultado2=11 end if if Criterio="No Satisfecho" then Resultado1=10 Resultado2=15 end if if Criterio="Muy Insatisfecho" then Resultado1=14 Resultado2=26 end if set rsprod=cnn2.execute("select * from encuesta where (Calidad+Tiempos+Precio+Atencion+General)>"&resultado1&" and (Calidad+Tiempos+Precio+Atencion+General)<"&resultado2&" order by ID") end if End if If Rango=3 Then if campo=1 then set rsprod=cnn2.execute("select * from encuesta where left(UCase([nombre])," &vinicial&")>='" &UCase(criterio)&"' and left(UCase([nombre])," &vfinal&")<='" &UCase(criterio2)&"' order by nombre") end if if campo=2 then set rsprod=cnn2.execute("select * from encuesta where ID>="&criterio&" and ID<="&criterio2&" order by ID") end if if campo=3 then set rsprod=cnn2.execute("select * from encuesta where cdbl(right('"&cero2&"'&fyear,4)&right('"&cero1&"'&fmonth,2)&right('"&cero1&"'&fday,2))>="&cfechai&" and cdbl(right('"&cero2&"'&fyear,4)&right('"&cero1&"'&fmonth,2)&right('"&cero1&"'&fday,2))<="&cfechaf&" order by ID") end if if campo=4 then if Criterio="Satisfecho" then Resultado1=0 Resultado2=11 end if if Criterio="No Satisfecho" then Resultado1=10 Resultado2=15 end if if Criterio="Muy Insatisfecho" then Resultado1=14 Resultado2=26 end if set rsprod=cnn2.execute("select * from encuesta where (Calidad+Tiempos+Precio+Atencion+General)>"&resultado1&" and (Calidad+Tiempos+Precio+Atencion+General)<"&resultado2&" order by ID") end if End if ' rsprod.movefirst If rsprod.BOF And rsprod.EOF Then %>

No se ha encontrado ningun registro que reuna las condiciones del criterio <%=Request("Criterio")%> en la Base de Datos

<% Else ' facturas cpc1=0 cpc2=0 cpc3=0 cpc4=0 cpc5=0 cpcd1=0 cpcd2=0 cpcd3=0 cpcd4=0 cpcd5=0 cpv1=0 cpv2=0 cpv3=0 cpv4=0 cpv5=0 cpvd1=0 cpvd2=0 cpvd3=0 cpvd4=0 cpvd5=0 rsprod.movefirst %>
<% While Not rsprod.EOF if renglon=1 then color="#9BCAE3" renglon=0 else color="#FFFFFF" renglon=1 end if if rsprod("calidad")=1 then rcalidad="Muy Buena" end if if rsprod("calidad")=2 then rcalidad="Buena" end if if rsprod("calidad")=3 then rcalidad="Regular" end if if rsprod("calidad")=4 then rcalidad="Mala" end if if rsprod("tiempos")=1 then rtiempos="Muy Buena" end if if rsprod("tiempos")=2 then rtiempos="Buena" end if if rsprod("tiempos")=3 then rtiempos="Regular" end if if rsprod("tiempos")=4 then rtiempos="Mala" end if if rsprod("precio")=1 then rprecio="Muy Buena" end if if rsprod("precio")=2 then rprecio="Buena" end if if rsprod("precio")=3 then rprecio="Regular" end if if rsprod("precio")=4 then rprecio="Mala" end if if rsprod("atencion")=1 then ratencion="Muy Buena" end if if rsprod("atencion")=2 then ratencion="Buena" end if if rsprod("atencion")=3 then ratencion="Regular" end if if rsprod("atencion")=4 then ratencion="Mala" end if if rsprod("general")=1 then rgeneral="Muy Buena" end if if rsprod("general")=2 then rgeneral="Buena" end if if rsprod("general")=3 then rgeneral="Regular" end if if rsprod("general")=4 then rgeneral="Mala" end if Califica=rsprod("calidad")+rsprod("tiempos")+rsprod("precio")+rsprod("atencion")+rsprod("general") if Califica<11 then Resultado="Satisfecho" end if if Califica>10 and Califica<15 then Resultado="No Satisfecho" end if if Califica>14 then Resultado="Muy Insatisfecho" end if %> <% rsprod.MoveNext Wend rsprod.Close End If 'end if %>
Numero: Fecha: Nombre del Cliente: Calidad: Tiempos: Precio: Atencion: General: Resultado:  
"><%=rsprod("ID")%> "><%=rsprod("Fecha")%> "><%=rsprod("nombre")%> "><%=rcalidad%> "><%=rtiempos%> "><%=rprecio%> "><%=ratencion%> "><%=rgeneral%> "><%=resultado%>