12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958 |
- <!--#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="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 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("contactname")%></td>
- <td 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="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 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("contactname")%></td>
- <td 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="20" align="center" bgcolor="#FFCC99"><strong>联系人</strong></td>
- <td 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="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("contactname")%></td>
- <td 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
- if isAdmin = true then
- sql = "select description, varname from t_dev_variant where issave = '1' order by description"
- else
- sql = "select description, varname from t_dev_variant where uid in (select uid from t_role_equip where userid = '" & trim(AdminName) & "') and issave = '1' order by description"
- end if
- 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
- %>
|