Skip to content

Commit

Permalink
add query checks
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 30, 2015
1 parent 469847a commit 6bc7ce9
Show file tree
Hide file tree
Showing 28 changed files with 92 additions and 11 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
81 changes: 81 additions & 0 deletions html/errors/db_error.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>nettemp</title>

<!-- Bootstrap -->
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="../custom.css" rel="stylesheet">

<!-- jQuery -->
<script type="text/javascript" src="../jquery/jquery-1.11.3.min.js"></script>

<!-- bootstrap-toogle -->
<link href="../bootstrap-toggle/bootstrap-toggle.min.css" rel="stylesheet">
<script type="text/javascript" src="../bootstrap-toggle/bootstrap-toggle.min.js"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->






</head>
<body>

<!-- Static navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a href="http://nettemp.pl" target="_blank"><img src="../../media/png/nettemp.pl.png" height="50"></a>

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">

<li><a href="sqlite_error.php">Update DB</a></li>
</ul>

</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</nav>


<div class="container">
<?php include('../../modules/tools/html/tools_update.php'); ?>
</div>


<footer class="footer">
<div class="container text-center">
<p class="text-muted"><table><tr>Donate for developing <?php include('../../modules/info/paypal.php'); ?> <?php passthru("/usr/bin/git branch |grep [*]|awk '{print $2}' && awk '/Changelog/{y=1;next}y' ../../readme.md |head -2 |grep -v '^$'"); ?>| System time <?php passthru("date +%H:%M:%S");?></tr></table></p>
</div>
</footer>


<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> -->
<script src="../bootstrap/js/bootstrap.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->


</body>
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
<title>nettemp</title>

<!-- Bootstrap -->
<link href="jscss/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="html/bootstrap/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="jscss/custom.css" rel="stylesheet">
<link href="html/custom.css" rel="stylesheet">

<!-- jQuery -->
<script type="text/javascript" src="jscss/jquery/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="html/jquery/jquery-1.11.3.min.js"></script>

<!-- bootstrap-toogle -->
<link href="jscss/bootstrap-toggle/bootstrap-toggle.min.css" rel="stylesheet">
<script type="text/javascript" src="jscss/bootstrap-toggle/bootstrap-toggle.min.js"></script>
<link href="html/bootstrap-toggle/bootstrap-toggle.min.css" rel="stylesheet">
<script type="text/javascript" src="html/bootstrap-toggle/bootstrap-toggle.min.js"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
Expand Down Expand Up @@ -70,7 +70,7 @@
<?php
$db1 = new PDO('sqlite:dbf/nettemp.db');
$rows1 = $db1->query("SELECT * FROM gpio WHERE mode='simple' OR mode='moment' OR mode='trigger'");
$rows2 = $db1->query("SELECT * FROM relays WHERE type='relay'");
$rows2 = $db1->query("SELECT * FROM relays WHERE type='relay'") or header("Location: html/errors/db_error.php");
$row1 = $rows1->fetchAll();
$row2 = $rows2->fetchAll();

Expand Down Expand Up @@ -152,7 +152,7 @@

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> -->
<script src="jscss/bootstrap/js/bootstrap.min.js"></script>
<script src="html/bootstrap/js/bootstrap.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->


Expand Down
2 changes: 1 addition & 1 deletion modules/status/html/status.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="/jscss/mansonry/masonry.pkgd.min.js"></script>
<script src="html/mansonry/masonry.pkgd.min.js"></script>
<script type="text/JavaScript">
var container = document.querySelector('#container');
var msnry = new Masonry( container, {
Expand Down
6 changes: 3 additions & 3 deletions modules/view/html/view.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script type="text/javascript" src="jscss/highcharts/highstock.js"></script>
<script type="text/javascript" src="jscss/highcharts/exporting.js"></script>
<script type="text/javascript" src="jscss/highcharts/dark-unica.js"></script>
<script type="text/javascript" src="html/highcharts/highstock.js"></script>
<script type="text/javascript" src="html/highcharts/exporting.js"></script>
<script type="text/javascript" src="html/highcharts/dark-unica.js"></script>

<script type="text/JavaScript">
function timedRefresh(timeoutPeriod) {
Expand Down

0 comments on commit 6bc7ce9

Please sign in to comment.