-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurrent2.php
64 lines (59 loc) · 3.44 KB
/
current2.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
<?php
include("config/local.php");
$i = mysql_connect ($mysql_host,$mysql_user,$mysql_password); $e=mysql_select_db ($mysql_db_name);
$query = "set character_set_client='cp1251'"; mysql_query ($query,$i);
$query = "set character_set_results='cp1251'"; mysql_query ($query,$i);
$query = "set collation_connection='cp1251_general_ci'"; mysql_query ($query,$i);
?>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=Windows-1251">
<link href="files/GulfBaseStyle.css" type="text/css" rel="stylesheet">
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
<?php
$today=getdate();
$stdate=sprintf ("%d%02d01000000",$today["year"],$today["mon"]);
$fndate=sprintf ("%d%02d01000000",$today["year"],$today["mon"]+1);
$query = 'SELECT SUM(value) FROM data WHERE date>='.$stdate.' AND date<'.$fndate.' AND type=2 AND prm=14';
$a = mysql_query ($query,$i);
if ($a) $uy = mysql_fetch_row ($a);
if ($uy) $elec2=number_format($uy[0],2);
$query = 'SELECT SUM(value) FROM data WHERE date>='.$stdate.' AND date<'.$fndate.' AND type=2 AND prm=11';
$a = mysql_query ($query,$i);
if ($a) $uy = mysql_fetch_row ($a);
if ($uy) $gas2=number_format($uy[0],2);
$query = 'SELECT SUM(value) FROM data WHERE date>='.$stdate.' AND date<'.$fndate.' AND type=2 AND prm=12';
$a = mysql_query ($query,$i);
if ($a) $uy = mysql_fetch_row ($a);
if ($uy) $voda2=number_format($uy[0],2);
$query = 'SELECT date FROM data WHERE type=0 ORDER BY date DESC';
$a = mysql_query ($query,$i);
if ($a) $uy = mysql_fetch_row ($a);
if ($uy) $time=$uy[0];
?>
<form name="Form1" method="post" action="Indices.aspx?sid=5" id="Form1">
<table id="Market1" style="border: 1px solid White; background-color: rgb(250, 252, 251); font-family: Rod; width: 100%; border-collapse: collapse;" align="Center" border="0" cellpadding="4" cellspacing="0">
<tbody><tr style="color: Black; background-color: rgb(229, 238, 244); font-family: Verdana; font-size: xx-small; font-weight: bold;" align="center">
<td>Ïàðàìåòð</td><td align="center">Çíà÷åíèå</td><td align="center">Åä.Èç.</td><td style="width: 10px;"> </td></tr>
<tr style="color: Black; background-color: White; font-family: Verdana; font-size: xx-small;">
<td><a target="_top" href="index.php?sel=channels2&type=1">Ýëåêòðè÷åñòâî </a></td>
<td align="center"><?php print $elec2; ?></td>
<td align="right"><span id="Market1_ctl02_lblPrice">êÂò</span></td>
<td align="left"><img id="Market1_ctl02_imgInd" src="files/u.gif" style="border-width: 0px;"></td>
</tr>
<tr style="color: Black; background-color: White; font-family: Verdana; font-size: xx-small;">
<td><a target="_top" href="index.php?sel=channels2&type=3">Ãàç</a></td>
<td align="center"><?php print $gas2; ?></td>
<td align="right"><span id="Market1_ctl04_lblPrice">t.ì3</span></td>
<td align="left"><img id="Market1_ctl04_imgInd" src="files/n.gif" style="border-width: 0px;"></td>
</tr>
<tr style="color: Black; background-color: White; font-family: Verdana; font-size: xx-small;">
<td><a target="_top" href="index.php?sel=channels2&type=2">Âîäà</a></td>
<td align="center"><?php print $voda2; ?></td>
<td align="right"><span id="Market1_ctl05_lblPrice">ì3</span></td>
<td align="left"><img id="Market1_ctl05_imgInd" src="files/n.gif" style="border-width: 0px;"></td>
</tr>
<tr style="background-color: rgb(229, 238, 244); font-family: Arial; font-size: 7pt; height: 20px;">
<td colspan="4" align="right">Äàííûå íà <?php print $time; ?></td></tr>
</tbody></table> </form>
</body></html>