[7849] | 1 | <?php
|
---|
[7878] | 2 | session_start();
|
---|
| 3 | if (session_is_registered("session_user") && session_is_registered("session_id"))
|
---|
| 4 | {
|
---|
[7849] | 5 |
|
---|
| 6 | include_once 'cfg/mysql.php';
|
---|
| 7 | connectdb();
|
---|
| 8 |
|
---|
| 9 | if(isset($_GET['p']))
|
---|
| 10 | {
|
---|
| 11 | $page = $_GET['p'];
|
---|
| 12 | }
|
---|
| 13 | else
|
---|
| 14 | {
|
---|
| 15 | $page = 'bar';
|
---|
| 16 | }
|
---|
| 17 | ?>
|
---|
| 18 |
|
---|
| 19 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
| 20 | <html xmlns="http://www.w3.org/1999/xhtml">
|
---|
| 21 | <head>
|
---|
| 22 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
---|
| 23 | <title>SaveEnergy Leiden</title>
|
---|
| 24 | <link href="css/style.css" rel="stylesheet" type="text/css" />
|
---|
| 25 | <script type="text/javascript" src="js/swfobject.js"></script>
|
---|
| 26 | <script type="text/javascript">
|
---|
| 27 | swfobject.embedSWF(
|
---|
| 28 | "open-flash-chart.swf", "chart",
|
---|
| 29 | "100%", "300", "9.0.0", "expressInstall.swf",
|
---|
[7878] | 30 | {"data-file":"graphs/<?php echo $page ?>.txt"});
|
---|
[7849] | 31 |
|
---|
| 32 | function bar_1(chart_id)
|
---|
| 33 | {
|
---|
| 34 | var description = "TL1";
|
---|
| 35 | var room = chart_id;
|
---|
[7887] | 36 | window.location = ("?p="+room);
|
---|
[7849] | 37 | }
|
---|
| 38 |
|
---|
| 39 | </script>
|
---|
| 40 |
|
---|
| 41 | </head>
|
---|
| 42 |
|
---|
| 43 | <body>
|
---|
| 44 | <div id="container">
|
---|
| 45 | <div id="header">
|
---|
| 46 | <img src="images/Untitled-3_01.jpg" />
|
---|
| 47 | </div>
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 | <div id="navigation">
|
---|
| 51 | <a href="index.php">Home</a> <a href="page1.php?p=bar" "style='color:#f7921c'">Grafieken</a> <a href="page2.php">Uitleg</a> <a href="page3.php">Info</a>
|
---|
| 52 | </div>
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 | <div id="content_wrap">
|
---|
| 56 | <div id="content_top">
|
---|
| 57 | </div>
|
---|
| 58 | <div id="content">
|
---|
| 59 | <h1>Grafieken</h1>
|
---|
[7887] | 60 | <h2>Energieverbruik</h2>
|
---|
| 61 | <p>Hier de grafiek die het energieverbruik van gisteren per kamer toont.</p>
|
---|
| 62 | <br /><br />
|
---|
[7849] | 63 | <div id="chart"></div>
|
---|
[7887] | 64 | <br /><br />
|
---|
| 65 |
|
---|
[7878] | 66 | <?
|
---|
[7887] | 67 | if ($handle = opendir('graphs/')) {
|
---|
| 68 | $i=0;
|
---|
| 69 | while (false !== ($file = readdir($handle))) {
|
---|
| 70 | if ($file != "." && $file != "..") {
|
---|
| 71 | $i++;
|
---|
| 72 | $page_name=substr($file, 0, strpos($file, "."));
|
---|
| 73 | echo "<a href=page1.php?p=$page_name>$page_name</a>";
|
---|
| 74 | if($i==14)
|
---|
| 75 | {echo "<br>";
|
---|
| 76 | $i=1;}
|
---|
| 77 | }
|
---|
| 78 | }
|
---|
[7849] | 79 | }
|
---|
[7887] | 80 | closedir($handle); ?>
|
---|
| 81 |
|
---|
[7849] | 82 | </div>
|
---|
| 83 |
|
---|
| 84 | <div id="content_bottom">
|
---|
| 85 | </div>
|
---|
| 86 | </div>
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 | <div id="footer">
|
---|
| 90 | Save Energy Leiden is een onderdeel van het <a href="http://www.ict4saveenergy.eu/">Save Energy project</a>.
|
---|
| 91 | </div>
|
---|
| 92 | </div>
|
---|
| 93 | </body>
|
---|
| 94 |
|
---|
| 95 | </html>
|
---|
[7878] | 96 | <?
|
---|
| 97 | }
|
---|
| 98 | else
|
---|
| 99 | {
|
---|
| 100 | header('location:index.php');
|
---|
| 101 | }
|
---|
| 102 | ?>
|
---|