<%@LANGUAGE="VBSCRIPT"%><%'Response.Buffer = false Response.ContentType = "application/vnd.ms-excel" %> <% if (Request("who") <> "") Then recipdata="Fecha:" + cStr(date()) recipdata=recipdata + chr(10) + chr(13)+"ip:" + request.servervariables("REMOTE_ADDR") recipdata=recipdata + chr(10) + chr(13) +"host:" +request.servervariables("HTTP_HOST") recipdata=recipdata + chr(10) + chr(13) + "Navegador(Ver,Windows):" + request.servervariables("HTTP_USER_AGENT") recipdata=recipdata + chr(10) + chr(13) + "Visita desde:" +request.servervariables("HTTP_REFERER") recipdata=recipdata + chr(10) + chr(13) + "Idioma, Pais:" + request.servervariables("HTTP_ACCEPT_LANGUAGE") Dim objCDO set server.ScriptTimeout=300 vare=split (request("who"),";") for u=0 to ubound(vare) Set objCDO = Server.CreateObject("CDONTS.NewMail") objCDO.BodyFormat = 0 objCDO.From = "crm@promad.com.mx" objCDO.To = vare(u) objCDO.CC = "" 'objCDO.Bcc = objCDO.Subject = request("titulo") objCDO.Body = request("txtDescC") + chr(10) + chr(13)+ chr(10) + chr(13) +"
" + chr(10) + chr(13) +"servicio proveído por http://xnet.com.mx" if vare(u)<>"" then objCDO.Send() next response.write("Correo enviado Exitosamente") set server.ScriptTimeout=90 Set objCDO = Nothing End If %> <% ' *** Restrict Access To Page: Grant or deny access to this page MM_authorizedUsers="ADMIN,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 %> <% set registro = Server.CreateObject("ADODB.Recordset") registro.ActiveConnection = MM_maq_STRING registro.Source = "SELECT * FROM USUARIOS ORDER BY ZONA, ZONA_TARIFA" registro.CursorType = 0 registro.CursorLocation = 2 registro.LockType = 3 registro.Open() registro_numRows = 0 %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim registro_total Dim registro_first Dim registro_last ' set the record count registro_total = registro.RecordCount ' set the number of rows displayed on this page If (registro_numRows < 0) Then registro_numRows = registro_total Elseif (registro_numRows = 0) Then registro_numRows = 1 End If ' set the first and last displayed record registro_first = 1 registro_last = registro_first + registro_numRows - 1 ' if we have the correct record count, check the other stats If (registro_total <> -1) Then If (registro_first > registro_total) Then registro_first = registro_total End If If (registro_last > registro_total) Then registro_last = registro_total End If If (registro_numRows > registro_total) Then registro_numRows = registro_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (registro_total = -1) Then ' count the total records by iterating through the recordset registro_total=0 While (Not registro.EOF) registro_total = registro_total + 1 registro.MoveNext Wend ' reset the cursor to the beginning If (registro.CursorType > 0) Then registro.MoveFirst Else registro.Requery End If ' set the number of rows displayed on this page If (registro_numRows < 0 Or registro_numRows > registro_total) Then registro_numRows = registro_total End If ' set the first and last displayed record registro_first = 1 registro_last = registro_first + registro_numRows - 1 If (registro_first > registro_total) Then registro_first = registro_total End If If (registro_last > registro_total) Then registro_last = registro_total End If End If %> <% if request("sv")=1 then 'Set sv = Server.CreateObject("ADODB.Stream") 'sv=registro 'registro.save "/home/sites/site5/web/registrados.xls" end if %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 fr_numRows = fr_numRows + Repeat1__numRows %> Envio de Boletines <% While ((Repeat1__numRows <> 0) AND (NOT registro.EOF)) %> <% if (registro.Fields.Item("EMAIL").Value)<>"" and not isnull((registro.Fields.Item("EMAIL").Value)) then ' Adv Conditional Region %> <% end if ' (registro.Fields.Item("ESTADO").Value)<>"" and not isnull((registro.Fields.Item("ESTADO").Value)) %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 registro.MoveNext() Wend %>
Envio de Correo a las siguientes Personas: <%=(registro_total)%>-Registrados                        
ID DIVI EMAIL USUARIO NOMBRE SUCURSAL ZONA PRIVILEGIOS ES USUARIO
ADMINSITRATIVO
Ultimo Acceso Nivel
de Autorizacion
Administrador
de Rentas
       
<%=(registro.Fields.Item("IDCLIENTE").Value)%> <%=Ucase(registro.Fields.Item("DIVI").Value)%> <%=lcase(registro.Fields.Item("EMAIL").Value)%> <%=(registro.Fields.Item("USERNAM").Value)%> <%=(registro.Fields.Item("NOMBRE").Value)%> <%=(registro.Fields.Item("ZONA").Value)%> <%=(registro.Fields.Item("ZONA_TARIFA").Value)%> <%=(registro.Fields.Item("TIPOUSER").Value)%> <%if (registro.Fields.Item("CARTCONTRA").Value) ="1" then response.Write("Si") else response.Write("No")%> <%=(registro.Fields.Item("ULTIMOAC").Value)%> <%=(registro.Fields.Item("NIVAUTH").Value)%> <%=(registro.Fields.Item("ADMONRENTA").Value)%>        
by xnet.com.mx <% registro.Close() %>