Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.39 KB | None | 0 0
  1. <?php
  2. include('session.php');
  3. ?>
  4. <!DOCTYPE html>
  5. <html lang="en">
  6. <head>
  7. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  8. <meta charset="utf-8">
  9. <title>Bravo Portal</title>
  10. <meta name="generator" content="Bootply" />
  11. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  12. <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
  13. <link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome.min.css">
  14. <link href="css/bootstrap.min.css" rel="stylesheet">
  15. <!-- Bootstrap -->
  16. <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
  17. <!-- Responsive slider -->
  18. <link href="css/responsive-calendar.css" rel="stylesheet">
  19. <!--[if lt IE 9]>
  20. <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
  21. <![endif]-->
  22. <link href="css/styles.css" rel="stylesheet">
  23. <style type="text/css">
  24.  
  25. table.scroll {
  26. width: 100%;
  27. border-spacing: 0;
  28. border: 1px solid grey;
  29. }
  30.  
  31. table.scroll th,
  32. table.scroll td,
  33. table.scroll tr,
  34. table.scroll thead,
  35. table.scroll tbody { display: block; }
  36.  
  37. table.scroll thead tr {
  38. /* fallback */
  39. width: 97%;
  40. /* minus scroll bar width */
  41. width: -webkit-calc(100% - 16px);
  42. width: -moz-calc(100% - 16px);
  43. width: calc(100% - 16px);
  44. }
  45.  
  46. table.scroll tr:after {
  47. content: ' ';
  48. display: block;
  49. visibility: hidden;
  50. clear: both;
  51. }
  52.  
  53. table.scroll tbody {
  54. height: 100px;
  55. overflow-y: auto;
  56. overflow-x: hidden;
  57. }
  58.  
  59. table.scroll tbody td,
  60. table.scroll thead th {
  61. width: 19%;
  62. float: left;
  63. border-right: 0px solid grey;
  64. }
  65.  
  66. thead tr th {
  67. height: 30px;
  68. line-height: 30px;
  69. /*text-align: left;*/
  70. }
  71.  
  72. table td.green{
  73. background: green;
  74. }
  75.  
  76. table td.red{
  77. background: red;
  78. }
  79.  
  80. table td.orange{
  81. background: orange;
  82. }
  83.  
  84. tbody { border-top: 2px solid black; padding-bottom: 50%; }
  85.  
  86. tbody td:last-child, thead th:last-child {
  87. border-right: none !important;
  88. }
  89.  
  90. #hoverTable{
  91. width:100%;
  92. border-collapse:collapse;
  93. }
  94. #hoverTable td{
  95.  
  96. }
  97. /* Define the default color for all the table rows */
  98. #hoverTable tr{
  99.  
  100. }
  101. /* Define the hover highlight color for the table row */
  102. #hoverTable tr:hover {
  103. background-color: #ffff99;
  104. }
  105.  
  106. .my-legend .legend-title {
  107. text-align: left;
  108. margin-bottom: 5px;
  109. font-weight: bold;
  110. font-size: 90%;
  111. }
  112. .my-legend .legend-scale ul {
  113. margin: 0;
  114. margin-bottom: 5px;
  115. padding: 0;
  116. float: left;
  117. list-style: none;
  118. }
  119. .my-legend .legend-scale ul li {
  120. display: inline-block;
  121. font-size: 80%;
  122. list-style: none;
  123. line-height: 18px;
  124. vertical-align: text-top;
  125. }
  126. .my-legend ul.legend-labels li span {
  127. display: inline-block;
  128. height: 16px;
  129. width: 20px;
  130. margin-right: 5px;
  131. margin-left: 10px;
  132. border: 1px solid #999;
  133. }
  134.  
  135. .my-legend a {
  136. color: #777;
  137. }
  138.  
  139. /*notities*/
  140.  
  141.  
  142. @import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,400);
  143.  
  144. /* body {
  145. font: normal normal 13px/16px "Open Sans", sans-serif;
  146. background: #ccc;
  147. } */
  148.  
  149. .contain{
  150. width: 300px;
  151. border-radius: 3px;
  152. }
  153.  
  154. form {
  155. display: inline-block;
  156. }
  157.  
  158. input{
  159. padding: 1px 1px 1px 1px;
  160. }
  161.  
  162. #button1{
  163. display: inline-block;
  164. background-color:#fc999b;
  165. color:#ffffff;
  166. border-radius: 1px;
  167. text-align:center;
  168. margin-top:1px;
  169. padding: 3px 3px;
  170. }
  171.  
  172. #button1:hover{
  173. cursor: pointer;
  174. opacity: .8;}
  175.  
  176. ol {padding-left: 20px;}
  177. ol li {padding: 5px;color:#000;}
  178. ol li:nth-child(even){background: #70ABAF;}
  179. .strike{text-decoration: line-through;}
  180. li:hover{
  181. cursor: pointer;
  182. }
  183. /*notities*/
  184. a{
  185. color: black;
  186. }
  187.  
  188. </style>
  189. </head>
  190.  
  191. <body style="background-color: #70ABAF;">
  192.  
  193. <!-- BEGIN HEADER -->
  194. <header class="navbar navbar-default navbar-static-top" role="banner" style="background-color: #32292F; color: #99E1D9;">
  195.  
  196. <div class="container">
  197. <div class="navbar-header">
  198. <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse">
  199. <span class="sr-only">Toggle navigation</span>
  200. <span class="icon-bar"></span>
  201. <span class="icon-bar"></span>
  202. <span class="icon-bar"></span>
  203. </button>
  204. <a href="/" class="navbar-brand">Bravo Portal</a>
  205. </div>
  206. <nav class="collapse navbar-collapse" role="navigation">
  207. <ul class="nav navbar-nav">
  208. <li>
  209. <a href="portal.php">Hoofdpagina</a>
  210. </li>
  211. <li>
  212. <a href="patients.php">Cliënten</a>
  213. </li>
  214. </ul>
  215. <div align="right" style="padding-top: 1%;">
  216. <b id="welcome">Welkom: <i style="color: #ADADFF;"><?php echo $login_session; ?></i></b>
  217. <b id="logout"><a href="../logout.php">Uitloggen</a></b>
  218. </div>
  219. </nav>
  220. </div>
  221. </header>
  222. <!-- END HEADER -->
  223.  
  224.  
  225. <div class="container">
  226. <div class="row">
  227.  
  228.  
  229. <!-- WAARSCHUWWING -->
  230. <div class="col-md-8" style="border-style: solid; color: #99E1D9;">
  231. <div style=" padding-top: 2%; padding-bottom: 2%;">WAARSCHUWINGEN<small class="fa fa-cog fa-spin fa-1x fa-fw" style="color: #705D56;"></small></div>
  232. <!-- <hr style="padding: 0%; margin: 0%;"> -->
  233.  
  234. <!-- Begin Gevallen -->
  235. <div class="col-md-6" style="color: #705D56; margin-bottom: 0%; padding-bottom: 0%;">
  236. <p>Rode Status Geval</p>
  237. </div>
  238. <div class="col-md-6" style="color: #705D56;">
  239. <p>Oranje Status Geval</p>
  240. </div>
  241. <!-- End Gevallen -->
  242.  
  243. <!-- Show Record -->
  244. <div style="height:90px; overflow:auto; margin-bottom: 1%; border: solid 0px #705D56; padding-top: 0%; margin-top: 0%;" class="col-md-6">
  245. <?php
  246. $servername = "localhost";
  247. $username = "root";
  248. $password = "";
  249. $dbname = "patientdb";
  250.  
  251. // Create connection
  252. $conn = new mysqli($servername, $username, $password, $dbname);
  253. // Check connection
  254. if ($conn->connect_error) {
  255. die("Connection failed: " . $conn->connect_error);
  256. }
  257.  
  258. $sql = "SELECT naam FROM clients WHERE status > '60'";
  259. $result = $conn->query($sql);
  260.  
  261. if ($result->num_rows > 0) {
  262. // output data of each row
  263. while($row = $result->fetch_assoc()) {
  264. echo "<a href='patients.php'>";
  265. echo "" . $row["naam"]."</a><br>";
  266. }
  267. } else {
  268. echo "0 results";
  269. }
  270. $conn->close();
  271. ?>
  272. </div>
  273.  
  274. <!-- Show Record -->
  275. <div style="height:90px; overflow:auto; margin-bottom: 1%; border: solid 0px #705D56;" class="col-md-6">
  276. <!-- show records -->
  277. <?php
  278. $servername = "localhost";
  279. $username = "root";
  280. $password = "";
  281. $dbname = "patientdb";
  282.  
  283. // Create connection
  284. $conn = new mysqli($servername, $username, $password, $dbname);
  285. // Check connection
  286. if ($conn->connect_error) {
  287. die("Connection failed: " . $conn->connect_error);
  288. }
  289.  
  290. $sql = "SELECT naam FROM clients WHERE status > '58' AND status < '60'";
  291. $result = $conn->query($sql);
  292.  
  293. if ($result->num_rows > 0) {
  294. // output data of each row
  295. while($row = $result->fetch_assoc()) {
  296. echo "<a href='patients.php'>";
  297. echo "" . $row["naam"]."</a><br>";
  298. }
  299. } else {
  300. echo "0 results";
  301. }
  302. $conn->close();
  303. ?>
  304. </div>
  305. <!-- end show record -->
  306.  
  307. </div>
  308. <!--END WAARSCHUWING -->
  309.  
  310. <!-- BEGIN LEGEND -->
  311. <div class='my-legend' style="clear: both; padding-top: 0%; margin-top: 0%;">
  312. <div class='legend-scale'>
  313. <ul class='legend-labels'>
  314. <li><span style='background:green;'></span></li>
  315. <li>Goed</li>
  316. <li><span style='background:yellow;'></span></li>
  317. <li>Minder goed</li>
  318. <li><span style='background:orange;'></span></li>
  319. <li>Matig</li>
  320. <li><span style='background:red;'></span></li>
  321. <li>Slecht</li>
  322. </ul>
  323. </div>
  324. </div>
  325. <!-- END LEGEND -->
  326.  
  327. <!-- BEGIN CLIENT LIST -->
  328. <div class="col-md-8" style=" padding-top: 2%; padding-left: 0%; clear: both;">
  329. <h4 style="color: #99E1D9;"> Cliënten Lijst</h4>
  330. <!-- Begin Scroll List -->
  331. <div>
  332.  
  333. <table class="scroll">
  334. <thead style="background-color: #99E1D9; color: #705D56;">
  335. <tr>
  336. <th>ID</th>
  337. <th>Naam Client</th>
  338. <th>Laatste Update</th>
  339. <th style="margin-left: 21%; padding-left: 0%;">Status</th>
  340. </tr>
  341. </thead>
  342. <tbody id="hoverTable" style="font-size: 11pt;">
  343. <?php
  344. //connect ot database
  345. $connection = mysql_connect('localhost', 'root', '');
  346. mysql_select_db('patientdb');
  347.  
  348. //get data from data base for the first three columns in the table.
  349. $query = "SELECT id, naam, datum, status FROM clients";
  350. $result = mysql_query($query);
  351.  
  352. //fetch results per row into the table.
  353. while($row = mysql_fetch_array($result)){ //Loop through results
  354. echo "<tr>
  355.  
  356. <td>" . $row['id'] . "</td>
  357. <td>" . $row['naam'] . "</td>
  358. <td>" . $row['datum'] . "</td>
  359.  
  360. <td style='padding-left: 20%;'>";
  361. // check of the data from 'status' per condition and assign it a color.
  362. if ($row['status'] > 60 && $row['status'] < 70) {
  363. echo "<p class='fa fa-circle' style='color: red;''></p>";
  364. } elseif ($row['status'] > 58 && $row['status'] < 60) {
  365. echo "<p class='fa fa-circle' style='color: orange;''></p>";
  366. } elseif ($row['status'] > 55 && $row['status'] < 57) {
  367. echo "<p class='fa fa-circle' style='color: yellow;''></p>";
  368. } else{
  369. echo "<p class='fa fa-circle' style='color: green;''></p>";
  370. }
  371. echo "</td>
  372.  
  373. </tr>";
  374. }
  375. //close database connection
  376. mysql_close();
  377. ?>
  378.  
  379. </tbody>
  380. </table>
  381.  
  382. </div>
  383. <!-- End Scroll List -->
  384.  
  385. </div>
  386. <!-- END BEGIN CLIENT LIST -->
  387.  
  388.  
  389. <!-- BEGIN CALENDER -->
  390. <div class="col-md-3" style="padding-left: 4%; padding-top: 0%; padding-bottom: 0%; margin-top: 0%;" >
  391.  
  392. <div class="responsive-calendar">
  393. <div class="controls">
  394. <a class="pull-left" data-go="prev"><div class="btn btn-primary" style="background-color: #705D56; color: #99E1D9; "><</div></a>
  395. <h4><span data-head-year></span> <span data-head-month></span></h4>
  396. <a class="pull-right" data-go="next"><div class="btn btn-primary" style="background-color: #705D56; color: #99E1D9;">></div></a>
  397. </div><hr/>
  398. <div class="day-headers">
  399. <div class="day header">Ma</div>
  400. <div class="day header">Di</div>
  401. <div class="day header">Wo</div>
  402. <div class="day header">Do</div>
  403. <div class="day header">Vr</div>
  404. <div class="day header">Za</div>
  405. <div class="day header">Zo</div>
  406. </div>
  407. <div class="days" data-group="days">
  408. </div>
  409. </div>
  410. <div>
  411. <!-- END CALENDER -->
  412.  
  413. <!-- BEGIN Notities -->
  414. <div class="contain" class="col-md-4" style="padding-left: 4%;">
  415. <h5 style="color: #99E1D9;">Notities</h5>
  416. <p><em></em></p>
  417. <form name="toDoList">
  418. <input type="text" name="ListItem"/>
  419. </form>
  420. <div style="background-color: #705D56;" id="button1">voeg toe</div>
  421. <br/>
  422. <div style="height: 70px; width: 77%; overflow: auto; border: solid 1px #99E1D9;" >
  423. <ol></ol>
  424. </div>
  425. </div>
  426. <!-- END Notities -->
  427.  
  428. </div>
  429. </div>
  430.  
  431. <!-- script references -->
  432. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
  433. <script src="js/bootstrap.min.js"></script>
  434.  
  435. <!-- Notities -->
  436. <script type="text/javascript">
  437.  
  438. $(document).ready(
  439. function(){
  440. $('#button1').click(
  441. function(){
  442. var toAdd = $('input[name=ListItem]').val();
  443. $('ol').append('<li style="list-style-type:square">' + toAdd + '</li>');
  444. });
  445.  
  446. $("input[name=ListItem]").keyup(function(event){
  447. if(event.keyCode == 13){
  448. $("#button1").click();
  449. }
  450. });
  451.  
  452. $(document).on('dblclick','li', function(){
  453. $(this).toggleClass('strike').fadeOut('slow');
  454. });
  455.  
  456. $('input').focus(function() {
  457. $(this).val('');
  458. });
  459.  
  460. $('ol').sortable();
  461.  
  462. }
  463. );
  464. </script>
  465. <script src="js/scripts.js"></script>
  466. <script src="js/jquery.js"></script>
  467. <script src="js/bootstrap.min.js"></script>
  468. <script src="js/responsive-calendar.js"></script>
  469. <script type="text/javascript">
  470. $(document).ready(function () {
  471. $(".responsive-calendar").responsiveCalendar({
  472. time: '2017-01',
  473. events: {
  474. "2017-01-11": {"number": 5, "url": "https://calendar.google.com/calendar/render?pli=1#main_7"},
  475. "2017-01-26": {"number": 1, "url": "https://calendar.google.com/calendar/render?pli=1#main_7"},
  476. "2017-02-03":{"number": 1},
  477. "2017-02-12": {}}
  478. });
  479. });
  480. </script>
  481. </body>
  482. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement