-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuzels_mnem.php
388 lines (346 loc) · 23 KB
/
uzels_mnem.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<meta http-equiv="refresh" content="85,http://212.57.156.94:81/index.php?sel=uzels_mnem&id=<?php print $_GET["id"]; ?>">
<table><tr><td valign="top">
<?php
$query = 'SELECT * FROM uzels WHERE id='.$_GET["id"];
$e = mysql_query ($query,$i);
if ($e) $ui = mysql_fetch_row ($e);
if ($ui) { $name=$ui[1]; $mnem=$ui[3]; }
print '<img usemap="#menu" border=0 src="'.$mnem.'">';
?>
</td><td valign="top">
<table align="center" border="0" cellpadding="0" cellspacing="1" width="100%">
<tr class="BlockHeaderLeftRight" align="center"><td style="white-space:nowrap">Âðåìÿ</td>
<?php
$query = 'SELECT * FROM uzels WHERE id='.$_GET["id"];
$e = mysql_query ($query,$i); $cn=0;
if ($e) $ui = mysql_fetch_row ($e);
$uzel=$ui[0];
$query = 'SELECT * FROM devices WHERE object='.$uzel;
$cn=0;
if ($e = mysql_query ($query,$i))
while ($ui = mysql_fetch_row ($e))
{
$query = 'SELECT * FROM channels WHERE opr>0 AND device='.$ui[11];
$e2 = mysql_query ($query,$i);
if ($e2) $uo = mysql_fetch_row ($e2);
while ($uo)
{
print '<td>'.$uo[15].'</td>';
$prm[$cn]=$uo[9]; $src[$cn]=$uo[10]; $chan[$cn]=$uo[0];
$uo = mysql_fetch_row ($e2); $cn++;
}
}
print '</tr>';
$maxcn=$cn;
$today=getdate();
$ye=$today["year"];
$mn=$today["mon"];
$x=0; $nn=1; $ts=$today["hours"];
if ($ts>1) $ts-=2;
$tm=$dy=$today["mday"];
$max=24;
for ($tn=0; $tn<=$max; $tn++)
{
$date1[$tn]=sprintf ("%d%02d%02d%02d0000",$ye,$mn,$tm,$ts);
$dat[$tn]=sprintf ("%d-%02d-%02d %02d:00:00",$ye,$mn,$tm,$ts);
$data0[$tn]=$data1[$tn]=$data2[$tn]=$data3[$tn]=$data4[$tn]=$data5[$tn]=$data6[$tn]=$data7[$tn]=$data8[$tn]=$data9[$tn]='-';
if ($tm==1 && $ts==0)
{
$mn--; $ts=24;
$dy=31;
if (!checkdate ($mn,31,$ye)) { $dy=30; }
if (!checkdate ($mn,30,$ye)) { $dy=29; }
if (!checkdate ($mn,29,$ye)) { $dy=28; }
$tm=$dy;
}
if ($ts==0) { $ts=24; $tm--; }
$ts--;
}
$query = 'SELECT * FROM data WHERE type=1 ORDER BY date DESC LIMIT 10000';
//echo $query;
$a = mysql_query ($query,$i);
if ($a) $uy = mysql_fetch_row ($a);
while ($uy)
{
$x=$max+1; $c=$maxcn+1;
for ($tn=0; $tn<=$max; $tn++)
if ($uy[2]==$dat[$tn]) $x=$tn;
for ($cn=0; $cn<$maxcn; $cn++)
if ($uy[9]==$chan[$cn]) $c=$cn;
$data[$c][$x]=number_format($uy[3],3);
$uy = mysql_fetch_row ($a);
}
for ($tn=0; $tn<=$max; $tn++)
{
print '<tr><td align=center class="BlockHeaderLeftRight" style="padding-left:5px; padding-right:5px; white-space:nowrap">'.$dat[$tn].'</td>';
for ($cn=0; $cn<$maxcn; $cn++)
if ($data[$cn][$tn]) print '<td align=center bgcolor=#ffffff class="simple">'.$data[$cn][$tn].'</td>';
print '</tr>';
}
?>
</table>
</td></tr></table>
<style type="text/css">
div
{
font-weight: bold;
font-size: 14px;
color: #003300;
font-family: Verdana;
}
</style>
<?php
$query = 'SELECT * FROM data WHERE type=0 OR type=1 OR type=5';
$e = mysql_query ($query,$i);
if ($e) $ui = mysql_fetch_row ($e);
while ($ui)
{
if ($ui[1]==0 && $ui[8]==2)
{
if ($ui[9]==675 && $ui[8]==2) $gvklgru3=$ui[3]; // 675 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ÃÐÓ 3
if ($ui[9]==674 && $ui[8]==2) $gvklgru2=$ui[3]; // 674 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ÃÐÓ 2
if ($ui[9]==673 && $ui[8]==2) $gvklgru1=$ui[3]; // 673 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ÃÐÓ 1
if ($ui[9]==672 && $ui[8]==2) $vvklgru3=$ui[3]; // 672 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ÃÐÓ 3
if ($ui[9]==671 && $ui[8]==2) $vvklgru2=$ui[3]; // 671 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ÃÐÓ 2
if ($ui[9]==670 && $ui[8]==2) $vvklgru1=$ui[3]; // 670 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ÃÐÓ 1
if ($ui[9]==663 && $ui[8]==2) $gvklfab2=number_format($ui[3],2); // 663 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ó÷àñòîê ïîëóôàáðèêàòîâ 2
if ($ui[9]==662 && $ui[8]==2) $gvklfab1=number_format($ui[3],2); // 662 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ó÷àñòîê ïîëóôàáðèêàòîâ 1
if ($ui[9]==661 && $ui[8]==2) $vvklfab2=number_format($ui[3],2); // 661 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ó÷àñòîê ïîëóôàáðèêàòîâ 2
if ($ui[9]==660 && $ui[8]==2) $vvklfab1=number_format($ui[3],2); // 660 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ó÷àñòîê ïîëóôàáðèêàòîâ 1
if ($ui[9]==647 && $ui[8]==2) $gvkloto4=number_format($ui[3],2); // 647 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà îòîïëåíèå 4
if ($ui[9]==646 && $ui[8]==2) $gvkloto3=number_format($ui[3],2); // 646 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà îòîïëåíèå 3
if ($ui[9]==645 && $ui[8]==2) $gvkloto2=number_format($ui[3],2); // 645 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà îòîïëåíèå 2
if ($ui[9]==644 && $ui[8]==2) $gvkloto1=number_format($ui[3],2); // 644 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà îòîïëåíèå 1
if ($ui[9]==643 && $ui[8]==2) $vvkloto4=number_format($ui[3],2); // 643 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð îòîïëåíèå 4
if ($ui[9]==642 && $ui[8]==2) $vvkloto3=number_format($ui[3],2); // 642 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð îòîïëåíèå 3
if ($ui[9]==641 && $ui[8]==2) $vvkloto2=number_format($ui[3],2); // 641 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð îòîïëåíèå 2
if ($ui[9]==640 && $ui[8]==2) $vvkloto1=number_format($ui[3],2); // 640 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð îòîïëåíèå 1
if ($ui[9]==638 && $ui[8]==2) $gvklglz2=number_format($ui[3],2); // 638 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ãëàçóðîâêà 2
if ($ui[9]==637 && $ui[8]==2) $gvklglz1=number_format($ui[3],2); // 637 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ãëàçóðîâêà 1
if ($ui[9]==636 && $ui[8]==2) $vvklglz2=number_format($ui[3],2); // 636 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ãëàçóðîâêà 2
if ($ui[9]==635 && $ui[8]==2) $vvklglz1=number_format($ui[3],2); // 635 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ãëàçóðîâêà 1
if ($ui[9]==625 && $ui[8]==2) $gvklfor4=number_format($ui[3],2); // 625 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ôîðìîâêà 4
if ($ui[9]==624 && $ui[8]==2) $gvklfor3=number_format($ui[3],2); // 624 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ôîðìîâêà 3
if ($ui[9]==623 && $ui[8]==2) $gvklfor2=number_format($ui[3],2); // 623 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ôîðìîâêà 2
if ($ui[9]==622 && $ui[8]==2) $gvklfor1=number_format($ui[3],2); // 622 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà ôîðìîâêà 1
if ($ui[9]==621 && $ui[8]==2) $vvklfor4=number_format($ui[3],2); // 621 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ôîðìîâêà 4
if ($ui[9]==620 && $ui[8]==2) $vvklfor3=number_format($ui[3],2); // 620 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ôîðìîâêà 3
if ($ui[9]==619 && $ui[8]==2) $vvklfor2=number_format($ui[3],2); // 619 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ôîðìîâêà 2
if ($ui[9]==618 && $ui[8]==2) $vvklfor1=number_format($ui[3],2); // 618 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð ôîðìîâêà 1
if ($ui[9]==612 && $ui[8]==2) $gvklarm3=number_format($ui[3],2); // 612 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà àðìèðîâêà 3
if ($ui[9]==611 && $ui[8]==2) $gvklarm2=number_format($ui[3],2); // 611 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà àðìèðîâêà 2
if ($ui[9]==610 && $ui[8]==2) $gvklarm1=number_format($ui[3],2); // 610 Ñîñòîÿíèå íàãðåâàòåëÿ ãîðåëêà àðìèðîâêà 1
if ($ui[9]==609 && $ui[8]==2) $vvklarm3=number_format($ui[3],2); // 609 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð àðìèðîâêà 3
if ($ui[9]==608 && $ui[8]==2) $vvklarm2=number_format($ui[3],2); // 608 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð àðìèðîâêà 2
if ($ui[9]==607 && $ui[8]==2) $vvklarm1=number_format($ui[3],2); // 607 Ñîñòîÿíèå íàãðåâàòåëÿ âåíòèëÿòîð àðìèðîâêà 1
if ($ui[9]==601 && $ui[8]==2) $vklkot2=number_format($ui[3],2); // 601 Ñîñòîÿíèå êîòëà êîòåëüíàÿ
if ($ui[9]==600 && $ui[8]==2) $vklkot1=number_format($ui[3],2); // 600 Ñîñòîÿíèå êîòëà êîòåëüíàÿ
if ($ui[9]==592 && $ui[8]==2) $v2vklkot4=number_format($ui[3],2); // 592 Ñîñòîÿíèå êîòëà 4 áîéëåðà 2
if ($ui[9]==591 && $ui[8]==2) $v2vklkot3=number_format($ui[3],2); // 591 Ñîñòîÿíèå êîòëà 3 áîéëåðà 2
if ($ui[9]==590 && $ui[8]==2) $v2vklkot2=number_format($ui[3],2); // 590 Ñîñòîÿíèå êîòëà 2 áîéëåðà 2
if ($ui[9]==589 && $ui[8]==2) $v2vklkot1=number_format($ui[3],2); // 589 Ñîñòîÿíèå êîòëà 1 áîéëåðà 2
if ($ui[9]==581 && $ui[8]==2) $v1vklkot4=number_format($ui[3],2); // 592 Ñîñòîÿíèå êîòëà 4 áîéëåðà 1
if ($ui[9]==580 && $ui[8]==2) $v1vklkot3=number_format($ui[3],2); // 591 Ñîñòîÿíèå êîòëà 3 áîéëåðà 1
if ($ui[9]==579 && $ui[8]==2) $v1vklkot2=number_format($ui[3],2); // 590 Ñîñòîÿíèå êîòëà 2 áîéëåðà 1
if ($ui[9]==578 && $ui[8]==2) $v1vklkot1=number_format($ui[3],2); // 589 Ñîñòîÿíèå êîòëà 1 áîéëåðà 1
if ($ui[9]==570 && $ui[8]==2) $g1vklmzu=number_format($ui[3],2); // 570 Ñîñòîÿíèå ãîðåëêè Zenith 5
if ($ui[9]==569 && $ui[8]==2) $v1vklmzu=number_format($ui[3],2); // 569 Ñîñòîÿíèå âåíòèëÿòîðà Zenith 5
if ($ui[9]==568 && $ui[8]==2) $g1vklmzu=number_format($ui[3],2); // 568 Ñîñòîÿíèå ãîðåëêè Zenith 4
if ($ui[9]==567 && $ui[8]==2) $v1vklmzu=number_format($ui[3],2); // 567 Ñîñòîÿíèå âåíòèëÿòîðà Zenith 4
if ($ui[9]==566 && $ui[8]==2) $g1vklmzu=number_format($ui[3],2); // 566 Ñîñòîÿíèå ãîðåëêè Zenith 3
if ($ui[9]==565 && $ui[8]==2) $v1vklmzu=number_format($ui[3],2); // 565 Ñîñòîÿíèå âåíòèëÿòîðà Zenith 3
if ($ui[9]==564 && $ui[8]==2) $g1vklmzu=number_format($ui[3],2); // 564 Ñîñòîÿíèå ãîðåëêè Zenith 2
if ($ui[9]==563 && $ui[8]==2) $v1vklmzu=number_format($ui[3],2); // 563 Ñîñòîÿíèå âåíòèëÿòîðà Zenith 2
if ($ui[9]==562 && $ui[8]==2) $g1vklmzu=number_format($ui[3],2); // 562 Ñîñòîÿíèå ãîðåëêè Zenith 1
if ($ui[9]==561 && $ui[8]==2) $v1vklmzu=number_format($ui[3],2); // 561 Ñîñòîÿíèå âåíòèëÿòîðà Zenith 1
if ($ui[9]==549 && $ui[8]==2) $gvklmzu2=number_format($ui[3],2); // 549 Ñîñòîÿíèå òåïëîãåíåðàòîðà ÌÇÓ 2
if ($ui[9]==546 && $ui[8]==2) $gvklmzu1=number_format($ui[3],2); // 546 Ñîñòîÿíèå òåïëîãåíåðàòîðà ÌÇÓ 1
}
if ($ui[1]==5)
{
//echo $ui[9].' '.$ui[8].' '.$ui[3].'<br>';
if ($ui[9]==582 && $ui[8]==12 && !$vsboi2) $vsboi2=number_format($ui[3],2).' ì3'; // 582 Ðàñõîä âîäû áîéëåð 2
//if ($ui[9]==583 && $ui[8]==11 && !$qsboi2) $qsboi2=number_format($ui[3],2).' ì3'; // 583 Ðàñõîä ãàçà áîéëåð 2
if ($ui[9]==573 && $ui[8]==14 && !$w11) $w11=number_format($ui[3],2); // 573 Ðàñõîä ýëåêòðîýíåðãèè áîéëåð 1
if ($ui[9]==571 && $ui[8]==12 && !$vsboi1) $vsboi1=number_format($ui[3],2).' ì3'; // 571 Ðàñõîä âîäû áîéëåð 1
if ($ui[9]==572 && $ui[8]==11 && !$qsboi1) $qsboi1=number_format($ui[3],2).' ì3'; // 572 Ðàñõîä ãàçà áîéëåð 1
if ($ui[9]==584 && $ui[8]==14 && !$w2) $w2=number_format($ui[3],2).' kWt'; // 584 Ðàñõîä ýëåêòðîýíåðãèè áîéëåð 2
}
if ($ui[9]==669 && $ui[8]==4) $tsh4=number_format($ui[3],2); // 669 Òåìïåðàòóðà øëèêåðà 4
if ($ui[9]==668 && $ui[8]==4) $tsh3=number_format($ui[3],2); // 668 Òåìïåðàòóðà øëèêåðà 3
if ($ui[9]==667 && $ui[8]==4) $tgru=number_format($ui[3],2); // 667 Òåìïåðàòóðà ãàçà ÃÐÓ
if ($ui[9]==666 && $ui[8]==14) $wgru=number_format($ui[3],2); // 666 Ðàñõîä ýëåêòðîýíåðãèè ÃÐÓ
if ($ui[9]==665 && $ui[8]==11) $qgru=number_format($ui[3],2); // 665 Ðàñõîä ãàçà ÃÐÓ
if ($ui[9]==664 && $ui[8]==16) $pgru=number_format($ui[3],2); // 664 Äàâëåíèå ãàçà ÃÐÓ
if ($ui[9]==659 && $ui[8]==4) $tfab_v1=number_format($ui[3],2); // 659 Òåìïåðàòóðà âîçäóõà ó÷àñòîê ïîëóôàáðèêàòîâ 2
if ($ui[9]==658 && $ui[8]==4) $tfab_v2=number_format($ui[3],2); // 658 Òåìïåðàòóðà âîçäóõà ó÷àñòîê ïîëóôàáðèêàòîâ 1
if ($ui[9]==657 && $ui[8]==14) $wfab=number_format($ui[3],2); // 657 Ðàñõîä ýëåêòðîýíåðãèè ó÷àñòîê ïîëóôàáðèêàòîâ
if ($ui[9]==656 && $ui[8]==4) $ts33=number_format($ui[3],2).' C'; // 656 Òåìïåðàòóðà ñóøèëà 2 çîíû 3
if ($ui[9]==655 && $ui[8]==4) $ts32=number_format($ui[3],2).' C'; // 655 Òåìïåðàòóðà ñóøèëà 2 çîíû 2
if ($ui[9]==654 && $ui[8]==4) $ts31=number_format($ui[3],2).' C'; // 654 Òåìïåðàòóðà ñóøèëà 2 çîíû 1
if ($ui[9]==653 && $ui[8]==4) $ts23=number_format($ui[3],2).' C'; // 653 Òåìïåðàòóðà ñóøèëà 2 çîíû 3
if ($ui[9]==652 && $ui[8]==4) $ts22=number_format($ui[3],2).' C'; // 652 Òåìïåðàòóðà ñóøèëà 2 çîíû 2
if ($ui[9]==651 && $ui[8]==4) $ts21=number_format($ui[3],2).' C'; // 651 Òåìïåðàòóðà ñóøèëà 2 çîíû 1
if ($ui[9]==650 && $ui[8]==4) $ts13=number_format($ui[3],2).' C'; // 650 Òåìïåðàòóðà ñóøèëà 1 çîíû 3
if ($ui[9]==649 && $ui[8]==4) $ts12=number_format($ui[3],2).' C'; // 649 Òåìïåðàòóðà ñóøèëà 1 çîíû 2
if ($ui[9]==648 && $ui[8]==4) $ts11=number_format($ui[3],2).' C'; // 648 Òåìïåðàòóðà ñóøèëà 1 çîíû 1
if ($ui[9]==639 && $ui[8]==14) $elec9=number_format($ui[3],2); // 639 Ðàñõîä ýëåêòðîýíåðãèè òåïëîâåè íà îòîïëåíèå
if ($ui[9]==677 && $ui[8]==4) $ts4=number_format($ui[3],2); // 677 Òåìïåðàòóðà òåõíîëîãèÿ ãëàçóðîâêà 4
if ($ui[9]==634 && $ui[8]==4) $ts3=number_format($ui[3],2); // 634 Òåìïåðàòóðà òåõíîëîãèÿ ãëàçóðîâêà 3
if ($ui[9]==633 && $ui[8]==4) $ts2=number_format($ui[3],2); // 633 Òåìïåðàòóðà òåõíîëîãèÿ ãëàçóðîâêà 2
if ($ui[9]==632 && $ui[8]==4) $ts1=number_format($ui[3],2); // 632 Òåìïåðàòóðà òåõíîëîãèÿ ãëàçóðîâêà 1
if ($ui[9]==631 && $ui[8]==4) $ttfz13=number_format($ui[3],2); // 631 Òåìïåðàòóðà íà ñóøèëà ãëàçóðîâêà 6
if ($ui[9]==630 && $ui[8]==4) $ttfz12=number_format($ui[3],2); // 630 Òåìïåðàòóðà íà ñóøèëà ãëàçóðîâêà 5
if ($ui[9]==629 && $ui[8]==4) $ttfz11=number_format($ui[3],2); // 629 Òåìïåðàòóðà íà ñóøèëà ãëàçóðîâêà 4
if ($ui[9]==628 && $ui[8]==4) $ttfz23=number_format($ui[3],2); // 628 Òåìïåðàòóðà íà ñóøèëà ãëàçóðîâêà 3
if ($ui[9]==627 && $ui[8]==4) $ttfz22=number_format($ui[3],2); // 627 Òåìïåðàòóðà íà ñóøèëà ãëàçóðîâêà 2
if ($ui[9]==626 && $ui[8]==4) $ttfz21=number_format($ui[3],2); // 626 Òåìïåðàòóðà íà ñóøèëà ãëàçóðîâêà 1
if ($ui[9]==617 && $ui[8]==4) $tfrm_v4=number_format($ui[3],2); // 617 Òåìïåðàòóðà âîçäóõà ôîðìîâêà 4
if ($ui[9]==616 && $ui[8]==4) $tfrm_v3=number_format($ui[3],2); // 616 Òåìïåðàòóðà âîçäóõà ôîðìîâêà 3
if ($ui[9]==615 && $ui[8]==4) $tfrm_v2=number_format($ui[3],2); // 615 Òåìïåðàòóðà âîçäóõà ôîðìîâêà 2
if ($ui[9]==614 && $ui[8]==4) $tfrm_v1=number_format($ui[3],2); // 614 Òåìïåðàòóðà âîçäóõà ôîðìîâêà 1
if ($ui[9]==613 && $ui[8]==14) $elec6=number_format($ui[3],2); // 613 Ðàñõîä ýëåêòðîýíåðãèè ôîðìîâêà
if ($ui[9]==606 && $ui[8]==4) $tarm_v1=number_format($ui[3],2).' C'; // 606 Òåìïåðàòóðà âîçäóõà àðìèðîâêà 1
if ($ui[9]==605 && $ui[8]==14) $elec3=number_format($ui[3],2); // 605 Ðàñõîä ýëåêòðîýíåðãèè àðìèðîâêà
if ($ui[9]==676 && $ui[8]==4) $tarm_v2=number_format($ui[3],2).' C'; // 676 Òåìïåðàòóðà âîçäóõà àðìèðîâêà 2
if ($ui[9]==604 && $ui[8]==4) $tnv=number_format($ui[3],2); // 604 Òåìïåðàòóðà âîçäóõà íà óëèöå
if ($ui[9]==603 && $ui[8]==4) $vkot2=number_format($ui[3],2); // 603 Ðàñõîä âîäû êîòåëüíàÿ
if ($ui[9]==599 && $ui[8]==4) $pkot2=number_format($ui[3],2); // 599 Äàâëåíèå ãàçà êîòåëüíàÿ
if ($ui[9]==597 && $ui[8]==4) $qkot2=number_format($ui[3],2); // 597 Ðàñõîä ãàçà êîòåëüíàÿ
if ($ui[9]==595 && $ui[8]==4) $tkot2=number_format($ui[3],2); // 595 Òåìïåðàòóðà ãàçà êîòåëüíàÿ
if ($ui[9]==602 && $ui[8]==4) $vkot1=number_format($ui[3],2); // 602 Ðàñõîä âîäû êîòåëüíàÿ
if ($ui[9]==598 && $ui[8]==4) $pkot1=number_format($ui[3],2); // 598 Äàâëåíèå ãàçà êîòåëüíàÿ
if ($ui[9]==596 && $ui[8]==4) $qkot1=number_format($ui[3],2); // 596 Ðàñõîä ãàçà êîòåëüíàÿ
if ($ui[9]==594 && $ui[8]==4) $tkot1=number_format($ui[3],2); // 594 Òåìïåðàòóðà ãàçà êîòåëüíàÿ
if ($ui[9]==593 && $ui[8]==14) $elec1=number_format($ui[3],2); // 593 Ðàñõîä ýëåêòðîýíåðãèè êîòåëüíàÿ
if ($ui[9]==588 && $ui[8]==4) $tkot2_v2=number_format($ui[3],2); // 588 Òåìïåðàòóðà âîçäóõà äóøåâûå 2
if ($ui[9]==587 && $ui[8]==4) $tkot2_v1=number_format($ui[3],2); // 587 Òåìïåðàòóðà âîçäóõà äóøåâûå 2
if ($ui[9]==584 && $ui[8]==14 && !$elec2) $elec2=number_format($ui[3],2); // 584 Ðàñõîä ýëåêòðîýíåðãèè áîéëåð 2
if ($ui[9]==582 && $ui[8]==12 && !$vboi2) $vboi2=number_format($ui[3],2).' ì3';// 582 Ðàñõîä âîäû áîéëåð 2
//if ($ui[9]==583 && $ui[8]==11 && !$qboi2) $qboi2=number_format($ui[3],2).' ì3';// 583 Ðàñõîä ãàçà áîéëåð 2
if ($ui[9]==577 && $ui[8]==4) $tkot1_v2=number_format($ui[3],2).' C'; // 588 Òåìïåðàòóðà âîçäóõà äóøåâûå 1
if ($ui[9]==576 && $ui[8]==4) $tkot1_v1=number_format($ui[3],2).' C'; // 587 Òåìïåðàòóðà âîçäóõà äóøåâûå 1
if ($ui[9]==573 && $ui[8]==14 && !$elec11) $elec11=number_format($ui[3],2); // 573 Ðàñõîä ýëåêòðîýíåðãèè áîéëåð 1
if ($ui[9]==571 && $ui[8]==12 && !$vboi1) $vboi1=number_format($ui[3],2).' ì3'; // 571 Ðàñõîä âîäû áîéëåð 1
if ($ui[9]==572 && $ui[8]==11 && !$qboi1) $qboi1=number_format($ui[3],2).' ì3'; // 572 Ðàñõîä ãàçà áîéëåð 1
if ($ui[9]==560 && $ui[8]==4) $tmzu_v10=number_format($ui[3],2); // 560 Òåìïåðàòóðà âîçäóõà ÌÇÓ 10
if ($ui[9]==559 && $ui[8]==4) $tmzu_v9=number_format($ui[3],2); // 559 Òåìïåðàòóðà âîçäóõà ÌÇÓ 9
if ($ui[9]==558 && $ui[8]==4) $tmzu_v8=number_format($ui[3],2); // 558 Òåìïåðàòóðà âîçäóõà ÌÇÓ 8
if ($ui[9]==557 && $ui[8]==4) $tmzu_v7=number_format($ui[3],2); // 557 Òåìïåðàòóðà âîçäóõà ÌÇÓ 7
if ($ui[9]==556 && $ui[8]==4) $tmzu_v6=number_format($ui[3],2); // 556 Òåìïåðàòóðà âîçäóõà ÌÇÓ 6
if ($ui[9]==555 && $ui[8]==4) $tmzu_v5=number_format($ui[3],2); // 555 Òåìïåðàòóðà âîçäóõà ÌÇÓ 5
if ($ui[9]==554 && $ui[8]==4) $tmzu_v4=number_format($ui[3],2); // 554 Òåìïåðàòóðà âîçäóõà ÌÇÓ 4
if ($ui[9]==553 && $ui[8]==4) $tmzu_v3=number_format($ui[3],2); // 553 Òåìïåðàòóðà âîçäóõà ÌÇÓ 3
if ($ui[9]==552 && $ui[8]==4) $tmzu_v2=number_format($ui[3],2); // 552 Òåìïåðàòóðà âîçäóõà ÌÇÓ 2
if ($ui[9]==551 && $ui[8]==4) $tmzu_v1=number_format($ui[3],2); // 551 Òåìïåðàòóðà âîçäóõà ÌÇÓ 1
if ($ui[9]==548 && $ui[8]==4) $tsh2=number_format($ui[3],2); // 548 Òåìïåðàòóðà øëèêåðà 2
if ($ui[9]==547 && $ui[8]==4) $tsh1=number_format($ui[3],2); // 547 Òåìïåðàòóðà øëèêåðà 1
if ($ui[9]==545 && $ui[8]==4 && !$elec7) $elec7=number_format($ui[3],2).' êÂò/÷'; // 545 Ðàñõîä ýëåêòðîýíåðãèè ÌÇÓ
$ui = mysql_fetch_row ($e);
}
if ($_GET["id"]==8)
{
// t dush
print '<div id="tt1" style="position:absolute;top:180;left:450;width:150;height:30">W='.$elec11.'</div>';
print '<div id="tt2" style="position:absolute;top:250;left:450;width:100;height:30">V='.$vboi1.'</div>';
print '<div id="tt2" style="position:absolute;top:250;left:50;width:100;height:30">Q='.$qboi1.'</div>';
print '<div id="tt2" style="position:absolute;top:130;left:100;width:100;height:30">T='.$tkot1_v1.' C</div>';
print '<div id="tt2" style="position:absolute;top:130;left:400;width:100;height:30">T='.$tkot1_v2.' C</div>';
}
if ($_GET["id"]==9)
{
// t dush
print '<div id="tt1" style="position:absolute;top:300;left:300;width:150;height:30">W='.$elec2.'</div>';
print '<div id="tt2" style="position:absolute;top:300;left:450;width:100;height:30">V='.$vboi2.'</div>';
print '<div id="tt2" style="position:absolute;top:130;left:100;width:100;height:30">T='.$tkot2_v1.' C</div>';
print '<div id="tt2" style="position:absolute;top:130;left:400;width:100;height:30">T='.$tkot2_v2.' C</div>';
}
if ($_GET["id"]==7)
{
// t mzu
print '<div id="tt1" style="position:absolute;top:350;left:70;width:150;height:30">'.$tmzu_v1.'</div>';
print '<div id="tt1" style="position:absolute;top:350;left:210;width:150;height:30">'.$tmzu_v2.'</div>';
print '<div id="tt1" style="position:absolute;top:350;left:275;width:150;height:30">'.$tmzu_v3.'</div>';
print '<div id="tt1" style="position:absolute;top:350;left:335;width:150;height:30">'.$tmzu_v4.'</div>';
print '<div id="tt1" style="position:absolute;top:350;left:460;width:150;height:30">'.$tmzu_v5.'</div>';
print '<div id="tt1" style="position:absolute;top:400;left:70;width:150;height:30">'.$tmzu_v6.'</div>';
print '<div id="tt1" style="position:absolute;top:400;left:210;width:150;height:30">'.$tmzu_v7.'</div>';
print '<div id="tt1" style="position:absolute;top:400;left:275;width:150;height:30">'.$tmzu_v8.'</div>';
print '<div id="tt1" style="position:absolute;top:400;left:335;width:150;height:30">'.$tmzu_v9.'</div>';
print '<div id="tt1" style="position:absolute;top:400;left:460;width:150;height:30">'.$tmzu_v10.'</div>';
}
if ($_GET["id"]==16)
{
// t opravka
print '<div id="tt1" style="position:absolute;top:150;left:200;width:150;height:30">'.$tfab_v1.'</div>';
print '<div id="tt2" style="position:absolute;top:300;left:200;width:100;height:30">'.$tfab_v2.'</div>';
}
if ($_GET["id"]==12)
{
// t opravka
print '<div id="tt1" style="position:absolute;top:420;left:5;width:150;height:30">'.$tfrm_v1.' C</div>';
print '<div id="tt1" style="position:absolute;top:420;left:150;width:150;height:30">'.$tfrm_v2.' C</div>';
print '<div id="tt1" style="position:absolute;top:420;left:300;width:150;height:30">'.$tfrm_v3.' C</div>';
print '<div id="tt1" style="position:absolute;top:420;left:450;width:150;height:30">'.$tfrm_v4.' C</div>';
}
if ($_GET["id"]==11)
{
// t arm
print '<div id="tt1" style="position:absolute;top:100;left:170;width:150;height:30">'.$tarm_v1.'</div>';
print '<div id="tt2" style="position:absolute;top:100;left:360;width:100;height:30">'.$tarm_v2.'</div>';
print '<div id="tt3" style="position:absolute;top:430;left:360;width:100;height:30">W='.$elec3.'</div>';
}
if ($_GET["id"]==13)
{
// t technolog
print '<div id="tt1" style="position:absolute;top:270;left:100;width:150;height:30">'.$tsh1.'</div>';
print '<div id="tt2" style="position:absolute;top:270;left:255;width:100;height:30">'.$tsh2.'</div>';
print '<div id="tt3" style="position:absolute;top:270;left:410;width:100;height:30">'.$tsh3.'</div>';
print '<div id="tt4" style="position:absolute;top:270;left:565;width:100;height:30">'.$tsh4.'</div>';
}
if ($_GET["id"]==15)
{
// t technolog
print '<div id="ts11" style="position:absolute;top:230;left:285;width:150;height:30">'.$ts11.'</div>';
print '<div id="ts21" style="position:absolute;top:230;left:360;width:100;height:30">'.$ts12.'</div>';
print '<div id="ts31" style="position:absolute;top:230;left:435;width:100;height:30">'.$ts12.'</div>';
print '<div id="ts41" style="position:absolute;top:230;left:510;width:100;height:30">'.$ts13.'</div>';
print '<div id="ts12" style="position:absolute;top:350;left:285;width:150;height:30">'.$ts21.'</div>';
print '<div id="ts22" style="position:absolute;top:350;left:360;width:100;height:30">'.$ts22.'</div>';
print '<div id="ts32" style="position:absolute;top:350;left:435;width:100;height:30">'.$ts22.'</div>';
print '<div id="ts42" style="position:absolute;top:350;left:510;width:100;height:30">'.$ts23.'</div>';
print '<div id="ts13" style="position:absolute;top:480;left:285;width:150;height:30">'.$ts31.'</div>';
print '<div id="ts13" style="position:absolute;top:480;left:360;width:150;height:30">'.$ts32.'</div>';
print '<div id="ts13" style="position:absolute;top:480;left:435;width:150;height:30">'.$ts32.'</div>';
print '<div id="ts13" style="position:absolute;top:480;left:510;width:150;height:30">'.$ts33.'</div>';
}
?>
<style type="text/css">
div.dv
{
font-size: 10px;
color: #003399;
font-family: Verdana;
padding:5px;
background-color: #E8F0F5;
}
</style>
<table>
<?php
$query = 'SELECT * FROM uzels WHERE id='.$_GET["id"];
$e = mysql_query ($query,$i); $cn=0;
if ($e) $ui = mysql_fetch_row ($e);
while ($ui)
{
$query = 'SELECT * FROM channels WHERE prm=4 AND device='.$ui[5].'';
$e2 = mysql_query ($query,$i); $cn=0;
if ($e2) $uo = mysql_fetch_row ($e2);
while ($uo)
{
print '<tr><td><img src="charts/trend4.php?width=1250&max=500&height=200&chan='.$uo[0].'&prm='.$uo[9].'&device='.$uo[2].'&name='.$uo[1].'&min=8000&max=8500&vkl=9&maxt=1000"></td></tr>';
$uo = mysql_fetch_row ($e2);
}
$ui = mysql_fetch_row ($e);
}
?>
</table>