blob: 486afde048a6e3b41af4f324185a43fc677c8ff9 [file] [log] [blame]
avm99963658fae52017-10-08 23:09:16 +02001<?php
2require_once("config.php");
3
4session_start();
5
6if (!isset($_POST["password"])) {
7 header("Location: login.php");
8 exit();
9}
10
avm99963ce735762018-09-26 16:29:29 +020011if ($_POST["password"] != $conf["password"]) {
avm99963658fae52017-10-08 23:09:16 +020012 header("Location: login.php?msg=wrong");
13 exit();
14}
15?>
avm99963f0d15212017-10-08 17:03:22 +020016<!DOCTYPE html>
17<html>
18 <head>
19 <meta charset="utf-8">
20 <title>Graf alternatiu FME</title>
21
22 <meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
23 <link rel="manifest" href="manifest.json">
24
Huguet572c909b32018-07-23 18:38:19 +020025 <link rel="stylesheet" href="css/dialog.css">
26 <link rel="stylesheet" href="css/styles.css">
Huguet57f2c26902018-07-23 01:15:26 +020027
28 <!-- Seach Bar CSS files -->
29 <link rel="stylesheet" href="./css/modal.css"></link>
30 <link rel="stylesheet" href="./css/autocomplete.css"></link>
31
avm99963f0d15212017-10-08 17:03:22 +020032 <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
33 <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.blue_grey-blue.min.css" />
34
35 <!-- Apple web app -->
36 <link rel="apple-touch-icon" href="img/graf.png">
37 <meta name="apple-mobile-web-app-title" content="Graf FME">
38 <meta name="apple-mobile-web-app-capable" content="yes">
39 <meta name="apple-mobile-web-app-status-bar-style" content="black">
40 </head>
41 <body>
Huguet57e9f47652018-07-23 03:28:12 +020042 <button id="searchButton"class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">search</i></button>
43 <button id="zoomin" class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">zoom_in</i></button>
avm99963f0d15212017-10-08 17:03:22 +020044 <button id="zoomout" class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">zoom_out</i></button>
Huguet57e9f47652018-07-23 03:28:12 +020045
avm99963f0d15212017-10-08 17:03:22 +020046 <div id="backdrop-container" style="display: none;">
47 <div id="backdrop"></div>
48 </div>
49 <div id="dialog" class="mdl-shadow--2dp" style="display: none;">
50 <button id="quit-dialog" class="mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect"><i class="material-icons">close</i></button>
51 <button id="min-dialog" class="mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect"><i class="material-icons">remove</i></button>
52 <div id="dialog-vertex">
53 <h2 data-fill="name"></h2>
54 <ul>
55 <li><b>Any:</b> <span data-fill="year"></span></li>
56 <li><b>Sexe:</b> <span data-fill="sex"></span></li>
Huguet572c909b32018-07-23 18:38:19 +020057 <li><b>ID:</b> <span data-fill="id" id="node-id"></span></li>
avm99963f0d15212017-10-08 17:03:22 +020058 </ul>
Huguet572c909b32018-07-23 18:38:19 +020059 <div id="addedge-box">
60 <div id="addedge-button" class="addegde-button"><h2>Afegir una nova aresta +</h2></div>
61 <div id="addedge-msg" class="addegde-msg"><h2>Aresta afegida!</h2></div>
62 <input id="addedge-input" type="text" style="display:none;">
63 </div>
64 <div id="edge-list">
65 <h3>Arestes (<span data-fill="n-edges"></span>):</h3>
66 <ul data-fill="edges">
67 </ul>
68 </div>
avm99963f0d15212017-10-08 17:03:22 +020069 </div>
70 <div id="dialog-edge" style="display: none;">
71 </div>
72 </div>
73 <div id="summary-dialog" class="mdl-shadow--2dp" style="display: none;">
74 <button id="quit2-dialog" class="mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect"><i class="material-icons">close</i></button>
75 <button id="max-dialog" class="mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect"><i class="material-icons">add</i></button>
76 <div id="summary-vertex">
77 <h2 data-fill="name"></h2>
78 <p><span data-fill="year"></span>, <span data-fill="sex"></span>, <span data-fill="id"></span></p>
79 </div>
80 </div>
Huguet57f2c26902018-07-23 01:15:26 +020081 <!-- Search Box -->
82 <div id="searchBox" class="modal">
83 <!-- Search Box Content -->
84 <div class="modal-content">
85 <span class="closeBox">&times;</span>
avm99963f0d15212017-10-08 17:03:22 +020086
Huguet57f2c26902018-07-23 01:15:26 +020087 <div class="in-box-content">
88 <center>
89 <form autocomplete="off">
90 <div class="autocomplete">
91 <input id="searchInput" type="text" placeholder="Busca una persona al graf">
92 </div>
93 </form>
94 </center>
95 </div>
96 </div>
97 </div>
98
avm99963f0d15212017-10-08 17:03:22 +020099 <div id="graf"></div>
Huguet57f2c26902018-07-23 01:15:26 +0200100
avm99963f0d15212017-10-08 17:03:22 +0200101 <script src="https://cdnjs.cloudflare.com/ajax/libs/sigma.js/1.2.0/sigma.min.js"></script>
Huguet57e9f47652018-07-23 03:28:12 +0200102 <script>
103 // Initialize the graph and the sigma
104 var s, graf;
105 </script>
106
Huguet57f2c26902018-07-23 01:15:26 +0200107 <!-- Search Bar JS files -->
108 <script src="./js/modal.js"></script>
109 <script src="./js/autocomplete.js" ></script>
Huguet57e9f47652018-07-23 03:28:12 +0200110
111 <script src="js/script.js"></script>
112
avm99963f0d15212017-10-08 17:03:22 +0200113 <script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
114 <!--<script src="js/service-worker.js"></script>-->
115 </body>
116</html>