-
Notifications
You must be signed in to change notification settings - Fork 0
/
lk6.php
94 lines (85 loc) · 3.23 KB
/
lk6.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
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!doctype php manual "-//by the PHP Documentation Group//en">
<!doctype odbc manual "-//by microsoft corp.//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<link rel="stylesheet" href="shablon.css" type="text/css">
<title>Àíàëèç ïîêàçàíèé ïî õîëîäíîé è ãîðÿ÷åé âîäå</title>
<body leftmargin=0 topmargin=5 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0>
<?php
include("config/local.php");
$arr = get_defined_vars();
$today=getdate();
$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);
if ($_GET["date"]=='') { $month=5; $date=$month; }
else { $month=$_GET["date"]; $date=$month; }
if ($_GET["year"]>2000) ; else $_GET["year"]=$today["year"];
include("time.inc");
if ($_GET["date"]=='')
{
$st=sprintf ("%d%02d01000000",$today["year"],$today["mon"]-1);
$fn=sprintf ("%d%02d01000000",$today["year"],$today["mon"]);
$month=$today["mon"]-1;
$k=1;
}
else
{
if ($_GET["date"]!=$today["mon"]) $k=1;
else $k=$today["mday"]/31;
$st=sprintf ("%d%02d00000000",$today["year"],$_GET["date"]);
$fn=sprintf ("%d%02d00000000",$today["year"],$_GET["date"]+1);
}
?>
<table width=600px cellpadding=2 cellspacing=1 bgcolor=#ffffff align=center>
<tr><td>
<?php
print '<table width=1200px cellpadding=1 cellspacing=1 bgcolor=#664466 align=center>';
print '<tr><td bgcolor=#ffcf68 align=center><font class=tablz3>Îò÷åò çà</font></td>';
$today=getdate();
$tm=$today["mon"];
$cn=12;
while ($cn)
{
if ($tm==1) $dat='ßíâàðü';
if ($tm==2) $dat='Ôåâðàëü';
if ($tm==3) $dat='Ìàðò';
if ($tm==4) $dat='Àïðåëü';
if ($tm==5) $dat='Ìàé';
if ($tm==6) $dat='Èþíü';
if ($tm==7) $dat='Èþëü';
if ($tm==8) $dat='Àâãóñò';
if ($tm==9) $dat='Ñåíòÿáðü';
if ($tm==10) $dat='Îêòÿáðü';
if ($tm==11) $dat='Íîÿáðü';
if ($tm==12) $dat='Äåêàáðü';
$sts=sprintf ("%d%02d00000000",$today["year"],$tm);
$fns=sprintf ("%d%02d00000000",$today["year"],$tm+1);
print '<td bgcolor=#ffffff align=center><a href="index.php?sel=lk6&obj='.$_GET["obj"].'&st='.$sts.'&fn='.$fns.'&date='.$tm.'&year='.$today["year"].'"><font class=tablz3>'.$dat.' '.$today["year"].'</font></td>';
if ($tm==1) { $tm=12; $today["year"]--; }
else $tm--;
$cn--;
}
print '</tr></table>';
?>
</td></tr></table>
<br>
<table width=1200px cellpadding=2 cellspacing=1 bgcolor=#ffffff align=center>
<?php
$today=getdate();
$query = 'SELECT * FROM build WHERE build_id='.$_GET["obj"];
$a = mysql_query ($query,$i);
$uy = mysql_fetch_row ($a);
if ($uy[4])
for ($ent=1;$ent<=$uy[4];$ent++)
{
print '<tr><td><img width=1200 height=350 src="charts/barplots16.php?type=1&n1='.$ent.'&obj='.$_GET["obj"].'&date='.$date.'&year='.$today["year"].'"></td></tr>';
print '<tr><td><img width=1200 height=350 src="charts/barplots17.php?type=1&n1='.$ent.'&obj='.$_GET["obj"].'&date='.$date.'&year='.$today["year"].'"></td></tr>';
}
?>
</table>
</body>
</html>