<%@LANGUAGE="VBSCRIPT"%> <% ' *** Restrict Access To Page: Grant or deny access to this page MM_authorizedUsers="ADMIN,VENDEDOR,GERENTE" MM_authFailedURL="login.asp" MM_grantAccess=false If Session("MM_Username") <> "" Then If (false Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then MM_qsChar = "?" If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %> <% Dim ents__VED ents__VED = "218" If (request("id") <> "") Then ents__VED = request("id") End If %> <%'cONTROL mENSUAL DES = cstr(DateAdd("m", -1, iFirstDayOfMonth)) HAS = cstr(DateAdd("m", 1, iFirstDayOfMonth)) %> <% Dim ents Dim ents_numRows Set ents = Server.CreateObject("ADODB.Recordset") ents.ActiveConnection = MM_maq_STRING ents.Source = "SELECT M.COMPANIA, M.STATUS, (SELECT COUNT(IDCONTACTO) FROM CONTACTOS where (CONTACTOS.IDPROSPECTO)=M.IDCLIENTE AND CONTACTOS.FECHA>'"+DES+"' AND CONTACTOS.FECHA<'"+HAS+"') AS CONTACTOS, M.IDCLIENTE,M.ULTIMOAC,M.IDDBSCTE, (SELECT COUNT(IDCONTACTO) FROM CONTACTOS where (CONTACTOS.IDPROSPECTO)=M.IDCLIENTE AND TIPO=4 AND CONTACTOS.FECHA>'"+DES+"' AND CONTACTOS.FECHA<'"+HAS+"') AS VISITAS, (SELECT COUNT(IDCOTIZACION) FROM COTS WHERE (COTS.IDPROSPECTO)=M.IDCLIENTE AND COTS.FECHA>'"+DES+"' AND COTS.FECHA<'"+HAS+"') AS COTS FROM PROSPECTOS M WHERE M.VENDEDOR=" + strreplace(ents__VED, "'", "''") + " GROUP BY M.COMPANIA, M.ULTIMOAC,M.STATUS, M.IDCLIENTE,M.IDDBSCTE ORDER BY M.STATUS,M.ULTIMOAC DESC;" ents.CursorType = 0 ents.CursorLocation = 2 ents.LockType = 1 ents.Open() ents_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 30 Repeat1__index = 0 ents_numRows = ents_numRows + Repeat1__numRows %> <% dim SZ() dim DT() dim head() dim cpos() KEYFL="IDCLIENTE" imgfld="STATUS" oclt="IDCLIENTE" redim SZ(ents.Fields.Count) redim DT(ents.Fields.Count) redim head(ents.Fields.Count) redim cpos(ents.Fields.Count) for n=0 to ents.Fields.Count-1 SZ(n)= cstr(ents.Fields.Item(n).DefinedSize ) DT(n)= cstr(ents.Fields.Item(n).Type ) head(n)=cstr(ents.Fields.Item(n).name) cpos(n)=cstr(ents.Fields.Item(n).name) next %> <%rem response.Redirect("es.asp?cmd="+cpos(4))%> www.promad.com.mx
 
Bienvenido al Sistema de Administración de Ventas: <%=SESSION("NOMBRE") %>
Resumen de Prospectos
<%for i=0 to Ubound(head)%> <% if instr(oclt,head(i))<=0 then %> <%end if %> <% next %> <% While ((Repeat1__numRows <> 0) AND (NOT ents.EOF)) %> " > <%for i=0 to Ubound(head)-1%> <% if instr(oclt,head(i))<=0 then %> <% end if %> <% next %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 ents.MoveNext() Wend %>
<% if session("ACTIVO")="1" then ' Adv Conditional Region %> <% end if ' session("ACTIVO")="1" %> <%=head(i) %>
"> " ><%IF cpos(i)=imgfld then response.write ("" ) else RESPONSE.WRITE(ents(cpos(i))) %>
 
 



 
 
<% ents.Close() Set ents = Nothing %>