Advertisement
Guest User

Procter And Gamble

a guest
Jul 13th, 2010
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 38.29 KB | None | 0 0
  1. <% 'Response.Buffer = false
  2.  
  3. Server.ScriptTimeout = 9000
  4.  
  5. %>
  6. <html>
  7.  
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  10. <title>WAS2</title>
  11.  
  12.  
  13. <meta http-equiv="refresh" content="10;url=http://messrv00/Mes/Asp/was2/monitor2.asp">
  14. </head>
  15.  
  16. <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">
  17.  
  18. <table border="0" width="100%" cellspacing="0" cellpadding="0" background="img/topbkg.gif">
  19.   <tr>
  20.     <td width="50%"><img border="0" src="img/img2.png" width="142" height="66"></td>
  21.     <td width="50%">
  22.       <p align="right"><img border="0" src="img/topright.gif" width="327" height="66"></td>
  23.   </tr>
  24. </table>
  25. <table border="0" width="100%" cellspacing="0" cellpadding="0" background="img/blackline.gif">
  26.   <!--<tr>
  27.     <td width="100%"><font color="#B8C0F0" face="Arial" size="2"><b>&nbsp;&nbsp;
  28.       <a href="http://messrv00/Mes/Asp/was2/more.htm">Home&nbsp;&nbsp;</a> |<a href="default.htm">Basico General&nbsp;&nbsp;</a>  |&nbsp;&nbsp;
  29.           Other Link</b></font></td>
  30.   </tr>-->
  31.      
  32.  
  33. </table>
  34.  
  35. <p style="margin-left: 20"><b><font color="#B8C0F0" face="Arial" size="2">&nbsp;</font></b><font face="Arial" size="2" color="#000000">
  36. <p align="center"><table border="1" CLASS="sample"><h1>Real Time Monitoring System</h1></p>
  37. <tr>
  38. <td><b>Linea</b></td>
  39. <td><b>Peso</b></td>
  40. <td><b>Target</b></td>
  41. <td><b>Marca</b></td>
  42. <td><b>Vaso</b></td>
  43. <!--<td><b>Tubo</b></td>-->
  44. <td><b>Fecha</b></td>
  45. <td><b>Total de bolsas</b></td>
  46. <td><b>Promedio</b></td>
  47. <td><b>OP</b></td>
  48. <td><b>Saving</b></td>
  49. </tr>
  50. <%
  51.  
  52. dim conexion,calendar1,calendar2,registros,linea,hora,test
  53. datetime=date()
  54. fecha=(year(datetime)&RIGHT("0"&Month(datetime),2)&Day(datetime))
  55.  
  56. linea="L17N"
  57.  
  58.  
  59. if Day(datetime) <= 9 then dia = "0" & Day(datetime)
  60. if Month(datetime) <= 9 then mes= "0" & Month(datetime)
  61.  'fecha=Year(datetime)& "" & mes & "" & dia
  62. hora=hour(Now)
  63. minuto=minute(Now)
  64. datehoy=date()
  65. fechahoy=(year(datehoy)&"/"&Month(datehoy)&"/"&Day(datehoy))'fecha para imprimir en la pantalla de fecha
  66.  
  67. if minuto<=30 then horamia=(hora&":00"&" - "&hora&":30")    else _
  68. horamia=(hora&":30"&" - "&hora+1&":00")_
  69. end if
  70. response.write(horamia)
  71. Response.Write("<br>")
  72. if horamia=(hora&":00"&" - "&hora&":30") then
  73.     hora2=(hora-1&":30"&" - "&hora&":00")
  74.     elseif horamia=(hora&":30"&" - "&hora+1&":00") then
  75.     hora2=(hora&":00"&" - "&hora&":30")
  76.    
  77.   end if
  78.     Response.Write(hora2)
  79.      '########################################## L15 NORTE #######################################################################################
  80.     linea15n="L15N"
  81.         SET conexion15n=Server.CreateObject("ADODB.Connection")
  82.     conexion15n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  83.             SET registros15n=Server.CreateObject("ADODB.RecordSet")
  84.          registros15n.open"EXEC monitor '"&fecha&"','"&linea15n&"','"&horamia&"'",conexion15n
  85.        
  86.          SET conexionAVG15n=Server.CreateObject("ADODB.Connection")
  87.     conexionAVG15n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  88.             SET registrosAVG15n= Server.CreateObject("ADODB.RecordSet")
  89.        
  90.         registrosAVG15n.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L15N' GROUP BY LINEA",conexionAVG15n
  91.         do while not registrosAVG15n.eof
  92.         promedio=cint(registrosAVG15n.fields("promedio"))
  93.                
  94.  
  95.         do while not registros15n.eof
  96.                     target=cint(registros15n.fields("target"))'## Definicion de variable Target
  97.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  98.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  99.         response.write("<tr>")
  100.         response.write("<td>"&registros15n.fields("linea")&"</td>")
  101.         response.write("<td>"&registros15n.fields("peso")&"</td>")
  102.         response.write("<td>"&registros15n.fields("target")&"</td>")
  103.         response.write("<td>"&registros15n.fields("marca")&"</td>")
  104.         response.write("<td>"&registros15n.fields("vaso")&"</td>")
  105.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  106.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  107.         response.write("<td><h3>"&registros15n.fields("totality")&"</h3></td>")
  108.         response.write("<td>"&registrosAVG15n.fields("promedio")&"</td>")
  109.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  110.             if saving <0 then
  111.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  112.         elseif saving >0 then  
  113.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  114.         elseif saving=0 then
  115.         response.write("<td>"&saving&" KG</td>")
  116.         end if
  117.         response.write("</tr>")
  118. registros15n.movenext
  119.     loop
  120.        
  121.         conexion15n.close
  122.        
  123.  
  124. registrosAVG15n.movenext
  125.     loop
  126.        
  127.         conexionAVG15n.close
  128.              '########################################## L15 SUR #######################################################################################
  129.     linea15s="L15s"
  130.         SET conexion15s=Server.CreateObject("ADODB.Connection")
  131.     conexion15s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  132.             SET registros15s=Server.CreateObject("ADODB.RecordSet")
  133.          registros15s.open"EXEC monitor '"&fecha&"','"&linea15s&"','"&horamia&"'",conexion15s
  134.        
  135.          SET conexionAVG15s=Server.CreateObject("ADODB.Connection")
  136.     conexionAVG15s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  137.             SET registrosAVG15s= Server.CreateObject("ADODB.RecordSet")
  138.        
  139.         registrosAVG15s.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L15S' GROUP BY LINEA",conexionAVG15s
  140.    
  141.         do while not registrosAVG15s.eof
  142.         promedio=cint(registrosAVG15s.fields("promedio"))
  143.                
  144.     if registros15s.eof then
  145.     conexion15s.close
  146.     SET conexion15s=Server.CreateObject("ADODB.Connection")
  147.     conexion15s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  148.             SET registros15s=Server.CreateObject("ADODB.RecordSet")
  149.     registros15s.open"EXEC monitor '"&fecha&"','"&linea15s&"','"&hora2&"'",conexion15s
  150.         response.write("EXEC monitor '"&fecha&"','"&linea15s&"','"&hora2&"'")
  151.         do while not registros15s.eof
  152.        
  153.                
  154.  
  155.        
  156.                     target=cint(registros15s.fields("target"))'## Definicion de variable Target
  157.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  158.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  159.         response.write("<tr>")
  160.        
  161.         response.write("<td>"&registros15s.fields("linea")&"</td>")
  162.         response.write("<td>"&registros15s.fields("peso")&"</td>")
  163.         response.write("<td>"&registros15s.fields("target")&"</td>")
  164.         response.write("<td>"&registros15s.fields("marca")&"</td>")
  165.         response.write("<td>"&registros15s.fields("vaso")&"</td>")
  166.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  167.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  168.         response.write("<td><h3>"&registros15s.fields("totality")&"</h3></td>")
  169.  
  170.         response.write("<td>"&registrosAVG15s.fields("promedio")&"</td>")
  171.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  172.             if saving <0 then
  173.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  174.         elseif saving >0 then  
  175.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  176.         elseif saving=0 then
  177.         response.write("<td>"&saving&" KG</td>")
  178.         end if
  179.         response.write("</tr>")
  180. registros15s.movenext
  181.     loop
  182.        
  183.         conexion15s.close
  184.     else
  185.    
  186.         do while not registros15s.eof
  187.        
  188.                     target=cint(registros15s.fields("target"))'## Definicion de variable Target
  189.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  190.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  191.         response.write("<tr>")
  192.         response.write("<td>"&registros15s.fields("linea")&"</td>")
  193.         response.write("<td>"&registros15s.fields("peso")&"</td>")
  194.         response.write("<td>"&registros15s.fields("target")&"</td>")
  195.         response.write("<td>"&registros15s.fields("marca")&"</td>")
  196.         response.write("<td>"&registros15s.fields("vaso")&"</td>")
  197.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  198.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  199.         response.write("<td><h3>"&registros15s.fields("totality")&"</h3></td>")
  200.         response.write("<td>"&registrosAVG15s.fields("promedio")&"</td>")
  201.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  202.             if saving <0 then
  203.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  204.         elseif saving >0 then  
  205.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  206.         elseif saving=0 then
  207.         response.write("<td>"&saving&" KG</td>")
  208.         end if
  209.         response.write("</tr>")
  210. registros15s.movenext
  211.     loop
  212.        
  213.         conexion15s.close
  214.        
  215. end if
  216. registrosAVG15s.movenext
  217.     loop
  218.        
  219.         conexionAVG15s.close
  220.        
  221.         '##################################DATOS DE LA LINEA 16 NORTE ###################################################
  222. linea16="L16N"
  223. SET conexion3=Server.CreateObject("ADODB.Connection")
  224.     conexion3.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  225.             SET registros3=Server.CreateObject("ADODB.RecordSet")
  226.          registros3.open"EXEC monitor '"&fecha&"','"&linea16&"','"&horamia&"'",conexion3
  227.          
  228.          SET conexion4=Server.CreateObject("ADODB.Connection")
  229.     conexion4.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  230.             SET registros4 = Server.CreateObject("ADODB.RecordSet")
  231.         registros4.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L16N' GROUP BY LINEA",conexion4
  232.         do while not registros4.eof
  233.         promedio=cint(registros4.fields("promedio"))
  234.                
  235.  
  236.         do while not registros3.eof
  237.                     target=cint(registros3.fields("target"))'## Definicion de variable Target
  238.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  239.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  240.         response.write("<tr>")
  241.         response.write("<td>"&registros3.fields("linea")&"</td>")
  242.         response.write("<td>"&registros3.fields("peso")&"</td>")
  243.         response.write("<td>"&registros3.fields("target")&"</td>")
  244.         response.write("<td>"&registros3.fields("marca")&"</td>")
  245.         response.write("<td>"&registros3.fields("vaso")&"</td>")
  246.         response.write("<td>"&registros3.fields("fecha")&"</td>")
  247.         response.write("<td><h3>"&registros3.fields("totality")&"</h3></td>")
  248.         response.write("<td>"&registros4.fields("promedio")&"</td>")
  249.         if OP<=0 then response.write("<td><h3>"&op&"</h3><img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  250.             if saving <0 then
  251.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  252.         elseif saving >0 then  
  253.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  254.         elseif saving=0 then
  255.         response.write("<td>"&saving&" KG</td>")
  256.         end if
  257.         response.write("</tr>")
  258. registros3.movenext
  259.     loop
  260.        
  261.         conexion3.close
  262.        
  263.  
  264. registros4.movenext
  265.     loop
  266.        
  267.         conexion4.close
  268.     '###########################################* LINEA 17 NORTE *#################################################################################
  269.  
  270.         SET conexion=Server.CreateObject("ADODB.Connection")
  271.         conexion.CommandTimeout = 0
  272.         conexion.ConnectionTimeout = 0
  273.         conexion.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  274.                 SET registros=Server.CreateObject("ADODB.RecordSet")
  275. 'response.write("EXEC monitor '"&fecha&"','"&linea&"','"&horamia&"'")
  276.   registros.open"EXEC monitor '"&fecha&"','"&linea&"','"&horamia&"'",conexion
  277.    
  278.     SET conexion2=Server.CreateObject("ADODB.Connection")
  279.     conexion2.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  280.             SET registros2=Server.CreateObject("ADODB.RecordSet")
  281.         'response.write("SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='"&linea&"' GROUP BY LINEA")
  282.         registros2.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='"&linea&"' GROUP BY LINEA",conexion2
  283.         do while not registros2.eof
  284.         promedio=cint(registros2.fields("promedio"))
  285.  
  286.  
  287.     'dim a,NumBolsas
  288.     do while not registros.eof 'promedio-target*numero de bolsas
  289. target=cint(registros.fields("target"))
  290. NumBolsas=cint(registros.fields("totality"))
  291.     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  292.     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  293.         response.write("<tr>")
  294.         response.write("<td>"&registros.fields("linea")&"</td>")
  295.         response.write("<td>"&registros.fields("peso")&"</td>")
  296.         response.write("<td>"&registros.fields("target")&"</td>")
  297.         'response.write("<td>"&a&"</td>")
  298.         response.write("<td>"&registros.fields("marca")&"</td>")
  299.         response.write("<td>"&registros.fields("vaso")&"</td>")
  300.         'response.write("<td>"&registros.fields("tubo")&"</td>")
  301.         response.write("<td>"&registros.fields("fecha")&"</td>")
  302.         response.write("<b><td><h3>"&registros.fields("totality")&"</h3></td></b>")
  303.         response.write("<td>"&registros2.fields("promedio")&"</td>")
  304.         if OP<=0 then response.write("<td><h3>"&op&"</h3><img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  305.     if saving <0 then
  306.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  307.         elseif saving >0 then  
  308.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  309.         elseif saving=0 then
  310.         response.write("<td>"&saving&" KG</td>")
  311.         end if
  312.  
  313.        
  314.         registros.movenext
  315.  
  316.  
  317. loop
  318.     registros2.movenext
  319.     loop
  320.        
  321.         conexion2.close
  322.  
  323. conexion.close
  324.     '################################# DATOS DE LA LINEA 17 SUR #############################################################
  325.    
  326.    
  327.     linea17S="L17S"
  328.         SET conexion17s=Server.CreateObject("ADODB.Connection")
  329.     conexion17s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  330.             SET registros17s=Server.CreateObject("ADODB.RecordSet")
  331.          registros17s.open"EXEC monitor '"&fecha&"','"&linea17S&"','"&horamia&"'",conexion17s
  332.          
  333.          SET conexionAVG17s=Server.CreateObject("ADODB.Connection")
  334.     conexionAVG17s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  335.             SET registrosAVG17s= Server.CreateObject("ADODB.RecordSet")
  336.        
  337.         registrosAVG17s.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L17S' GROUP BY LINEA",conexionAVG17s
  338.         do while not registrosAVG17s.eof
  339.         promedio=cint(registrosAVG17s.fields("promedio"))
  340.                
  341.  
  342.         do while not registros17s.eof
  343.                     target=cint(registros17s.fields("target"))'## Definicion de variable Target
  344.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  345.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  346.         response.write("<tr>")
  347.         response.write("<td>"&registros17s.fields("linea")&"</td>")
  348.         response.write("<td>"&registros17s.fields("peso")&"</td>")
  349.         response.write("<td>"&registros17s.fields("target")&"</td>")
  350.         response.write("<td>"&registros17s.fields("marca")&"</td>")
  351.         response.write("<td>"&registros17s.fields("vaso")&"</td>")
  352.         'response.write("<td>"&registros17s.fields("fecha")&"</td>")
  353.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  354.         response.write("<td><h3>"&registros17s.fields("totality")&"</h3></td>")
  355.         response.write("<td>"&registrosAVG17s.fields("promedio")&"</td>")
  356.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  357.             if saving <0 then
  358.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  359.         elseif saving >0 then  
  360.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  361.         elseif saving=0 then
  362.         response.write("<td>"&saving&" KG</td>")
  363.         end if
  364.         response.write("</tr>")
  365. registros17s.movenext
  366.     loop
  367.        
  368.         conexion17s.close
  369.        
  370.  
  371. registrosAVG17s.movenext
  372.     loop
  373.        
  374.         conexionAVG17s.close
  375.        
  376.    
  377.    
  378.    
  379.  
  380.    
  381.         '################################### Datos de la linea 16 SUR ############################################################
  382.         linea16S="L16S"
  383.         SET conexion5=Server.CreateObject("ADODB.Connection")
  384.     conexion5.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  385.             SET registros5=Server.CreateObject("ADODB.RecordSet")
  386.          registros5.open"EXEC monitor '"&fecha&"','"&linea16S&"','"&horamia&"'",conexion5
  387.          
  388.          SET conexion6=Server.CreateObject("ADODB.Connection")
  389.     conexion6.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  390.             SET registros6= Server.CreateObject("ADODB.RecordSet")
  391.         registros6.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L16S' GROUP BY LINEA",conexion6
  392.         do while not registros6.eof
  393.         promedio=cint(registros6.fields("promedio"))
  394.                
  395.  
  396.         do while not registros5.eof
  397.                     target=cint(registros5.fields("target"))'## Definicion de variable Target
  398.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  399.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  400.         response.write("<tr>")
  401.         response.write("<td>"&registros5.fields("linea")&"</td>")
  402.         response.write("<td>"&registros5.fields("peso")&"</td>")
  403.         response.write("<td>"&registros5.fields("target")&"</td>")
  404.         response.write("<td>"&registros5.fields("marca")&"</td>")
  405.         response.write("<td>"&registros5.fields("vaso")&"</td>")
  406.         response.write("<td>"&registros5.fields("fecha")&"</td>")
  407.         response.write("<td><h3>"&registros5.fields("totality")&"</h3></td>")
  408.         response.write("<td>"&registros6.fields("promedio")&"</td>")
  409.         if OP<=0 then response.write("<td><h3>"&op&"</h3><img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  410.             if saving <0 then
  411.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  412.         elseif saving >0 then  
  413.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  414.         elseif saving=0 then
  415.         response.write("<td>"&saving&" KG</td>")
  416.         end if
  417.         response.write("</tr>")
  418. registros5.movenext
  419.     loop
  420.        
  421.         conexion5.close
  422.        
  423.  
  424. registros6.movenext
  425.     loop
  426.        
  427.         conexion6.close
  428.        
  429.         '############################# LINEA 06 NORTE ####################################################
  430.    
  431.         linea06n="L06n"
  432.         SET conexion6n=Server.CreateObject("ADODB.Connection")
  433.     conexion6n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  434.             SET registros6n=Server.CreateObject("ADODB.RecordSet")
  435.          registros6n.open"EXEC monitor '"&fecha&"','"&linea06n&"','"&horamia&"'",conexion6n
  436.          
  437.          SET conexionAVG6n=Server.CreateObject("ADODB.Connection")
  438.     conexionAVG6n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  439.             SET registrosAVG6n= Server.CreateObject("ADODB.RecordSet")
  440.        
  441.         registrosAVG6n.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L06N' GROUP BY LINEA",conexionAVG6n
  442.         do while not registrosAVG6n.eof
  443.         promedio=cint(registrosAVG6n.fields("promedio"))
  444.                
  445.  
  446.         do while not registros6n.eof
  447.                     target=cint(registros6n.fields("target"))'## Definicion de variable Target
  448.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  449.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  450.         response.write("<tr>")
  451.         response.write("<td>"&registros6n.fields("linea")&"</td>")
  452.         response.write("<td>"&registros6n.fields("peso")&"</td>")
  453.         response.write("<td>"&registros6n.fields("target")&"</td>")
  454.         response.write("<td>"&registros6n.fields("marca")&"</td>")
  455.         response.write("<td>"&registros6n.fields("vaso")&"</td>")
  456.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  457.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  458.         response.write("<td><h3>"&registros6n.fields("totality")&"</h3></td>")
  459.         response.write("<td>"&registrosAVG6n.fields("promedio")&"</td>")
  460.         if OP<=0 then response.write("<td><h3>"&op&"</h3><img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  461.             if saving <0 then
  462.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  463.         elseif saving >0 then  
  464.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  465.         elseif saving=0 then
  466.         response.write("<td>"&saving&" KG</td>")
  467.         end if
  468.         response.write("</tr>")
  469. registros6n.movenext
  470.     loop
  471.        
  472.         conexion6n.close
  473.        
  474.  
  475. registrosAVG6n.movenext
  476.     loop
  477.        
  478.         conexionAVG6n.close
  479.        
  480.        
  481.         '############################# LINEA 07 NORTE ####################################################
  482.    
  483.         linea07n="L07N"
  484.         SET conexion7n=Server.CreateObject("ADODB.Connection")
  485.     conexion7n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  486.             SET registros7n=Server.CreateObject("ADODB.RecordSet")
  487.          registros7n.open"EXEC monitor '"&fecha&"','"&linea07n&"','"&horamia&"'",conexion7n
  488.          
  489.          SET conexionAVG7n=Server.CreateObject("ADODB.Connection")
  490.     conexionAVG7n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  491.             SET registrosAVG7n= Server.CreateObject("ADODB.RecordSet")
  492.        
  493.         registrosAVG7n.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L07N' GROUP BY LINEA",conexionAVG7n
  494.         do while not registrosAVG7n.eof
  495.         promedio=cint(registrosAVG7n.fields("promedio"))
  496.                
  497.  
  498.         do while not registros7n.eof
  499.                     target=cint(registros7n.fields("target"))'## Definicion de variable Target
  500.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  501.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  502.         response.write("<tr>")
  503.         response.write("<td>"&registros7n.fields("linea")&"</td>")
  504.         response.write("<td>"&registros7n.fields("peso")&"</td>")
  505.         response.write("<td>"&registros7n.fields("target")&"</td>")
  506.         response.write("<td>"&registros7n.fields("marca")&"</td>")
  507.         response.write("<td>"&registros7n.fields("vaso")&"</td>")
  508.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  509.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  510.         response.write("<td><h3>"&registros7n.fields("totality")&"</h3></td>")
  511.         response.write("<td>"&registrosAVG7n.fields("promedio")&"</td>")
  512.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  513.             if saving <0 then
  514.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  515.         elseif saving >0 then  
  516.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  517.         elseif saving=0 then
  518.         response.write("<td>"&saving&" KG</td>")
  519.         end if
  520.         response.write("</tr>")
  521. registros7n.movenext
  522.     loop
  523.        
  524.         conexion7n.close
  525.        
  526.  
  527. registrosAVG7n.movenext
  528.     loop
  529.        
  530.         conexionAVG7n.close
  531.        
  532.        
  533.        
  534.        
  535.             '############################# LINEA 01 NORTE ####################################################
  536.    
  537.         linea01n="L01N"
  538.         SET conexion1n=Server.CreateObject("ADODB.Connection")
  539.     conexion1n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  540.             SET registros1n=Server.CreateObject("ADODB.RecordSet")
  541.          registros1n.open"EXEC monitor '"&fecha&"','"&linea01n&"','"&horamia&"'",conexion1n
  542.          
  543.          SET conexionAVG1n=Server.CreateObject("ADODB.Connection")
  544.     conexionAVG1n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  545.             SET registrosAVG1n= Server.CreateObject("ADODB.RecordSet")
  546.        
  547.         registrosAVG1n.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L01N' GROUP BY LINEA",conexionAVG1n
  548.         do while not registrosAVG1n.eof
  549.         promedio=cint(registrosAVG1n.fields("promedio"))
  550.                
  551.  
  552.         do while not registros1n.eof
  553.                     target=cint(registros1n.fields("target"))'## Definicion de variable Target
  554.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  555.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  556.         response.write("<tr>")
  557.         response.write("<td>"&registros1n.fields("linea")&"</td>")
  558.         response.write("<td>"&registros1n.fields("peso")&"</td>")
  559.         response.write("<td>"&registros1n.fields("target")&"</td>")
  560.         response.write("<td>"&registros1n.fields("marca")&"</td>")
  561.         response.write("<td>"&registros1n.fields("vaso")&"</td>")
  562.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  563.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  564.         response.write("<td><h3>"&registros1n.fields("totality")&"</h3></td>")
  565.         response.write("<td>"&registrosAVG1n.fields("promedio")&"</td>")
  566.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  567.             if saving <0 then
  568.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  569.         elseif saving >0 then  
  570.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  571.         elseif saving=0 then
  572.         response.write("<td>"&saving&" KG</td>")
  573.         end if
  574.         response.write("</tr>")
  575. registros1n.movenext
  576.     loop
  577.        
  578.         conexion1n.close
  579.        
  580.  
  581. registrosAVG1n.movenext
  582.     loop
  583.        
  584.         conexionAVG1n.close
  585.        
  586.     '############################## LINEA 01 SUR ####################################################################
  587.     linea01n="L01S"
  588.         SET conexion1s=Server.CreateObject("ADODB.Connection")
  589.     conexion1s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  590.             SET registros1s=Server.CreateObject("ADODB.RecordSet")
  591.          registros1s.open"EXEC monitor '"&fecha&"','"&linea01n&"','"&horamia&"'",conexion1s
  592.          
  593.          SET conexionAVG1s=Server.CreateObject("ADODB.Connection")
  594.     conexionAVG1s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  595.             SET registrosAVG1s= Server.CreateObject("ADODB.RecordSet")
  596.        
  597.         registrosAVG1s.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L01S' GROUP BY LINEA",conexionAVG1s
  598.         do while not registrosAVG1s.eof
  599.         promedio=cint(registrosAVG1s.fields("promedio"))
  600.                
  601.  
  602.         do while not registros1s.eof
  603.                     target=cint(registros1s.fields("target"))'## Definicion de variable Target
  604.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  605.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  606.         response.write("<tr>")
  607.         response.write("<td>"&registros1s.fields("linea")&"</td>")
  608.         response.write("<td>"&registros1s.fields("peso")&"</td>")
  609.         response.write("<td>"&registros1s.fields("target")&"</td>")
  610.         response.write("<td>"&registros1s.fields("marca")&"</td>")
  611.         response.write("<td>"&registros1s.fields("vaso")&"</td>")
  612.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  613.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  614.         response.write("<td><h3>"&registros1s.fields("totality")&"</h3></td>")
  615.         response.write("<td>"&registrosAVG1s.fields("promedio")&"</td>")
  616.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  617.             if saving <0 then
  618.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  619.         elseif saving >0 then  
  620.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  621.         elseif saving=0 then
  622.         response.write("<td>"&saving&" KG</td>")
  623.         end if
  624.         response.write("</tr>")
  625. registros1s.movenext
  626.     loop
  627.        
  628.         conexion1s.close
  629.        
  630.  
  631. registrosAVG1s.movenext
  632.     loop
  633.        
  634.         conexionAVG1s.close
  635.        
  636.         '########################## Datos de la Linea 03 Norte ###############################################################
  637.         linea03n="L03N"
  638.         SET conexion3n=Server.CreateObject("ADODB.Connection")
  639.     conexion3n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  640.             SET registros3n=Server.CreateObject("ADODB.RecordSet")
  641.          registros3n.open"EXEC monitor '"&fecha&"','"&linea03n&"','"&horamia&"'",conexion3n
  642.          
  643.          SET conexionAVG3n=Server.CreateObject("ADODB.Connection")
  644.     conexionAVG3n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  645.             SET registrosAVG3n= Server.CreateObject("ADODB.RecordSet")
  646.        
  647.         registrosAVG3n.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L03N' GROUP BY LINEA",conexionAVG3n
  648.         do while not registrosAVG3n.eof
  649.         promedio=cint(registrosAVG3n.fields("promedio"))
  650.                
  651.  
  652.         do while not registros3n.eof
  653.                     target=cint(registros3n.fields("target"))'## Definicion de variable Target
  654.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  655.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  656.         response.write("<tr>")
  657.         response.write("<td>"&registros3n.fields("linea")&"</td>")
  658.         response.write("<td>"&registros3n.fields("peso")&"</td>")
  659.         response.write("<td>"&registros3n.fields("target")&"</td>")
  660.         response.write("<td>"&registros3n.fields("marca")&"</td>")
  661.         response.write("<td>"&registros3n.fields("vaso")&"</td>")
  662.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  663.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  664.         response.write("<td><h3>"&registros3n.fields("totality")&"</h3></td>")
  665.         response.write("<td>"&registrosAVG3n.fields("promedio")&"</td>")
  666.         if OP<=0 then response.write("<td> "&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  667.             if saving <0 then
  668.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  669.         elseif saving >0 then  
  670.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  671.         elseif saving=0 then
  672.         response.write("<td>"&saving&" KG</td>")
  673.         end if
  674.         response.write("</tr>")
  675. registros3n.movenext
  676.     loop
  677.        
  678.         conexion3n.close
  679.        
  680.  
  681. registrosAVG3n.movenext
  682.     loop
  683.        
  684.         conexionAVG3n.close
  685.        
  686.         '####################### LINEA 09 NORTE #################################################################
  687.         linea09n="L09N"
  688.         SET conexion9n=Server.CreateObject("ADODB.Connection")
  689.     conexion9n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  690.             SET registros9n=Server.CreateObject("ADODB.RecordSet")
  691.          registros9n.open"EXEC monitor '"&fecha&"','"&linea09n&"','"&horamia&"'",conexion9n
  692.          
  693.          SET conexionAVG9n=Server.CreateObject("ADODB.Connection")
  694.     conexionAVG9n.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  695.             SET registrosAVG9n= Server.CreateObject("ADODB.RecordSet")
  696.        
  697.         registrosAVG9n.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L09N' GROUP BY LINEA",conexionAVG9n
  698.         do while not registrosAVG9n.eof
  699.         promedio=cint(registrosAVG9n.fields("promedio"))
  700.                
  701.  
  702.         do while not registros9n.eof
  703.                     target=cint(registros9n.fields("target"))'## Definicion de variable Target
  704.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  705.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  706.         response.write("<tr>")
  707.         response.write("<td>"&registros9n.fields("linea")&"</td>")
  708.         response.write("<td>"&registros9n.fields("peso")&"</td>")
  709.         response.write("<td>"&registros9n.fields("target")&"</td>")
  710.         response.write("<td>"&registros9n.fields("marca")&"</td>")
  711.         response.write("<td>"&registros9n.fields("vaso")&"</td>")
  712.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  713.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  714.         response.write("<td><h3>"&registros9n.fields("totality")&"</h3></td>")
  715.         response.write("<td>"&registrosAVG9n.fields("promedio")&"</td>")
  716.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  717.             if saving <0 then
  718.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  719.         elseif saving >0 then  
  720.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  721.         elseif saving=0 then
  722.         response.write("<td>"&saving&" KG</td>")
  723.         end if
  724.         response.write("</tr>")
  725. registros9n.movenext
  726.     loop
  727.        
  728.         conexion9n.close
  729.        
  730.  
  731. registrosAVG9n.movenext
  732.     loop
  733.        
  734.         conexionAVG9n.close
  735.        
  736.         '########################### LINEA 09 SUR ################################################################
  737.         linea09n="L09S"
  738.         SET conexion9S=Server.CreateObject("ADODB.Connection")
  739.     conexion9s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  740.             SET registros9s=Server.CreateObject("ADODB.RecordSet")
  741.          registros9s.open"EXEC monitor '"&fecha&"','"&linea09s&"','"&horamia&"'",conexion9s
  742.          
  743.          SET conexionAVG9s=Server.CreateObject("ADODB.Connection")
  744.     conexionAVG9s.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV02;UID=sa;PWD=messrv;DATABASE=wasp "
  745.             SET registrosAVG9s= Server.CreateObject("ADODB.RecordSet")
  746.        
  747.         registrosAVG9s.open"SELECT AVG(PESO)as promedio,o.linea from Optimas as o INNER JOIN pesos as p on o.codigo =p.codoptima WHERE fecha >='"&fecha&"' AND hora='"&horamia&"' AND o.linea='L09S' GROUP BY LINEA",conexionAVG9s
  748.         do while not registrosAVG9s.eof
  749.         promedio=cint(registrosAVG9s.fields("promedio"))
  750.            
  751.         do while not registros9s.eof
  752.                     target=cint(registros9S.fields("target"))'## Definicion de variable Target
  753.                     OP=(promedio-target)/target  '### Definicion de operacion de la variable OP para ser mostrada en la tabla
  754.                     saving=(PROMEDIO-target)*NumBolsas '### Definicion y operacion de la variable SAVING para mostrar en la tabla
  755.         response.write("<tr>")
  756.         response.write("<td>"&registros9S.fields("linea")&"</td>")
  757.         response.write("<td>"&registros9S.fields("peso")&"</td>")
  758.         response.write("<td>"&registros9S.fields("target")&"</td>")
  759.         response.write("<td>"&registros9S.fields("marca")&"</td>")
  760.         response.write("<td>"&registros9S.fields("vaso")&"</td>")
  761.         'response.write("<td>"&registros6n.fields("fecha")&"</td>")
  762.         response.write("<td>"&fechahoy&" "&hora&":"&minuto&"</td>")
  763.         response.write("<td><h3>"&registros9S.fields("totality")&"</h3></td>")
  764.         response.write("<td>"&registrosAVG9S.fields("promedio")&"</td>")
  765.         if OP<=0 then response.write("<td>"&op&"<img src='http://www.pact-oil.co.uk/images/error.gif'</a></td>") else response.write("<td>"&op&"<img src='http://www.hospitalsierrallana.com/imagenes/gif_ok.gif'</a></td>") end if
  766.             if saving <0 then
  767.         response.write("<td bgcolor= '#FF0000'>  "&saving&" KG</td>")  
  768.         elseif saving >0 then  
  769.         response.write("<td bgcolor='#00FF00'>"&saving&" KG</td>")
  770.         elseif saving=0 then
  771.         response.write("<td>"&saving&" KG</td>")
  772.         end if
  773.         response.write("</tr>")
  774. registros9S.movenext
  775.     loop
  776.        
  777.         conexion9S.close
  778.        
  779.  
  780. registrosAVG9S.movenext
  781.     loop
  782.        
  783.         conexionAVG9S.close
  784.        
  785.    
  786. %>
  787. </tr>
  788. </table>
  789. </table>
  790. </font></p>
  791. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp;</font></p>
  792. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp;</font></p>
  793. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp; </font></p>
  794. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp;</font></p>
  795. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp;</font></p>
  796. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp;</font></p>
  797. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp;</font></p>
  798. <p style="margin-left: 20"><font face="Arial" size="2" color="#000000">&nbsp;</font></p>
  799. <p style="margin-left: 20" align="center"><font face="Arial" color="#000000" size="1">©
  800. COPYRIGHT 2010 ALL RIGHTS RESERVED PG.COM</font></p>
  801. <table border="0" width="100%" cellspacing="0" cellpadding="0" background="img/botline.gif">
  802.   <tr>
  803.     <td width="100%"><img border="0" src="img/botline.gif" width="41" height="12"></td>
  804.   </tr>
  805. </table>
  806.  
  807.  
  808. </body>
  809.  
  810. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement