-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
81 lines (73 loc) · 2.64 KB
/
index.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
<?php
// Start MySQL Connection
include('dbconnect.php');
if(!isset($_COOKIE["lang"])) {
$query = json_decode(file_get_contents('https://freegeoip.net/json/'.$_SERVER['REMOTE_ADDR']));
$country=$query->{'country_code'};
if($country=="GR"){
setcookie("lang", "GR", time() + (86400 * 30), "/");
}
else
{
setcookie("lang", "ENG", time() + (86400 * 30), "/");
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Watt Meter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src = 'http://code.jquery.com/jquery-1.11.1.min.js'></script>
<script src = 'js/updateWatt.js'></script>
<script src="js/raphael-2.1.4.min.js"></script>
<script src="js/justgage-1.1.0.min.js"></script>
<link href="css/theme.css" rel="stylesheet" media="screen">
</head>
<body>
<section class="container">
<?php
include('menu.php');
?>
<div class="jumbotron" style="text-align: center">
<h1><b>Watt Meter</b></h1>
<form style="text-align: center;" class = "firstForm" id = "content">
<div style="text-align: center;" class = "content">
<div style="text-align: center width:400px; height:320px" id="g1">
</div>
</div>
</form>
</div>
<div class="jumbotron" style="text-align: center">
<div class="row" >
<div class="col-sm-12" style="text-align: center;" > <?php
include('charthour.php');
?></div>
</div>
</div>
<div class="jumbotron" style="text-align: center">
<div class="row" >
<div class="col-sm-12" style="text-align: center;" > <?php
include('chartday.php');
?></div>
</div>
</div>
<!--<div class="jumbotron" style="text-align: center">
<div class="row" >
<div class="col-sm-12" style="text-align: center;" > <?php //include('chartmonth.php');
?></div>
</div>
</div>
<div class="jumbotron" style="text-align: center">
<div class="row" >
<div class="col-sm-12" style="text-align: center;" > <?php //include('chartyear.php');
?></div>
</div>
</div>-->
<div class="row">
<div class="col-sm-12" style="text-align: center;" > Copyright © Watt Meter 2015</div>
</div>
</section>
<script src="js/bootstrap.min.js"></script>
</body>
</html>