%@ LANGUAGE = "VBScript" %> <% on error resume next xfecing=0 xfecing=request.QueryString("xfecing") xaccion=request.Form("accion") %>
<% hractual=hour(Now) minactual=minute(now) if xfecing=0 then if hractual>6 then fecha=date() dia=right("00"&day(Fecha),2) mes=right("00"&month(Fecha),2) anno=right("00"&year(Fecha),2) fecing=anno&mes&dia else fecha=date()-1 dia=right("00"&day(Fecha),2) mes=right("00"&month(Fecha),2) anno=right("00"&year(Fecha),2) fecing=anno&mes&dia end if else if xaccion="hoy" then fecha=date() dia=right("00"&day(Fecha),2) mes=right("00"&month(Fecha),2) anno=right("00"&year(Fecha),2) fecing=anno&mes&dia else fecha=date()-1 dia=right("00"&day(Fecha),2) mes=right("00"&month(Fecha),2) anno=right("00"&year(Fecha),2) fecing=anno&mes&dia end if end if apo="'" set rstrgraph=dbsql3.execute("Select * from datagraph where fecha='"& fecing &"' and areaprod='C1'") xquery="Select * from datagraph where fecha='"& fecing &"' and areaprod='C1'" 'response.write(xquery) if rstrgraph.bof and rstrgraph.eof then xlabel=apo+"NA"+apo xdata="0" xtarget="1200" else while not rstrgraph.eof tarC1Sh=55 tarC2Sh=55 tarHTra="1200" xtransamtday=int(rstrgraph("transamtday")/1000) xc1s1lm=int(rstrgraph("c1s1lm")/1000) xc1s2lm=int(rstrgraph("c1s2lm")/1000) xc2s1lm=int(rstrgraph("c2s1lm")/1000) xc2s2lm=int(rstrgraph("c2s2lm")/1000) xc1s3lm=int(rstrgraph("c1s3lm")/1000) xc2s3lm=int(rstrgraph("c2s3lm")/1000) 'response.write(" c1s1"&rstrgraph("c1s1lm")) 'response.write(" c1s2"&rstrgraph("c1s2lm")) 'response.write(" c2s1"&rstrgraph("c2s1lm")) 'response.write(" c2s2"&rstrgraph("c2s2lm")) xtarget2=228-xtransamtday if xtarget2<0 then xtarget2=0 end if xdata2=(xtransamtday&","&xtarget2) xtargetc1s1=tarC1Sh-xc1s1lm if xtargetc1s1<0 then xtargetc1s1=0 end if xdatac1s1lm=(xc1s1lm&","&xtargetc1s1) xtargetc1s2=tarC1Sh-xc1s2lm if xtargetc1s2<0 then xtargetc1s2=0 end if xdatac1s2lm=(xc1s2lm&","&xtargetc1s2) xtargetc1s3=tarC1Sh-xc1s3lm if xtargetc1s3<0 then xtargetc1s3=0 end if xdatac1s3lm=(xc1s3lm&","&xtargetc1s3) xtargetc2s1=tarC2Sh-xc2s1lm if xtargetc2s1<0 then xtargetc2s1=0 end if xdatac2s1lm=(xc2s1lm&","&xtargetc2s1) xtargetc2s2=tarC2Sh-xc2s2lm if xtargetc2s2<0 then xtargetc2s2=0 end if xdatac2s2lm=(xc2s2lm&","&xtargetc2s2) xtargetc2s3=tarC2Sh-xc2s3lm if xtargetc2s3<0 then xtargetc2s3=0 end if xdatac2s3lm=(xc2s3lm&","&xtargetc2s3) 'response.write(xdata2) xlabel=apo+"6:50"+apo+","+apo+"7:50"+apo+","+apo+"8:50"+apo+","+apo+"9:50"+apo+","+apo+"10:50"+apo+","+apo+"11:50"+apo+","+apo+"12:50"+apo+","+apo+"13:50"+apo+","+apo+"14:50"+apo+","+apo+"15:50"+apo+","+apo+"16:50"+apo+","+apo+"17:50"+apo+","+apo+"18:50"+apo xdata="0," xtarget=tarHTra&","&"1200,1200,1200,1200,1200,1200,1200,1200,1200,1200,1200,1200" if not isnull(rstrgraph("tc1_1")) then 'xlabel=xlabel+apo+"7:50"+apo xdata=xdata&rstrgraph("tc1_1") 'xtarget="1000,1000" end if if not isnull(rstrgraph("tc1_2")) then 'xlabel=xlabel&","&apo+"8:50"+apo xdata=xdata&","&rstrgraph("tc1_2") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_3")) then 'xlabel=xlabel&","&apo+"9:50"+apo xdata=xdata&","&rstrgraph("tc1_3") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_4")) then 'xlabel=xlabel&","&apo+"10:50"+apo xdata=xdata&","&rstrgraph("tc1_4") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_5")) then 'xlabel=xlabel&","&apo+"11:50"+apo xdata=xdata&","&rstrgraph("tc1_5") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_6")) then 'xlabel=xlabel&","&apo+"12:50"+apo xdata=xdata&","&rstrgraph("tc1_6") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_7")) then 'xlabel=xlabel&","&apo+"13:50"+apo xdata=xdata&","&rstrgraph("tc1_7") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_8")) then 'xlabel=xlabel&","&apo+"14:50"+apo xdata=xdata&","&rstrgraph("tc1_8") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_9")) then 'xlabel=xlabel&","&apo+"15:50"+apo xdata=xdata&","&rstrgraph("tc1_9") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_10")) then 'xlabel=xlabel&","&apo+"16:50"+apo xdata=xdata&","&rstrgraph("tc1_10") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_11")) then 'xlabel=xlabel&","&apo+"17:50"+apo xdata=xdata&","&rstrgraph("tc1_11") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_12")) then 'xlabel=xlabel&","&apo+"18:50"+apo xdata=xdata&","&rstrgraph("tc1_12") 'xtarget=xtarget&","&"1000" end if if not isnull(rstrgraph("tc1_13")) then xlabel=xlabel&","&apo+"19:50"+apo xdata=xdata&","&rstrgraph("tc1_13") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_14")) then xlabel=xlabel&","&apo+"20:50"+apo xdata=xdata&","&rstrgraph("tc1_14") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_15")) then xlabel=xlabel&","&apo+"21:50"+apo xdata=xdata&","&rstrgraph("tc1_15") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_16")) then xlabel=xlabel&","&apo+"22:50"+apo xdata=xdata&","&rstrgraph("tc1_16") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_17")) then xlabel=xlabel&","&apo+"23:50"+apo xdata=xdata&","&rstrgraph("tc1_17") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_18")) then xlabel=xlabel&","&apo+"00:50"+apo xdata=xdata&","&rstrgraph("tc1_18") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_19")) then xlabel=xlabel&","&apo+"01:50"+apo xdata=xdata&","&rstrgraph("tc1_19") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_20")) then xlabel=xlabel&","&apo+"02:50"+apo xdata=xdata&","&rstrgraph("tc1_20") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_21")) then xlabel=xlabel&","&apo+"03:50"+apo xdata=xdata&","&rstrgraph("tc1_21") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_22")) then xlabel=xlabel&","&apo+"04:50"+apo xdata=xdata&","&rstrgraph("tc1_22") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_23")) then xlabel=xlabel&","&apo+"05:50"+apo xdata=xdata&","&rstrgraph("tc1_23") xtarget=xtarget&","& tarHTra end if if not isnull(rstrgraph("tc1_24")) then xlabel=xlabel&","&apo+"06:50"+apo xdata=xdata&","&rstrgraph("tc1_24") xtarget=xtarget&","& tarHTra end if rstrgraph.movenext wend end if fecing2=mid(fecing,3,2)&"/"&mid(fecing,5,2)&"/"&mid(fecing,1,2) %>