-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
79 lines (77 loc) · 3.97 KB
/
register.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
<td align="left" valign="top" width="200">
<table id="Table1" border="0" cellpadding="0" cellspacing="0" width="200">
<tbody><tr>
<td bgcolor="#1881b6" nowrap="nowrap" height="20" valign="middle" width="21"><img src="files/icons_login.gif" height="17" hspace="1" vspace="1" width="20"></td>
<td class="BlockHeaderLeftRight" height="20" width="178"> <span id="IndicesLbl">Óçëû ó÷åòà</span></td>
<td class="vdots" width="1"></td></tr>
<tr style="font-family: Verdana; font-size: xx-small; color: #006995"><td colspan=3 style="padding-left:5px"><a href="index.php?sel=register">Âñå óçëû</a></td></tr>
<tr><td colspan="3" style="height:5px"></td></tr>
<?php
$query = 'SELECT * FROM uzels';
$e = mysql_query ($query,$i);
if ($e) $ui = mysql_fetch_row ($e);
while ($ui)
{
print '<tr style="font-family: Verdana; font-size: xx-small; color: #006995"><td colspan=3 style="padding-left:5px"><a href="index.php?sel=register&id='.$ui[0].'" onmouseover="arrowOn(this);" onmouseout="arrowOff(this);">'.$ui[1].'</a></td></tr>
<tr><td colspan="3" style="height:5px"></td></tr>';
$ui = mysql_fetch_row ($e);
}
?>
</table></td>
<td style="padding-right: 3px; padding-left: 1px; margin-left: 1px; margin-right: 3px;" align="center" valign="top" width="100%">
<table id="Table8" align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td valign="top">
<div id="maincontent" >
<table border="0" cellpadding="0" cellspacing="1" width="99%">
<tbody><tr style="font-family: Verdana; font-size: 12px; background-color: #006995; color:#ffffff; font-weight:bold"><td align="center">Æóðíàë àâàðèé è ñîáûòèé</td></tr>
<tr><td>
<table border="0" cellpadding="1" cellspacing="1" width="1050" bgcolor="#006995">
<tbody><tr>
<td>
<?php
$query = 'SELECT * FROM uzels WHERE id='.$_GET["id"];
$e = mysql_query ($query,$i);
if ($e) $ui = mysql_fetch_row ($e);
if ($ui) $device=$ui[5];
if ($_GET["id"]!='') $query = 'SELECT * FROM register WHERE device='.$device.' AND date>20110601000000 ORDER BY date DESC LIMIT 1000';
else $query = 'SELECT * FROM register WHERE date>20110601000000 ORDER BY date DESC LIMIT 1000';
$e = mysql_query ($query,$i);
print '<tr>';
print '<td class="BlockHeaderLeftRight" align="center">Âðåìÿ</td>';
print '<td class="BlockHeaderLeftRight" align="center">Óñòðîéñòâî</td>';
print '<td class="BlockHeaderLeftRight" align="center">Êàíàë</td>';
print '<td class="BlockHeaderLeftRight" align="center">Òèï ñîáûòèÿ</td>';
print '<td class="BlockHeaderLeftRight" align="center">Îïèñàíèå</td>';
print '<td class="BlockHeaderLeftRight" align="center">Çíà÷åíèå</td>';
print '</tr>';
if ($e) $ui = mysql_fetch_row ($e);
while ($ui)
{
$query='SELECT * FROM devices WHERE device='.$ui[1];
$e2 = mysql_query ($query,$i);
if ($e2) $uo = mysql_fetch_row ($e2);
if ($uo) $dev=$uo[1];
$query='SELECT * FROM channels WHERE id='.$ui[7];
$e2 = mysql_query ($query,$i);
if ($e2) $uo = mysql_fetch_row ($e2);
if ($uo) $chan=$uo[1];
print '<tr style="font-family: Verdana; font-size: 11px; background-color:#ffffff">';
print '<td class="BlockHeaderLeftRight" align="center">'.$ui[5].'</td>';
print '<td style="padding-left:2px; padding-right:2px">'.$dev.' ['.$ui[1].']</td>';
print '<td style="padding-left:2px; padding-right:2px">'.$chan.'</td>';
if ($ui[2]=='1') print '<td style="padding-left:2px; padding-right:2px; background-color:#aaeeaa">èíôîðìàöèÿ</td>';
if ($ui[2]=='2') print '<td style="padding-left:2px; padding-right:2px; background-color:#33dddd; align:center">ïðåäóïðåæäåíèå</td>';
if ($ui[2]=='3' || $ui[2]=='0') print '<td style="padding-left:2px; padding-right:2px; background-color:#aa0000; align:center">îøèáêà</td>';
print '<td style="padding-left:2px; padding-right:2px">'.$ui[3].'</td>';
print '<td style="padding-left:2px; padding-right:2px">'.$ui[4].'</td>';
print '</tr>';
$ui = mysql_fetch_row ($e);
}
?>
</tbody></table>
</td></tr></tbody></table>
</td></tr>
</tbody></table>
<br><br><br>
</div>