Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%
- dim i, Q
- dim fInicio, fTermino
- dim lCentros
- ' obtener fechas anteriores
- fInicio = DateAdd("d", -7, now())
- fTermino = DateAdd("d", 6, fInicio)
- ' Listar centros notificados
- Q = "SELECT werks,"&_
- " stort "&_
- "FROM dbo.SAP_ControlMineria_Notificacion "&_
- "WHERE id_usuario <> 'job' "&_
- " AND fNotificacion BETWEEN '"& fInicio &"' AND '"& fTermino &"' "&_
- "GROUP BY werks, stort "&_
- "ORDER BY werks, stort;"
- lCentros = getDBP(Q)
- %>
- <!-- fila -->
- <div class="row-fluid">
- ENVIO DE CORREO SEMANAL, REP 3
- </div>
- <div class="clearfix"></div>
- <script>
- $(document).ready(function() {
- // Se enviara correo de notif. a Mantenimiento
- var fecini = $("#<%=fInicio%>").val();
- var fecfin = $("#<%=fTermino%>").val();
- var werks = 'M027';
- var stort = 'SALVADORC2';
- var func = 'normal';
- var fechaNotif = $("#<%=fTermino%>").val();
- $.ajax({
- async:false,
- cache:false,
- dataType:"html",
- type: 'POST',
- url: "rep3_notificacion.asp",
- data: {
- fecini:fecini
- , fecfin:fecfin
- , werks:werks
- , stort:stort
- , func:func
- },
- success: function(respuesta){
- $("#mostrarRep").html(respuesta);
- // enviar correo reporte mantenmiento
- $.post("rep3_notificacion_email.asp", { werks:werks , stort:stort , tablas:respuesta, fechaNotif:fechaNotif }, function(data) {
- }).done(function() {
- // enviar mensaje de ejecucion correcta
- window.location.href = "rep7_detalle.asp";
- }).fail(function() {
- window.location.href = "rep8_detalle.asp";
- });
- },
- beforeSend:function(){},
- error:function(objXMLHttpRequest){}
- });
Add Comment
Please, Sign In to add comment