1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948 |
- <!--#include file="Inc/common.asp"-->
- <!--#include file="Inc/MD5.asp"-->
- <!--#include file="Inc/Function.asp"-->
- <!--#include file="Admin_Common.asp"-->
- <!--#include file="CheckComeUrl.asp"-->
- <!--#include file="arrClass.asp"-->
- <!--#include file="xmlClass.asp"-->
- <%
- Dim uid, rsRole, isAdmin, rsgan
- uid = trim(request("uid"))
- if trim(Lcase(AdminName)) = "admin" then
- isAdmin = true
- else
- isAdmin = false
- end if
- dim i, j, k, kk, kkk, totalseconds, maxdot, intervaltime, dot, itime, chart_temp, chart_temp2, chart, chart1, chart2, chart3, chart4, chart5, chart6, chart7, chart8, chart9, chart10
- maxdot = 800
- intervaltime = 1800
- maxperpage = 30
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>斯特钮机房监控系统</title>
- <link href="bs2010.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="js/share.js"></script>
- <script type="text/javascript" src="js/prototype.js"></script>
- <script language="javascript" type="text/javascript" src="datepicker/WdatePicker.js"></script>
- <script language="javascript" type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
- <script language="javascript" type="text/javascript" src="js/jquery.sparkline.js"></script>
- <script language="javascript">
- function GetData()
- {
- url="alarm.asp";//调用页面
- var xmlhttp=null;
- if(window.XMLHttpRequest)
- {
- xmlhttp=new XMLHttpRequest();
- }
- if(!xmlhttp&&window.ActiveXObject)
- {
- try
- {
- xmlhttp=new ActiveXObject("Msxml2.XMLHTTP.5.0")
- }
- catch(e)
- {
- try
- {
- xmlhttp=new ActiveXObject("Msxml2.XMLHTTP.4.0")
- }
- catch(e){
- try
- {
- new ActiveXObject("Msxml2.XMLHTTP")
- }
- catch(e)
- {
- try{
- new ActiveXObject("Microsoft.XMLHTTP")
- }catch(e)
- {
- }
- }
- }
- }
- }
- if(!xmlhttp){alert("XMLHTTP不可用,请升级安装。");location="support/msxml.msi"}
- xmlhttp.open("GET",url,false);
- xmlhttp.send();
- var str = xmlhttp.responseText;
- document.getElementById("loadcontent").innerHTML=str;
-
- setTimeout("GetData()",<%=refreshRate%>);
- }
- </script>
- <script language=javascript>
- <!--
- function SetFocus() {
- if(document.searchForm.bl.value == '')
- document.searchForm.bl.focus();
- else
- document.searchForm.bl.select();
- }
- function CheckForm() {
- // if(document.searchForm.stype.value == 2 && document.searchForm.bl.value == '') {
- // alert('请选择要查询的变量!');
- // document.searchForm.bl.focus();
- // return false;
- // }
- if(document.searchForm.d1.value == '') {
- alert('请选择开始日期!');
- document.searchForm.d1.focus();
- return false;
- }
- if(document.searchForm.d2.value == '') {
- alert('请选择结束日期!');
- document.searchForm.d2.focus();
- return false;
- }
- }
- //-->
- </script>
- </head>
- <body onLoad="javascript:GetData();">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
-
- <tr>
- <td class="mainbg"><table width="760" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td valign="top">
- <div id="loadcontent">
- <p></p>
- 数据载入中……</div>
- <br />
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="20" height="40"><img src="images/arr1.gif" width="14" height="18" /></td>
- <td class="deviceName">报警查询</td>
- </tr>
- </table>
- <br />
- <%
- Action = trim(request("Action"))
- select case Action
- case "search"
- call search
- case "showpage"
- call showpage
- case "showchart"
- call showchart
- case "showpage2"
- call showpage2
- case "showchart2"
- call showchart2
- case "createExcel"
- call createExcel
- case "showpageSms"
- call showpageSms
- case "showpageTel"
- call showpageTel
- case "showpageEmail"
- call showpageEmail
- case else
- call main
- end select
-
- sub main()
- %>
- <form name='searchForm' method='Post' action='report.asp' onSubmit='return CheckForm();'>
- <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
- <tr>
- <td class="deviceTdTitle">变量列表</td>
- <td width="50%" class="deviceTdTitle">筛选器</td>
- </tr>
- <tr class="deviceTd">
- <td rowspan=2 align="center">
- <select name="bl" size="2" <%if multiple = true then response.write "multiple='multiple'"%> id="bl" style="width:300px; height:300px; border:1px solid #CCC;">
- <%=getbl()%>
- </select> </td>
- <td align="center">
- <table width="200" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td align="left"><strong>日期设置</strong></td>
- </tr>
- <tr>
- <td align="left">从
- <input type="hidden" id="d1_y" name="d1_y" size="5"/>
- <input type="hidden" id="d1_M" name="d1_M" size="3"/>
- <input type="hidden" id="d1_d" name="d1_d" size="3"/>
- <input type="hidden" id="d1_HH" name="d1_HH" size="3"/>
- <input type="hidden" id="d1_mm" name="d1_mm" size="3"/>
- <input type="hidden" id="d1_ss" name="d1_ss" size="3"/>
- <input type="text" id="d1" name="d1" style="border:1px solid #CCC;background:url(DatePicker/skin/datePicker.gif) center right no-repeat" onfocus="WdatePicker({el:'d1',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'<%=startdate%>',maxDate:'#F{$dp.$D(\'d2\')||\'%y-%M-%d %H:%m:%s\'}',onpicked:pickedFunc1})"/>
- <script>
- function pickedFunc1(){
- $dp.$('d1_y').value=$dp.cal.getP('y');
- $dp.$('d1_M').value=$dp.cal.getP('M');
- $dp.$('d1_d').value=$dp.cal.getP('d');
- $dp.$('d1_HH').value=$dp.cal.getP('H');
- $dp.$('d1_mm').value=$dp.cal.getP('m');
- $dp.$('d1_ss').value=$dp.cal.getP('s');
- }
- </script></td>
- </tr>
- <tr>
- <td align="left">到
- <input type="hidden" id="d2_y" name="d2_y" size="5"/>
- <input type="hidden" id="d2_M" name="d2_M" size="3"/>
- <input type="hidden" id="d2_d" name="d2_d" size="3"/>
- <input type="hidden" id="d2_HH" name="d2_HH" size="3"/>
- <input type="hidden" id="d2_mm" name="d2_mm" size="3"/>
- <input type="hidden" id="d2_ss" name="d2_ss" size="3"/>
- <%if dateLimit = 0 or allowHistoryDataSearch = false then%>
- <input type="text" id="d2" name="d2" style="border:1px solid #CCC;background:url(DatePicker/skin/datePicker.gif) center right no-repeat" onfocus="WdatePicker({el:'d2',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'d1\')||\'<%=startdate%>\'}',maxDate:'%y-%M-%d %H:%m:%s',onpicked:pickedFunc2})"/>
- <%else%>
- <input type="text" id="d2" name="d2" style="border:1px solid #CCC;background:url(DatePicker/skin/datePicker.gif) center right no-repeat" onfocus="WdatePicker({el:'d2',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'d1\')||\'<%=startdate%>\'}',maxDate:'#F{$dp.$D(\'d1\',{d:<%=dateLimit%>})||\'%y-%M-%d %H:%m:%s\'}',onpicked:pickedFunc2})"/>
- <%end if%>
- <script>
- function pickedFunc2(){
- $dp.$('d2_y').value=$dp.cal.getP('y');
- $dp.$('d2_M').value=$dp.cal.getP('M');
- $dp.$('d2_d').value=$dp.cal.getP('d');
- $dp.$('d2_HH').value=$dp.cal.getP('H');
- $dp.$('d2_mm').value=$dp.cal.getP('m');
- $dp.$('d2_ss').value=$dp.cal.getP('s');
- }
- </script></td>
- </tr>
- </table>
- <br /></td>
- </tr>
- <tr class="deviceTd">
- <td align="center"><label>
- </label>
- <table width="200" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td align="left"><strong>查询类型</strong></td>
- </tr>
- <tr>
- <td align="left">
- <%if allowHistoryDataSearch = true then%><label><input type="radio" name="stype" id="stype" value="1" onclick="javascript:document.getElementById('bl').disabled='';" />历史记录</label><br /><%end if%>
- <label><input name="stype" type="radio" id="stype" value="2" checked="checked" onclick="javascript:document.getElementById('bl').disabled='';" />报警记录</label>
- <%if allowSmsSearch = true then%><br /><label><input name="stype" type="radio" id="stype" value="3" onclick="javascript:document.getElementById('bl').disabled='disabled';" />短信记录</label><%end if%>
- <%if allowTelSearch = true then%><br /><label><input name="stype" type="radio" id="stype" value="4" onclick="javascript:document.getElementById('bl').disabled='disabled';" />电话记录</label><%end if%>
- <%if allowEmailSearch = true then%><br /><label><input name="stype" type="radio" id="stype" value="5" onclick="javascript:document.getElementById('bl').disabled='disabled';" />Email记录</label><%end if%>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr class="deviceTd">
- <td colspan="2" align="center">
- <input type="hidden" id="Action" name="Action" value="search" />
- <input type="submit" name="submit" id="submit" value="查询" />
- </td>
- </tr>
- </table>
- </form>
- <script>
- SetFocus();
- </script>
- <%
- end sub
-
- sub search()
-
- dim bl,d1_y,d1_M,d1_d,d1_HH,d1_mm,d1_ss,d1,d2_y,d2_M,d2_d,d2_HH,d2_mm,d2_ss,d2,stype,sql,isMulti,rswr,bl_str,bl_arr,ao,fr
- stype = trim(request("stype"))
- bl = trim(request("bl"))
- d1_y = trim(request("d1_y"))
- d1_M = trim(request("d1_M"))
- d1_d = trim(request("d1_d"))
- d1_HH = trim(request("d1_HH"))
- d1_mm = trim(request("d1_mm"))
- d1_ss = trim(request("d1_ss"))
- d1 = trim(request("d1"))
- d2_y = trim(request("d2_y"))
- d2_M = trim(request("d2_M"))
- d2_d = trim(request("d2_d"))
- d2_HH = trim(request("d2_HH"))
- d2_mm = trim(request("d2_mm"))
- d2_ss = trim(request("d2_ss"))
- d2 = trim(request("d2"))
-
- if (stype = 1 or stype = 2) and bl = "" then
- response.write "<script>alert('请选择变量!');</script>"
- response.write "<script>window.history.go(-1);</script>"
- response.end
- end if
-
- if ubound(split(bl,",")) > reportNum-1 then
- response.write "<script>alert('所选变量最多不能超过"&reportNum&"个!');</script>"
- response.write "<script>window.history.go(-1);</script>"
- response.end
- end if
-
- totalseconds = datediff("s",d1,d2)
-
- session("bl") = bl
- session("d1") = d1
- session("d2") = d2
- session("totalseconds") = totalseconds
- session("bl") = bl
-
- '获取变量并重新格式化
- if instr(bl,",") > 0 then
- isMulti = true
- else
- isMulti = false
- end if
-
-
- if stype = 1 then
- '检查xml文件是否存在,不存在则创建,否则直接调用
- dim prename, xmlSetting_header, xmlSetting_footer, xmlSetting_body, xmlData_header, xmlData_footer, xmlData_body, xmlFileSetting, xmlFileData, xmlAllData_header, xmlAllData_body, xmlAllData_footer
-
- prename = d1_y&d1_M&d1_d&d1_HH&d1_mm&"to"&d2_y&d2_M&d2_d&d2_HH&d2_mm&"_log"
- ' else
- ' prename = d1_y&d1_M&d1_d&d1_HH&d1_mm&"to"&d2_y&d2_M&d2_d&d2_HH&d2_mm&"_alarm"
-
- session("prename") = prename
- if fso.fileexists(server.mappath("temp/"&prename&"_data.xml")) and fso.fileexists(server.mappath("temp/"&prename&"_settings.xml")) then
- if stype = 1 then
- call showchart
- ' elseif stype = 2 then
- ' call showchart2
- end if
- end if
-
- '检查temp文件夹
- if not fso.Folderexists(server.mappath("temp")) then
- Fso.CreateFolder(Server.MapPath("temp"))
- end if
-
- xmlSetting_header = "<?xml version=""1.0"" encoding=""UTF-8""?>" & vbCrLf
- xmlSetting_header = xmlSetting_header & "<settings>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <data_type></data_type>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <csv_separator></csv_separator>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <skip_rows></skip_rows>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <font></font>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size>12</text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <decimals_separator></decimals_separator>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <thousands_separator></thousands_separator>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <digits_after_decimal>2</digits_after_decimal>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <scientific_min></scientific_min>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <scientific_max></scientific_max>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <redraw>true</redraw>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <reload_data_interval></reload_data_interval>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <preloader_on_reload></preloader_on_reload>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <add_time_stamp></add_time_stamp>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <connect></connect>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <hide_bullets_count>20</hide_bullets_count>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <link_target></link_target>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <start_on_axis></start_on_axis>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <colors></colors>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <rescale_on_hide></rescale_on_hide>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <js_enabled></js_enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <background>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_color></border_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_alpha></border_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <file></file>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </background>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <plot_area>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_color></border_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_alpha></border_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <margins>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <left></left>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <top></top>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <right></right>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <bottom></bottom>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </margins>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </plot_area>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <scroller>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y></y>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <bg_color></bg_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <bg_alpha></bg_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <height></height>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </scroller>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <grid>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <dashed></dashed>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <dash_length></dash_length>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <approx_count></approx_count>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y_left>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha>0</alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <dashed></dashed>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <dash_length></dash_length>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <approx_count></approx_count>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <fill_color>000000</fill_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <fill_alpha>5</fill_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </y_left>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y_right>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <dashed></dashed>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <dash_length></dash_length>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <approx_count></approx_count>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <fill_color></fill_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <fill_alpha></fill_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </y_right>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </grid>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <values>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <rotate>45</rotate>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <frequency></frequency>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <skip_first></skip_first>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <skip_last></skip_last>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <inside></inside>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y_left>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <reverse></reverse>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <rotate></rotate>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <min></min>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <max></max>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <strict_min_max></strict_min_max>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <frequency></frequency>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <skip_first></skip_first>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <skip_last></skip_last>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <unit></unit>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <unit_position></unit_position>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <integers_only></integers_only>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <inside></inside>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <duration></duration>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </y_left>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y_right>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <reverse></reverse>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <rotate></rotate>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <min></min>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <max></max>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <strict_min_max></strict_min_max>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <frequency></frequency>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <skip_first></skip_first>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <skip_last></skip_last>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <unit></unit>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <unit_position></unit_position>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <integers_only></integers_only>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <inside></inside>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <duration></duration>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </y_right>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </values>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <axes>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width></width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <tick_length></tick_length>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y_left>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <type></type>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width></width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <tick_length></tick_length>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <logarithmic></logarithmic>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </y_left>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y_right>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <type></type>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width></width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <tick_length></tick_length>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <logarithmic></logarithmic>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </y_right>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </axes>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <indicator>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <zoomable></zoomable>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <line_alpha></line_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <selection_color></selection_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <selection_alpha></selection_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x_balloon_enabled></x_balloon_enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x_balloon_text_color></x_balloon_text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </indicator>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <balloon>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <only_one></only_one>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <on_off></on_off>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <max_width></max_width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <corner_radius></corner_radius>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_width></border_width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_alpha></border_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_color></border_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </balloon> " & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <legend>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x></x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y></y>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width></width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <max_columns></max_columns>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_color></border_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_alpha></border_alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color_hover></text_color_hover>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <spacing></spacing>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <margins></margins>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <graph_on_off></graph_on_off>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <reverse_order></reverse_order>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <align></align>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <key>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <size></size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <border_color></border_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <key_mark_color></key_mark_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </key>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <values>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width></width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <align></align>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text><![CDATA[]]></text>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </values>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </legend> " & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <zoom_out_button>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x></x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y></y>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color_hover></text_color_hover>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text></text>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </zoom_out_button> " & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <help>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <button>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x></x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y></y>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color_hover></text_color_hover>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text></text>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </button>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <balloon>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width></width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text><![CDATA[]]></text>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </balloon>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </help> " & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <export_as_image>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <file></file>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <target></target>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x></x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y></y>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </export_as_image>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <error_messages>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <enabled></enabled>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x></x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y></y>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <color></color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </error_messages> " & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <strings>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <no_data></no_data>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <export_as_image></export_as_image>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <error_in_data_file></error_in_data_file>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <collecting_data></collecting_data>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <wrong_zoom_value></wrong_zoom_value>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <ss></ss>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <mm></mm>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <hh></hh>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <DD></DD>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </strings>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <context_menu>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <default_items>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <zoom></zoom>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <print></print>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </default_items>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </context_menu>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <vertical_lines>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width>80</width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <alpha></alpha>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <clustered></clustered>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <mask></mask>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </vertical_lines>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
- xmlSetting_header = xmlSetting_header & " <labels>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <label lid=""0"">" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <x></x>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <y>20</y>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <rotate></rotate>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <width></width>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <align>center</align>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_color></text_color>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text_size></text_size>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <text>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " <![CDATA[<b></b>]]>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </text>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </label>" & vbCrLf
- xmlSetting_header = xmlSetting_header & " </labels>" & vbCrLf
- xmlSetting_header = xmlSetting_header & vbCrLf
-
- 'xmlSetting_footer
- xmlSetting_footer = xmlSetting_footer & " <guides>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <max_min></max_min>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <guide>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <axis></axis>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <start_value></start_value>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <end_value></end_value>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <title></title>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <width></width>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <color></color>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <alpha></alpha>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <fill_color></fill_color>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <fill_alpha></fill_alpha>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <inside></inside>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <centered></centered>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <rotate></rotate>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <text_size></text_size>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <text_color></text_color>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <dashed></dashed>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " <dash_length></dash_length>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " </guide>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & " </guides>" & vbCrLf
- xmlSetting_footer = xmlSetting_footer & "</settings>" & vbCrLf
-
- if isMulti = false then
-
- xmlSetting_body = xmlSetting_body & " <graphs>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <graph gid=""1"">" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <axis>left</axis> " & vbCrLf
- xmlSetting_body = xmlSetting_body & " <title>" & xml_getVarDesc(trim(bl)) & "</title>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <line_width>2</line_width>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <color></color>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <bullet>square</bullet>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <bullet_size>8</bullet_size>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <selected>true</selected>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <balloon_text>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <![CDATA[{value}"& xml_getUnit(trim(bl)) & "]]>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " </balloon_text>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " </graph>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " </graphs>" & vbCrLf
- xmlSetting_body = xmlSetting_body & vbCrLf
-
- else
-
- xmlSetting_body = xmlSetting_body & " <graphs>" & vbCrLf
-
- bl_arr = split(bl,",")
-
- for i = 0 to ubound(bl_arr)
- xmlSetting_body = xmlSetting_body & " <graph gid=""" & i+1 & """>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <axis>left</axis> " & vbCrLf
- xmlSetting_body = xmlSetting_body & " <title>" & xml_getVarDesc(trim(bl_arr(i))) & "</title>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <line_width>2</line_width>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <color></color>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <bullet>square</bullet>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <bullet_size>8</bullet_size>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <selected>true</selected>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <balloon_text>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " <![CDATA[{value}"& xml_getUnit(trim(bl_arr(i))) & "]]>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " </balloon_text>" & vbCrLf
- xmlSetting_body = xmlSetting_body & " </graph>" & vbCrLf
- xmlSetting_body = xmlSetting_body & vbCrLf
- next
-
- xmlSetting_body = xmlSetting_body & " </graphs>" & vbCrLf
-
- end if
-
- Set xmlFileSetting = Fso.Createtextfile(server.mappath( "temp/" & prename & "_settings.xml "),,true)
- xmlFileSetting.write xmlSetting_header & xmlSetting_body & xmlSetting_footer
- xmlFileSetting.close
- set xmlFileSetting = nothing
-
- 'xmlData
- xmlData_header = xmlData_header & "<?xml version=""1.0"" encoding=""UTF-8""?>" & vbCrLf
- xmlData_header = xmlData_header & "<chart>" & vbCrLf
-
- xmlData_footer = xmlData_footer & "</chart>" & vbCrLf
-
- itime = totalseconds / intervaltime
- if itime > maxdot then
- itime = maxdot
- intervaltime = totalseconds / itime
- else
- itime = totalseconds / intervaltime
- end if
-
-
-
- if isMulti = false then
-
- xmlData_body = xmlData_body & " <series>" & vbCrLf
- for i = 0 to int(itime)-2
- xmlData_body = xmlData_body & " <value xid=""" & i & """>" & formattime(dateadd("s",i*int(intervaltime),d1)) & "</value>" & vbCrLf
- next
- xmlData_body = xmlData_body & " </series>" & vbCrLf
- xmlData_body = xmlData_body & " <graphs>" & vbCrLf
- xmlData_body = xmlData_body & " <graph gid=""1"">" & vbCrLf
- for i = 0 to int(itime)-2
- xmlData_body = xmlData_body & " <value xid=""" & i & """></value>" & vbCrLf
- next
- xmlData_body = xmlData_body & " </graph>" & vbCrLf
- xmlData_body = xmlData_body & " </graphs>" & vbCrLf
-
- else
-
- xmlData_body = xmlData_body & " <series>" & vbCrLf
- for i = 0 to int(itime)-2
- xmlData_body = xmlData_body & " <value xid=""" & i & """>" & formattime(dateadd("s",i*int(intervaltime),d1)) & "</value>" & vbCrLf
- next
- xmlData_body = xmlData_body & " </series>" & vbCrLf
- xmlData_body = xmlData_body & " <graphs>" & vbCrLf
-
- bl_arr = split(bl,",")
-
- for i = 0 to ubound(bl_arr)
- xmlData_body = xmlData_body & " <graph gid=""" & i+1 & """>" & vbCrLf
- for j = 0 to int(itime)-2
- xmlData_body = xmlData_body & " <value xid=""" & j & """></value>" & vbCrLf
- next
- xmlData_body = xmlData_body & " </graph>" & vbCrLf
- next
-
- xmlData_body = xmlData_body & " </graphs>" & vbCrLf
-
- end if
-
- Set xmlFileData = Fso.Createtextfile(server.mappath("temp/" & prename & "_data.xml"),true)
- xmlFileData.write xmlData_header & xmlData_body & xmlData_footer
- xmlFileData.close
- set xmlFileData = nothing
-
- 'xmlAllData
- xmlAllData_header = xmlAllData_header & "<?xml version=""1.0"" encoding=""UTF-8""?>" & vbCrLf
- if stype = 1 then
- xmlAllData_header = xmlAllData_header & "<?xml-stylesheet type='text/xsl' href='../page.xsl' ?>" & vbCrLf
- else
- xmlAllData_header = xmlAllData_header & "<?xml-stylesheet type='text/xsl' href='../page2.xsl' ?>" & vbCrLf
- end if
- xmlAllData_header = xmlAllData_header & "<data>" & vbCrLf
-
- xmlAllData_footer = xmlAllData_footer & "</data>" & vbCrLf
-
- ' xmlAllData_body = xmlAllData_body & " <subdata>" & vbCrLf
- ' xmlAllData_body = xmlAllData_body & " <varname></varname>" & vbCrLf
- ' xmlAllData_body = xmlAllData_body & " <happentime></happentime>" & vbCrLf
- ' xmlAllData_body = xmlAllData_body & " <value></value>" & vbCrLf
- ' xmlAllData_body = xmlAllData_body & " <alarmmsg></alarmmsg>" & vbCrLf
- ' xmlAllData_body = xmlAllData_body & " </subdata>" & vbCrLf
-
- xmlAllData_body = ""
-
- Set xmlFileData = Fso.Createtextfile(server.mappath("temp/" & prename & "_alldata.xml"),true)
- xmlFileData.write xmlAllData_header & xmlAllData_body & xmlAllData_footer
- xmlFileData.close
- set xmlFileData = nothing
-
- end if
- '创建xml文件完毕
-
- if stype = 2 then
- '===========显示报警日志,读取t_waring_record表===================================================================================================
- ' if isMulti = false then
- '
- ' if bl = "" then
- ' response.write "no records!"
- ' response.end
- ' end if
- '
- ' else
- '
- ' bl_arr = split(bl,",")
- '
- ' for i = 0 to ubound(bl_arr)
- ' sql = "select * from t_waring_record where type_desc = '" & xml_getVarDesc(trim(bl_arr(i))) & "'"
- ' set kk = server.CreateObject("adodb.recordset")
- ' kk.open sql, conn, 1, 1
- ' if not kk.eof then
- ' if bl_str = "" then
- ' bl_str = "'" & xml_getVarDesc(trim(bl_arr(i))) & "'"
- ' else
- ' bl_str = bl_str & "," & "'" & xml_getVarDesc(trim(bl_arr(i))) & "'"
- ' end if
- ' end if
- ' next
- '
- ' if bl_str = "" then
- ' response.write "no records2!"
- ' response.end
- ' end if
- '
- ' end if
- '
- ' sql = "select type_desc,happen_time,curr_value,warncontent from t_waring_record where type_desc "
- ' if isMulti = true then
- ' sql = sql & "in (" & bl_str & ")"
- ' else
- ' sql = sql & "= '" & bl & "'"
- ' end if
- ' '时间范围
- ' sql = sql & " and happen_time between '" & d1 & "' and '" & d2 & "'"
- ' '排序
- ' sql = sql & " order by equip_desc, type_desc, happen_time desc"
- '
- ' 'set rswr = server.CreateObject("adodb.recordset")
- ' 'rswr.open sql, conn, 1, 1
- '
- ' set rswr = conn.execute(sql)
- ' dim xml_alert, xmlFile_alert, i, node_subdata, node_varname, node_value, node_happentime, varname, node_warncontent
- ' xmlFile_alert = server.MapPath("temp/" & prename & "_alldata.xml")
- ' set xml_alert = server.CreateObject("MicroSoft.XMLDom")
- ' xml_alert.Load(xmlFile_alert)
- ' varname = xml_getVarDesc(replace(bl,"""",""))
- '
- ' if xml_alert.parseError.errorCode <> 0 then
- ' Response.Write "xml.parseError.errorCode = " & xml_alert.parseError.errorCode
- ' Response.Write "xml.parseError.reason = " & xml_alert.parseError.reason
- ' Response.Write "xml.parseError.line = " & xml_alert.parseError.line
- ' Response.End
- ' end if
- '
- ' if rswr.bof and rswr.eof then
- ' else
- ' do while not rswr.eof
- ' set node_subdata = xml_alert.createElement("subdata")
- ' set node_varname = xml_alert.createElement("varname")
- ' node_varname.text = rswr("type_desc")
- ' set node_value = xml_alert.createElement("value")
- ' node_value.text = dotwithonebit(rswr("curr_value"),2)
- ' set node_happentime = xml_alert.createElement("happentime")
- ' node_happentime.text = replace(rswr("happen_time"),"""","")
- ' set node_warncontent = xml_alert.createElement("warncontent")
- ' node_warncontent.text = replace(rswr("warncontent"),"""","")
- ' node_subdata.appendChild(node_varname)
- ' node_subdata.appendChild(node_value)
- ' node_subdata.appendChild(node_happentime)
- ' node_subdata.appendChild(node_warncontent)
- ' xml_alert.getElementsByTagName("data")(0).appendChild(node_subdata)
- ' rswr.movenext
- ' loop
- '
- ' end if
- ' rswr.close
- ' set rswr = nothing
- '
- ' xml_alert.save xmlFile_alert
- ' set xml_alert = nothing
-
- session("isMulti") = isMulti
- session("bl") = bl
- session("d1") = d1
- session("d2") = d2
- call showpage2
-
- elseif stype = 3 then '短信
- session("d1") = d1
- session("d2") = d2
- call showpageSms
- elseif stype = 4 then '电话
- session("d1") = d1
- session("d2") = d2
- call showpageTel
- elseif stype = 5 then 'Email
- session("d1") = d1
- session("d2") = d2
- call showpageEmail
- else
- '===========显示历史日志,开始读取文件操作数组===================================================================================================
-
- '判断日期范围加载对应的文本文件
- dim txt, oyy, omm, odd
- txt = ""
-
- 'formattime(dateadd("d",intervaltime*(i-1),d1))
-
- if d1_y = d2_y then 'Only one Year
- if d1_M = d2_M then 'Only one Month
- if d1_d = d2_d then 'Only one day
- txt = FSOFileRead("\log\summary" & d1_y & d1_M & d1_d & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- else 'Multi days
- for odd = d1_d to d2_d
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d1_y & d1_M & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- end if
- else 'Multi months
- for omm = d1_M to d2_M
- if len(omm) = 1 then omm = "0" & omm
- if omm = d1_M then 'First month
- for odd = d1_d to 31
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d1_y & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- elseif omm = d2_M then 'last month
- for odd = 1 to d2_d
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d1_y & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- else 'other month
- for odd = 1 to 31
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d1_y & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- end if
- next
- end if
- else 'multi years
- for oyy = d1_Y to d2_Y
- if oyy = d1_Y then 'first year
- for omm = d1_M to 12
- if len(omm) = 1 then omm = "0" & omm
- if omm = d1_M then 'first month
- for odd = d1_d to 31
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d1_y & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- else 'other month
- for odd = 1 to 31
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d1_y & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- end if
- next
- elseif oyy = d2_Y then 'last year
- for omm = 1 to d2_M
- if len(omm) = 1 then omm = "0" & omm
- if omm = d2_M then 'last month
- for odd = 1 to d2_d
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d2_y & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- else 'other months
- for odd = 1 to 31
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & d2_y & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- end if
- next
- else 'other years
- for omm = 1 to 12
- if len(omm) = 1 then omm = "0" & omm
- for odd = 1 to 31
- if len(odd) = 1 then odd = "0" & odd
- txt = FSOFileRead("\log\summary" & oyy & omm & odd & ".log")
- call logToxml(txt, isMulti, bl, d1, d2, prename)
- next
- next
- end if
- next
- end if
-
- ' 按月查询
- ' if d1_y & d1_M = d2_y & d2_M then '只查询一个月
- ' txt = FSOFileRead("\log\summary" & d1_y & d1_M & d1_d & ".log")
- ' call logToxml(txt, isMulti, bl, d1, d2, prename)
- ' else
- ' if d1_y = d2_y then '同年查询
- ' for i = d1_M to d2_M
- ' if len(i)=1 then i = "0" & i
- ' txt = FSOFileRead("\log\summary" & d1_y & i & ".log")
- ' call logToxml(txt, isMulti, bl, d1, d2, prename)
- ' next
- ' else '跨年查询
- ' for i = d1_y to d2_y
- ' if i = d1_y then
- ' for j = d1_M to 12
- ' if len(j)=1 then j = "0" & j
- ' txt = FSOFileRead("\log\summary" & i & j & ".log")
- ' call logToxml(txt, isMulti, bl, d1, d2, prename)
- ' next
- ' elseif i = d2_y then
- ' for j = 1 to d2_M
- ' if len(j)=1 then j = "0" & j
- ' txt = FSOFileRead("\log\summary" & i & j & ".log")
- ' call logToxml(txt, isMulti, bl, d1, d2, prename)
- ' next
- ' else
- ' for j = 1 to 12
- ' if len(j)=1 then j = "0" & j
- ' txt = FSOFileRead("\log\summary" & i & j & ".log")
- ' call logToxml(txt, isMulti, bl, d1, d2, prename)
- ' next
- ' end if
- ' next
- ' end if
- ' end if
-
- session("bl_arr") = bl_arr
- session("isMulti") = isMulti
- set fr = nothing
- call showchart
- end if
- end sub
-
-
- '===========显示结果=========================================================================================================
- sub showpage
- %>
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_data.jpg" width="740" height="40" border="0" usemap="#showdata" /></td>
- </tr>
- <tr>
- <td align="center"> </td>
- </tr>
- <tr>
- <td align="center"><iframe src="temp/<%=session("prename")%>_alldata.xml" frameborder="0" width="760" height="980" scrolling="no"></iframe> </td>
- </tr>
- </table>
- <map name="showdata" id="showdata">
- <area shape="rect" coords="667,8,740,31" href="report.asp?action=showchart" />
- </map>
- <p></p>
- <%
-
- end sub
-
- '===========绘制图表=========================================================================================================
- sub showchart()
- %>
- <!-- amline script-->
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_chart.jpg" width="740" height="40" border="0" usemap="#showsss" /></td>
- </tr>
- </table>
- <script type="text/javascript" src="js/swfobject.js"></script>
- <div id="flashcontent">
- </div>
-
- <script type="text/javascript">
- // <![CDATA[
- var so = new SWFObject("images/amline.swf", "amline", "760", "500", "8", "#FFFFFF");
- so.addVariable("path", "/");
- so.addVariable("settings_file", encodeURIComponent("temp/<%=session("prename")%>_settings.xml"));
- so.addVariable("data_file", encodeURIComponent("temp/<%=session("prename")%>_data.xml"));
- so.write("flashcontent");
- // ]]>
- </script>
- <!-- end of amline script -->
- <%
- end sub
-
-
- '===========显示结果2=========================================================================================================
- '显示报警记录
- sub showpage2
-
- dim isMulti, bl, d1, d2
- isMulti = session("isMulti")
- bl = session("bl")
- d1 = session("d1")
- d2 = session("d2")
- dim rsa, sql, totalPages, totalRecords, strFileName, bl_arr, bl_str
- strFileName = "report.asp?action=showpage2"
-
- if isMulti = false then
-
- if bl = "" then
- response.write "没有记录!"
- response.end
- end if
-
- else
-
- bl_arr = split(bl,",")
-
- for i = 0 to ubound(bl_arr)
- sql = "select * from t_waring_record where type_desc = '" & xml_getVarDesc(trim(bl_arr(i))) & "'"
- set kk = server.CreateObject("adodb.recordset")
- kk.open sql, conn, 1, 1
- if not kk.eof then
- if bl_str = "" then
- bl_str = "'" & xml_getVarDesc(trim(bl_arr(i))) & "'"
- else
- bl_str = bl_str & "," & "'" & xml_getVarDesc(trim(bl_arr(i))) & "'"
- end if
- end if
- next
-
- if bl_str = "" then
- response.write "没有记录!"
- response.end
- end if
-
- end if
-
- sql = "select type_desc,happen_time,curr_value,warncontent from t_waring_record where type_desc "
- if isMulti = true then
- sql = sql & "in (" & bl_str & ")"
- else
- sql = sql & "= '" & xml_getVarDesc(trim(bl)) & "'"
- end if
- '时间范围
- sql = sql & " and happen_time between '" & d1 & "' and '" & d2 & "'"
- '排序
- sql = sql & " order by equip_desc, type_desc, happen_time desc"
-
- set rsa = server.CreateObject("adodb.recordset")
- rsa.open sql, conn, 1, 1
- rsa.pagesize = maxperpage
- totalPages = rsa.pagecount
- totalRecords = rsa.recordcount
-
- if rsa.bof and rsa.eof then
- else
- dim pageAction
- pageAction = request("pageAction")
- select case pageAction
- case "goPage" session("page") = CLng(request("pageNum"))
- case "first" session("page") = 1
- case "prev" session("page") = session("page") - 1
- case "next" session("page") = session("page") + 1
- case "last" session("page") = totalPages
- case else session("page") = 1
- end select
-
- if session("page") < 1 then session("page") = 1
- if session("page") > totalPages then session("page") = totalPages
- rsa.absolutepage = session("page")
- end if
- %>
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_alarm.jpg" width="740" height="40" border="0" /></td>
- </tr>
- <tr>
- <td align="center"><table width="740" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="40" align="left">
- <%
- if totalPages > 1 then
- if session("page")=1 then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 第一页-上一页 -<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- elseif session("page")=TotalPages Then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-下一页-最后一页"
- else
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- end if
- else
- response.write "共有报警" & totalRecords & "条 " & session("page") & "/" & totalPages & "页"
- end if
- %>
- </td>
- </tr>
- </table>
- <table width="740" border="0" cellspacing="1" cellpadding="0">
- <tr>
- <td height="20" align="center" bgcolor="#FFCC99"><strong>变量名</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>发生时间</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>报警信息</strong></td>
- <td width="80" align="center" bgcolor="#FFCC99"><strong>值</strong></td>
- </tr>
- <%if rsa.bof and rsa.eof then%>
- <tr>
- <td height="20" colspan="4" align="center">没有记录!</td>
- </tr>
- <%
- else
-
- i = 0
- do while not rsa.eof and i < maxperpage
- i = i + 1
- %>
- <tr>
- <td height="20" align="left" bgcolor="#eeeeee" style="padding-left:20px"><%=rsa("type_desc")%></td>
- <td align="center" bgcolor="#F6F6F6"><%=rsa("happen_time")%></td>
- <td align="left" bgcolor="#eeeeee" style="padding-left:20px"><%=rsa("warncontent")%></td>
- <td align="center" bgcolor="#F6F6F6"><%=dotwithonebit(rsa("curr_value"),2)%></td>
- </tr>
- <%
- rsa.movenext
- loop
- rsa.close
- set rsa = nothing
- end if
- %>
- </table></td>
- </tr>
- <tr>
- <td align="center"> </td>
- </tr>
- </table>
- <p></p>
- <%
-
- end sub
-
- '===========显示短信查询结果=========================================================================================================
- sub showpageSms
-
- dim d1, d2
-
- d1 = session("d1")
- d2 = session("d2")
-
- dim rsa, sql, totalPages, totalRecords, strFileName
- strFileName = "report.asp?action=showpageSms"
-
- sql = "select telnum, contactname, sendtime, contents from t_sms_rec where "
- '时间范围
- sql = sql & "sendtime between '" & d1 & "' and '" & d2 & "'"
- '排序
- sql = sql & " order by id desc"
-
- set rsa = server.CreateObject("adodb.recordset")
- rsa.open sql, conn, 1, 1
- rsa.pagesize = maxperpage
- totalPages = rsa.pagecount
- totalRecords = rsa.recordcount
-
- if rsa.bof and rsa.eof then
- else
- dim pageAction
- pageAction = request("pageAction")
- select case pageAction
- case "goPage" session("page") = CLng(request("pageNum"))
- case "first" session("page") = 1
- case "prev" session("page") = session("page") - 1
- case "next" session("page") = session("page") + 1
- case "last" session("page") = totalPages
- case else session("page") = 1
- end select
-
- if session("page") < 1 then session("page") = 1
- if session("page") > totalPages then session("page") = totalPages
- rsa.absolutepage = session("page")
- end if
- %>
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_chart_sms.jpg" width="740" height="40" border="0" /></td>
- </tr>
- <tr>
- <td align="center"><table width="740" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="40" align="left">
- <%
- if totalPages > 1 then
- if session("page")=1 then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 第一页-上一页 -<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- elseif session("page")=TotalPages Then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-下一页-最后一页"
- else
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- end if
- else
- response.write "共有报警" & totalRecords & "条 " & session("page") & "/" & totalPages & "页"
- end if
- %>
- </td>
- </tr>
- </table>
- <table width="740" border="0" cellspacing="1" cellpadding="0">
- <tr>
- <td height="25" align="center" bgcolor="#FFCC99"><strong>手机号码</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>报警信息</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>发送时间</strong></td>
- </tr>
- <%if rsa.bof and rsa.eof then%>
- <tr>
- <td height="20" colspan="3" align="center">没有记录!</td>
- </tr>
- <%
- else
-
- i = 0
- do while not rsa.eof and i < maxperpage
- i = i + 1
- %>
- <tr>
- <td height="25" align="center" bgcolor="#F6F6F6"><%=rsa("telnum")%></td>
- <td align="left" bgcolor="#eeeeee" style="padding-left:20px"><%=rsa("contents")%></td>
- <td align="center" bgcolor="#F6F6F6"><%=rsa("sendtime")%></td>
- </tr>
- <%
- rsa.movenext
- loop
- rsa.close
- set rsa = nothing
- end if
- %>
- </table></td>
- </tr>
- <tr>
- <td align="center"> </td>
- </tr>
- </table>
- <p></p>
- <%
-
- end sub
-
- '===========显示电话查询结果=========================================================================================================
- sub showpageTel
-
- dim d1, d2
-
- d1 = session("d1")
- d2 = session("d2")
-
- dim rsa, sql, totalPages, totalRecords, strFileName
- strFileName = "report.asp?action=showpageTel"
-
- sql = "select telnum, contactname, sendtime, contents from t_notice_rec where "
- '时间范围
- sql = sql & "sendtime between '" & d1 & "' and '" & d2 & "'"
- '排序
- sql = sql & " order by id desc"
-
- set rsa = server.CreateObject("adodb.recordset")
- rsa.open sql, conn, 1, 1
- rsa.pagesize = maxperpage
- totalPages = rsa.pagecount
- totalRecords = rsa.recordcount
-
- if rsa.bof and rsa.eof then
- else
- dim pageAction
- pageAction = request("pageAction")
- select case pageAction
- case "goPage" session("page") = CLng(request("pageNum"))
- case "first" session("page") = 1
- case "prev" session("page") = session("page") - 1
- case "next" session("page") = session("page") + 1
- case "last" session("page") = totalPages
- case else session("page") = 1
- end select
-
- if session("page") < 1 then session("page") = 1
- if session("page") > totalPages then session("page") = totalPages
- rsa.absolutepage = session("page")
- end if
- %>
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_chart_tel.jpg" width="740" height="40" border="0" /></td>
- </tr>
- <tr>
- <td align="center"><table width="740" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="40" align="left">
- <%
- if totalPages > 1 then
- if session("page")=1 then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 第一页-上一页 -<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- elseif session("page")=TotalPages Then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-下一页-最后一页"
- else
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- end if
- else
- response.write "共有报警" & totalRecords & "条 " & session("page") & "/" & totalPages & "页"
- end if
- %>
- </td>
- </tr>
- </table>
- <table width="740" border="0" cellspacing="1" cellpadding="0">
- <tr>
- <td height="25" align="center" bgcolor="#FFCC99"><strong>手机号码</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>报警信息</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>发送时间</strong></td>
- </tr>
- <%if rsa.bof and rsa.eof then%>
- <tr>
- <td height="20" colspan="3" align="center">没有记录!</td>
- </tr>
- <%
- else
-
- i = 0
- do while not rsa.eof and i < maxperpage
- i = i + 1
- %>
- <tr>
- <td height="25" align="center" bgcolor="#F6F6F6"><%=rsa("telnum")%></td>
- <td align="left" bgcolor="#eeeeee" style="padding-left:20px"><%=rsa("contents")%></td>
- <td align="center" bgcolor="#F6F6F6"><%=rsa("sendtime")%></td>
- </tr>
- <%
- rsa.movenext
- loop
- rsa.close
- set rsa = nothing
- end if
- %>
- </table></td>
- </tr>
- <tr>
- <td align="center"> </td>
- </tr>
- </table>
- <p></p>
- <%
-
- end sub
- '===========显示Email查询结果=========================================================================================================
- sub showpageEmail
-
- dim d1, d2
-
- d1 = session("d1")
- d2 = session("d2")
-
- dim rsa, sql, totalPages, totalRecords, strFileName
- strFileName = "report.asp?action=showpageEmail"
-
- sql = "select emailaddr, contactname, sendtime, contents from t_email_rec where "
- '时间范围
- sql = sql & "sendtime between '" & d1 & "' and '" & d2 & "'"
- '排序
- sql = sql & " order by id desc"
-
- set rsa = server.CreateObject("adodb.recordset")
- rsa.open sql, conn, 1, 1
- rsa.pagesize = maxperpage
- totalPages = rsa.pagecount
- totalRecords = rsa.recordcount
-
- if rsa.bof and rsa.eof then
- else
- dim pageAction
- pageAction = request("pageAction")
- select case pageAction
- case "goPage" session("page") = CLng(request("pageNum"))
- case "first" session("page") = 1
- case "prev" session("page") = session("page") - 1
- case "next" session("page") = session("page") + 1
- case "last" session("page") = totalPages
- case else session("page") = 1
- end select
-
- if session("page") < 1 then session("page") = 1
- if session("page") > totalPages then session("page") = totalPages
- rsa.absolutepage = session("page")
- end if
- %>
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_chart_email.jpg" width="740" height="40" border="0" /></td>
- </tr>
- <tr>
- <td align="center"><table width="740" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="40" align="left">
- <%
- if totalPages > 1 then
- if session("page")=1 then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 第一页-上一页 -<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- elseif session("page")=TotalPages Then
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-下一页-最后一页"
- else
- response.write "共有报警<strong>"&TotalRecords&"</strong>条 "&session("page")&"/"&TotalPages&"页 <a href="&strFileName&"&PageAction=first><strong>第一页</strong></a>-<a href="&strFileName&"&PageAction=prev><strong>上一页</strong></a>-<a href="&strFileName&"&PageAction=next><strong>下一页</strong></a>-<a href="&strFileName&"&PageAction=last><strong>最后一页</strong></a>"
- end if
- else
- response.write "共有报警" & totalRecords & "条 " & session("page") & "/" & totalPages & "页"
- end if
- %>
- </td>
- </tr>
- </table>
- <table width="740" border="0" cellspacing="1" cellpadding="0">
- <tr>
- <td height="25" align="center" bgcolor="#FFCC99"><strong>Email地址</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>报警信息</strong></td>
- <td align="center" bgcolor="#FFCC99"><strong>发送时间</strong></td>
- </tr>
- <%if rsa.bof and rsa.eof then%>
- <tr>
- <td height="20" colspan="3" align="center">没有记录!</td>
- </tr>
- <%
- else
-
- i = 0
- do while not rsa.eof and i < maxperpage
- i = i + 1
- %>
- <tr>
- <td height="25" align="center" bgcolor="#F6F6F6"><%=rsa("emailaddr")%></td>
- <td align="left" bgcolor="#eeeeee" style="padding-left:20px"><%=rsa("contents")%></td>
- <td align="center" bgcolor="#F6F6F6"><%=rsa("sendtime")%></td>
- </tr>
- <%
- rsa.movenext
- loop
- rsa.close
- set rsa = nothing
- end if
- %>
- </table></td>
- </tr>
- <tr>
- <td align="center"> </td>
- </tr>
- </table>
- <p></p>
- <%
-
- end sub
-
- '===========绘制图表=========================================================================================================
- sub showchart2()
- %>
- <!-- amline script-->
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_alarm.jpg" width="740" height="40" border="0" /></td>
- </tr>
- </table>
- <map name="showchart" id="showchart"><area shape="rect" coords="569,6,638,30" href="report.asp?action=showpage" />
- </map>
- <script type="text/javascript" src="js/swfobject.js"></script>
- <div id="flashcontent">
- </div>
-
- <script type="text/javascript">
- // <![CDATA[
- var so = new SWFObject("images/amline.swf", "amline", "760", "500", "8", "#FFFFFF");
- so.addVariable("path", "/");
- so.addVariable("settings_file", encodeURIComponent("temp/<%=session("prename")%>_settings.xml"));
- so.addVariable("data_file", encodeURIComponent("temp/<%=session("prename")%>_data.xml"));
- so.write("flashcontent");
- // ]]>
- </script>
- <!-- end of amline script -->
- <%
- end sub
- '===========导出Excel=========================================================================================================
- sub createExcel()
-
- dim prename, xmlFile, xml, iRow
- prename = session("prename")
-
- if not fso.fileexists(server.mappath("temp/"&prename&".xls")) then
-
- xmlFile = server.MapPath("temp/" & prename & "_alldata.xml")
- set xml = server.CreateObject("MicroSoft.XMLDom")
- xml.Load(xmlFile)
-
- Response.ContentType = "application/msexcel"
- Dim xlWorkSheet
- Dim xlApplication
- Set xlApplication = Server.CreateObject("Excel.Application")
- xlApplication.Visible = False
- xlApplication.Workbooks.Add
- Set xlWorksheet = xlApplication.Worksheets(1)
- xlWorksheet.Cells(1,1).Value = "变量名"
- xlWorksheet.Cells(1,2).Value = "值"
- xlWorksheet.Cells(1,3).Value = "发生时间"
-
- iRow = 2
- if xml.getElementsByTagName("subdata").length = 0 then
-
- xlWorksheet.Cells(iRow,1).Value = ""
- xlWorksheet.Cells(iRow,2).Value = ""
- xlWorksheet.Cells(iRow,3).Value = ""
-
- else
- for i = 0 to xml.getElementsByTagName("subdata").length - 1
-
- xlWorksheet.Cells(iRow,1).Value = xml.getElementsByTagName("subdata")(i).childNodes.item(0).text
- xlWorksheet.Cells(iRow,2).Value = xml.getElementsByTagName("subdata")(i).childNodes.item(1).text
- xlWorksheet.Cells(iRow,3).Value = xml.getElementsByTagName("subdata")(i).childNodes.item(2).text
-
- iRow = iRow + 1
- next
- end if
-
- xlWorksheet.SaveAs Server.MapPath("temp/" & prename & ".xls")
- xlApplication.Quit
- 'Close the Workbook
- Set xlWorksheet = Nothing
- Set xlApplication = Nothing
-
- set xml = nothing
-
- response.Redirect "report.asp?action=createExcel"
- else
- %>
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><img src="images/title_excel.jpg" border="0" usemap="#makeexcel" /></td>
- </tr>
- <tr>
- <td height="100" align="center"> </td>
- </tr>
- <tr>
- <td align="center"><a href="temp/<%=prename%>.xls"><img src="images/excel_created.jpg" width="300" height="300" border="0" /></a></td>
- </tr>
- </table>
- <map name="makeexcel" id="makeexcel">
- <area shape="rect" coords="598,6,667,30" href="report.asp?action=showpage" />
- <area shape="rect" coords="667,6,739,30" href="report.asp?action=showchart" />
- </map>
- <%
- end if
-
- end sub
- %>
- </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- </table>
- <map name="showsss" id="showsss">
- <area shape="rect" coords="569,4,642,33" href="report.asp?action=showpage" />
- </map></body>
- </html>
- <%
- '获取设备列表
- function getsb()
- dim sql, rssb, str
- sql = "select t_classid, classname from t_area where child = 0 and parentid <> 0 order by orderid, t_classid"
- set rssb = conn.execute(sql)
- if rssb.bof and rssb.eof then
- str = "<option>无设备</option>"
- else
- do while not rssb.eof
- str = str & "<option value='" & rssb(0) & "'>" & rssb(1) & "</option>"
- rssb.movenext
- loop
- end if
- rssb.close
- set rssb = nothing
- getsb = str
- end function
- '获取变量列表
- function getbl()
- dim sql, rsbl, str, areaid
- sql = "select description, varname from t_dev_variant where issave = '1' order by description"
-
- set rsbl = conn.execute(sql)
- if rsbl.bof and rsbl.eof then
- str = str & "<option>无变量</option>"
- else
- do while not rsbl.eof
- str = str & "<option value='" & rsbl(1) & "'>" & rsbl(0) & "</option>" & vbCrLf
- rsbl.movenext
- loop
- end if
- rsbl.close
- set rsbl = nothing
- getbl = str
- end function
- '打开文件文本并读取内容
- function FSOFileRead(filename)
- Dim objFSO,objCountFile,FiletempData
- Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
- if not objFSO.fileExists(server.mappath(filename)) then exit function
- Set objCountFile = objFSO.OpenTextFile(Server.MapPath(filename),1,True)
- FSOFileRead = objCountFile.ReadAll
- objCountFile.Close
- Set objCountFile=Nothing
- Set objFSO = Nothing
- End Function
- '删除不符合条件的数组元素
- function arrayremove(m, n, byval arrpar, byval key, byval key2, byval key3)
- dim i,j,k
- k=0
- for i = 1 to ubound(arrpar,2)
- if left(arrpar(m,i),len(key)) = key and arrpar(n,i) > key2 and arrpar(n,i) < key3 then
- k = k+1
- for j = 0 to ubound(arrpar,1)
- arrpar(j,k-1) = arrpar(j,i)
- next
- end if
- next
- ReDim Preserve arrpar(ubound(arrpar,1), k-1)
-
- arrayremove = arrpar
- end function
- function arrayremove_multi(m, n, byval arrpar, byval key, byval key2, byval key3)
- dim i,j,k,key_arr,kk
- k=0
- key_arr = split(key,",")
- for i = 1 to ubound(arrpar,2)
- for kk = 0 to ubound(key_arr)
- if left(arrpar(m,i),len(key_arr(kk))) = key_arr(kk) and arrpar(n,i) > key2 and arrpar(n,i) < key3 then
- k = k+1
- for j = 0 to ubound(arrpar,1)
- arrpar(j,k-1) = arrpar(j,i)
- next
- end if
- next
- next
- ReDim Preserve arrpar(ubound(arrpar,1), k-1)
-
- arrayremove = arrpar
- end function
- function arrayremove2(m, n, byval arrpar, byval key, byval key2)
- dim i,j,k
- k=0
- for i = 0 to ubound(arrpar,2)
- if arrpar(m,i) = key and mid(cstr(formattime(arrpar(n,i))),1,10) = mid(cstr(key2),1,10) then
- k = k+1
- for j = 0 to ubound(arrpar,1)
- arrpar(j,k-1) = arrpar(j,i)
- next
- end if
- next
- ReDim Preserve arrpar(ubound(arrpar,1), k-1)
-
- arrayremove2 = arrpar
- end function
- '合并数组
- function array_merge(byVal firstArray, byVal secondArray)
- dim totalSize
- dim i,j
- dim combinedArray
-
- 'Ensure that we're dealing with arrays.
- if not isArray(firstArray) then
- firstArray = Array(firstArray)
- end if
-
- if not isArray(secondArray) then
- secondArray = Array(secondArray)
- end if
-
- 'Set up the new array.
- totalSize = uBound(firstArray,2) + uBound(secondArray,2) + 1
- combinedArray = firstArray
- redim preserve combinedArray(uBound(firstArray,1),totalSize)
-
- for i = 0 to uBound(secondArray,2)
- for j = 0 to uBound(firstArray,1)
- combinedArray(j,uBound(firstArray,2) + 1 + i) = secondArray(j,i)
- next
- next
-
- array_merge = combinedArray
- end function
- function formattime(t)
- dim omm,odd,ohh,ostr
- omm = month(t)
- odd = day(t)
- ohh = hour(t)
- ostr = cstr(t)
- if len(omm) = 1 then ostr = replace(ostr,"-"&omm,"-0"&omm,1,1)
- if len(odd) = 1 then ostr = replace(ostr,"-"&odd,"-0"&odd,1,1)
- if len(ohh) = 1 then ostr = replace(ostr," "&ohh," 0"&ohh,1,1)
- formattime = ostr
- end function
- function getMax(arr)
- dim i, max
- if not isArray(arr) then
- arr = Array(arr)
- end if
- max = cint(arr(0))
- for i = 0 to ubound(arr)
- if cint(arr(i)) > cint(max) then max = cint(arr(i))
- next
- getMax = max
- end function
- '日志文件筛选后存入xml
- function logToxml(oLog, isMulti, bl, d1, d2, prename)
- dim ao, arr, bl_arr, i, j, arr1, arr2
- set ao = new arrayoperate
- arr = ao.stringtoarray(oLog) '日志存入数组
-
- if isMulti = false then
- arr1 = arrayremove(0,2,arr,""""&trim(bl)&"""",""""&d1&"""",""""&d2&"""")
- call arrToxml(0, arr1, d1, intervaltime, itime, trim(bl), prename)
- call arrToxml_all(arr1, d1, trim(bl), prename)
- else
- bl_arr = split(trim(bl),",")
- for i = 0 to ubound(bl_arr)
- arr2 = arrayremove(0,2,arr,""""&trim(bl_arr(i))&"""",""""&d1&"""",""""&d2&"""")
- call arrToxml(i, arr2, d1, intervaltime, itime, trim(bl_arr(i)), prename)
- call arrToxml_all(arr2, d1, trim(bl_arr(i)), prename)
- next
- end if
- set ao = nothing
- end function
- '数组到xml.data.xml
- function arrToxml(num, arr, d1, intervaltime, itime, bl, prename)
-
- dim xml, xmlFile, tags, nodeValue, preValue
- xmlFile = server.MapPath("temp/" & prename & "_data.xml")
- set xml = server.CreateObject("MicroSoft.XMLDom")
- xml.Load(xmlFile)
-
- if xml.parseError.errorCode <> 0 then
- Response.Write "xml.parseError.errorCode = " & xml.parseError.errorCode
- Response.Write "xml.parseError.reason = " & xml.parseError.reason
- Response.Write "xml.parseError.line = " & xml.parseError.line
- Response.End
- end if
-
- for i = 1 to itime - 1
- chart_temp = arrayremove(0, 2, arr, """" & trim(bl) & """", """" & formattime(dateadd("s",intervaltime*(i-1),d1)) & """", """" & formattime(dateadd("s",intervaltime*i,d1)) & """")
- if ubound(chart_temp,2) <> -1 then
- xml.getElementsByTagName("graph")(num).childNodes.item(i-1).text = dotwithonebit(chart_temp(1,ubound(chart_temp,2)),2)
- end if
- chart_temp = ""
- next
- xml.save xmlFile
- set xml = nothing
- end function
- '数组到xml.alldata.xml
- function arrToxml_all(arr, d1, bl, prename)
-
- dim xml_all, xmlFile_all, i, node_subdata, node_varname, node_value, node_happentime, varname
- xmlFile_all = server.MapPath("temp/" & prename & "_alldata.xml")
- set xml_all = server.CreateObject("MicroSoft.XMLDom")
- xml_all.Load(xmlFile_all)
- varname = xml_getVarDesc(replace(bl,"""",""))
-
- if xml_all.parseError.errorCode <> 0 then
- Response.Write "xml.parseError.errorCode = " & xml_all.parseError.errorCode
- Response.Write "xml.parseError.reason = " & xml_all.parseError.reason
- Response.Write "xml.parseError.line = " & xml_all.parseError.line
- Response.End
- end if
-
- for i = 0 to ubound(arr,2)
- set node_subdata = xml_all.createElement("subdata")
- set node_varname = xml_all.createElement("varname")
- node_varname.text = varname
- set node_value = xml_all.createElement("value")
- node_value.text = dotwithonebit(arr(1,i),2)
- set node_happentime = xml_all.createElement("happentime")
- node_happentime.text = replace(arr(2,i),"""","")
- node_subdata.appendChild(node_varname)
- node_subdata.appendChild(node_value)
- node_subdata.appendChild(node_happentime)
- xml_all.getElementsByTagName("data")(0).appendChild(node_subdata)
- next
- xml_all.save xmlFile_all
- set xml_all = nothing
- end function
- function xml_getVarDesc(varName)
- dim rsxml, desc, sql
- sql = "select description from t_dev_variant where varname = '" & varName & "'"
- set rsxml = server.CreateObject("adodb.recordset")
- rsxml.open sql, conn, 1, 1
- if rsxml.bof and rsxml.eof then
- desc = ""
- else
- desc = rsxml("description")
- end if
- xml_getVarDesc = desc
- rsxml.close
- set rsxml = nothing
- end function
- function xml_getUnit(varName)
- dim rsxml, str, sql
- sql = "select unit from t_dev_variant where varname = '" & varName & "'"
- set rsxml = server.CreateObject("adodb.recordset")
- rsxml.open sql, conn, 1, 1
- if rsxml.bof and rsxml.eof then
- str = ""
- else
- str = rsxml(0)
- end if
- xml_getUnit = rsxml(0)
- set rsxml = nothing
- end function
- function dotwithonebit(d,n)
- dim od, odstr
- if isNumeric(d) and instr(d,".") > 0 then
- odstr = split(d,".")
- od = odstr(0) & "." & left(odstr(1),n)
- else
- od = d
- end if
- dotwithonebit = od
- end function
- %>
|