├── iot_cloud ├── UIDContainer.php ├── null.php ├── img │ ├── glyphicons-halflings.png │ └── glyphicons-halflings-white.png ├── insertDB.php ├── getUID.php ├── user data edit tb.php ├── database.php ├── sql.sql ├── excel.php ├── home.php ├── styles.css ├── user data delete page.php ├── user data.php ├── user data edit page.php ├── registration.php ├── prezenta.php ├── read tag user data.php ├── read tag.php ├── css │ ├── bootstrap-responsive.min.css │ └── bootstrap-responsive.css └── js │ ├── bootstrap.min.js │ └── bootstrap.js ├── Preview ├── bloc.jpg ├── date.JPG ├── edit.JPG ├── excel.JPG ├── site.jpg ├── arduino.jpg ├── delete.JPG ├── nodemcu.jpg ├── prezenta.JPG ├── studenti.JPG ├── date cartela.JPG ├── device inside.jpg ├── inregistrare.JPG ├── device outside.jpg └── hardware flowchart.JPG ├── LICENSE ├── Arduino └── Arduino.ino ├── README.md └── NodeMCU └── NodeMCU.ino /iot_cloud/UIDContainer.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preview/bloc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/bloc.jpg -------------------------------------------------------------------------------- /Preview/date.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/date.JPG -------------------------------------------------------------------------------- /Preview/edit.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/edit.JPG -------------------------------------------------------------------------------- /Preview/excel.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/excel.JPG -------------------------------------------------------------------------------- /Preview/site.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/site.jpg -------------------------------------------------------------------------------- /iot_cloud/null.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preview/arduino.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/arduino.jpg -------------------------------------------------------------------------------- /Preview/delete.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/delete.JPG -------------------------------------------------------------------------------- /Preview/nodemcu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/nodemcu.jpg -------------------------------------------------------------------------------- /Preview/prezenta.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/prezenta.JPG -------------------------------------------------------------------------------- /Preview/studenti.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/studenti.JPG -------------------------------------------------------------------------------- /Preview/date cartela.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/date cartela.JPG -------------------------------------------------------------------------------- /Preview/device inside.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/device inside.jpg -------------------------------------------------------------------------------- /Preview/inregistrare.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/inregistrare.JPG -------------------------------------------------------------------------------- /Preview/device outside.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/device outside.jpg -------------------------------------------------------------------------------- /Preview/hardware flowchart.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/Preview/hardware flowchart.JPG -------------------------------------------------------------------------------- /iot_cloud/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/iot_cloud/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /iot_cloud/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisssCurry/PHP-RFID-Attendance-logging-system/HEAD/iot_cloud/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /iot_cloud/insertDB.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 15 | $q->execute(array($nume,$id,$prenume,$specializare)); 16 | Database::disconnect(); 17 | header("Location: user data.php"); 18 | } 19 | ?> -------------------------------------------------------------------------------- /iot_cloud/getUID.php: -------------------------------------------------------------------------------- 1 | "; 7 | file_put_contents('UIDContainer.php',$Write); 8 | date_default_timezone_set('Europe/Bucharest'); 9 | 10 | 11 | $pdo = Database::connect(); 12 | if ($pdo) { 13 | echo "Connection success!

"; 14 | } 15 | $sql = "INSERT INTO logs (UIDresult) VALUES ('$UIDresult')"; 16 | $q = $pdo->prepare($sql); 17 | $q->execute(); 18 | if ($q) { 19 | echo "Insertion success!"; 20 | } 21 | Database::disconnect(); 22 | ?> 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /iot_cloud/user data edit tb.php: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 20 | $sql = "UPDATE users set nume = ?, specializare =?, prenume =? WHERE id = ?"; 21 | $q = $pdo->prepare($sql); 22 | $q->execute(array($name,$specializare,$email,$id)); 23 | Database::disconnect(); 24 | header("Location: user data.php"); 25 | } 26 | ?> 27 | -------------------------------------------------------------------------------- /iot_cloud/database.php: -------------------------------------------------------------------------------- 1 | getMessage()); 25 | } 26 | 27 | } 28 | return self::$cont; 29 | } 30 | 31 | public static function disconnect() 32 | { 33 | self::$cont = null; 34 | } 35 | } 36 | ?> -------------------------------------------------------------------------------- /iot_cloud/sql.sql: -------------------------------------------------------------------------------- 1 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -- nicio valoare nu va fi initializata cu 0 2 | SET AUTOCOMMIT = 0; 3 | START TRANSACTION; 4 | SET time_zone = "+03:00"; -- setarea fusului orar pentru Bucuresti,Romania 5 | 6 | CREATE TABLE `logs` ( 7 | `id` int(255) NOT NULL, 8 | `created_at` timestamp NOT NULL DEFAULT current_timestamp(), 9 | `UIDresult` varchar(255) NOT NULL 10 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 11 | 12 | CREATE TABLE `users` ( 13 | `id` varchar(255) NOT NULL, 14 | `nume` varchar(255) NOT NULL, 15 | `prenume` varchar(255) NOT NULL, 16 | `specializare` varchar(255) NOT NULL 17 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 18 | 19 | INSERT INTO `users` (`id`, `nume`, `prenume`, `specializare`) VALUES 20 | ('3933186123', 'ciobanu', 'cristian', 'ea'); 21 | 22 | ALTER TABLE `logs` 23 | ADD PRIMARY KEY (`id`), 24 | ADD KEY `UIDresult` (`UIDresult`); 25 | 26 | ALTER TABLE `users` 27 | ADD PRIMARY KEY (`id`); 28 | 29 | ALTER TABLE `logs` 30 | MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 chrisssCurry 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /iot_cloud/excel.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | Nr.crt 15 | Nume 16 | Prenume 17 | ID 18 | Specializare 19 | Data 20 | 21 | 22 | '; 23 | foreach ($pdo->query($sql) as $row) { 24 | 25 | $output .= ' 26 | 27 | '.$id.' 28 | '.$row["nume"].' 29 | '.$row["prenume"].' 30 | '.$row["UIDresult"].' 31 | '.$row["specializare"].' 32 | '.$row["created_at"].' 33 | 34 | '; 35 | $id++; //incrementare contor Nr. crt dupa fiecare record afisat 36 | } 37 | $output .=''; 38 | header("Content-Type: application/xls"); 39 | header("Content-Disposition: attachment; filename=Prezenta.xls"); 40 | echo $output; 41 | } 42 | } 43 | Database::disconnect(); 44 | ?> -------------------------------------------------------------------------------- /iot_cloud/home.php: -------------------------------------------------------------------------------- 1 | "; 3 | file_put_contents('UIDContainer.php',$Write); 4 | ?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Acasa 18 | 19 | 27 | 28 | 29 |

Sistem inteligent pentru tinerea in evidenta a prezentei

30 | 37 |
38 | img 39 | 40 | -------------------------------------------------------------------------------- /Arduino/Arduino.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | LiquidCrystal_I2C lcd(0x27, 16, 2); 6 | 7 | const int chipSelect = 4; 8 | 9 | String data; 10 | 11 | void setup() { 12 | 13 | 14 | lcd.begin(); 15 | lcd.backlight(); 16 | lcd.home(); 17 | lcd.clear(); 18 | lcd.print("Scanati cartela!"); 19 | 20 | 21 | Serial.begin(115200); 22 | while (!Serial) { 23 | ; // wait for serial port to connect. Needed for native USB port only 24 | } 25 | Serial.print("Initializing SD card..."); 26 | if (!SD.begin(chipSelect)) { 27 | Serial.println("Card failed, or not present"); 28 | while (1); 29 | } 30 | Serial.println("card initialized."); 31 | } 32 | 33 | void loop() { // run over and over 34 | if (Serial.available()) { 35 | data = " "; 36 | data = Serial.readString(); 37 | 38 | Serial.print(data); 39 | lcd.clear(); 40 | lcd.print("Cartela scanata:"); 41 | lcd.setCursor(0,1); 42 | lcd.print(data); 43 | delay(2000); 44 | lcd.clear(); 45 | lcd.setCursor(0,0); 46 | lcd.print("Scanati cartela"); 47 | 48 | 49 | File dataFile = SD.open("test.txt", FILE_WRITE); 50 | 51 | // if the file is available, write to it: 52 | if (dataFile) { 53 | // Serial.println("File opened ok"); 54 | dataFile.print(data); 55 | //dataFile.print(", "); 56 | dataFile.close(); 57 | // print to the serial port too: 58 | 59 | } 60 | // if the file isn't open, pop up an error: 61 | else { 62 | Serial.println("error opening datalog.txt"); 63 | } 64 | } 65 | else { 66 | return; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PHP-NodeMCU-RFID-Attendance-logging-system 2 | -The system is based on a website created with PHP,HTML,CSS, Bootstrap, Javascript, jQuery, a NodeMCU and an Arduino UNO board (for the hardware device), and a MySQL database. 3 | 4 | -The hardware device will read RFID cards, store their information, and send it to the website which will process the data and then modify it/store it in the SQL database, then send a response to the device so it can print a message on an LCD screen and also write the result on a micro SD card. 5 | 6 | -The website allows the administrator to register, delete and even edit users and their registered RFID cards. The system displays the current registered attendance, logged on the final page in a table obtained by inner joining the 'users' and the 'logs' table, using MySQL queries. This final table can also be exported as an Excel file. 7 | 8 |

Project diagram

9 | 10 |

Website diagram

11 | 12 |

User data

13 | 14 |

User data edit page

15 | 16 |

User data delete page

17 | 18 |

Registration

19 | 20 |

Read tag

21 | 22 | 23 |

Attendance logs

24 | 25 |

Attendance logs exported as an Excel file

26 | 27 |

The logic behind the hardware device

28 | 29 |

The hardware device

30 | 31 | 32 | -------------------------------------------------------------------------------- /iot_cloud/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: Arial; 3 | display: inline-block; 4 | margin: 0px auto; 5 | text-align: center; 6 | } 7 | 8 | ul.topnav { 9 | list-style-type: none; 10 | margin: auto; 11 | padding: 0; 12 | overflow: hidden; 13 | background-color: #DF1212; 14 | width: 70%; 15 | border-radius: 25px 25px 25px 25px; 16 | } 17 | 18 | ul.topnav li { 19 | float: center; 20 | } 21 | 22 | ul.topnav li a { 23 | display: block; 24 | color: white; 25 | text-align: center; 26 | padding: 14px 16px; 27 | text-decoration: none; 28 | } 29 | 30 | ul.topnav li a:hover:not(.active) {background-color: #9C0C0C;} 31 | 32 | ul.topnav li a.active {background-color: #333;} 33 | 34 | ul.topnav li.right {float: right;} 35 | 36 | .table { 37 | margin: auto; 38 | width: 90%; 39 | } 40 | 41 | thead { 42 | color: #FFFFFF; 43 | } 44 | 45 | .center { 46 | margin: 0 auto; 47 | width:495px; 48 | border-style: solid; 49 | border-color: #f2f2f2; 50 | } 51 | 52 | .alert { 53 | padding: 10% 10%; 54 | text-align: center; 55 | font-size:150% ; 56 | } 57 | 58 | .null { 59 | color:red; 60 | font-size:150%; 61 | } 62 | 63 | a { 64 | text-decoration: none; 65 | color:inherit; 66 | } 67 | 68 | a:hover { 69 | text-decoration:underline; 70 | color:black; 71 | } 72 | 73 | @media screen and (max-width: 600px) { 74 | ul.topnav li.right {float: right;}, 75 | ul.topnav li {float: none;} 76 | } 77 | 78 | td.lf { 79 | padding-left: 15px; 80 | padding-top: 12px; 81 | padding-bottom: 12px; 82 | } 83 | 84 | .table { 85 | margin: auto; 86 | width: 90%; 87 | } 88 | 89 | thead { 90 | color: #FFFFFF; 91 | } -------------------------------------------------------------------------------- /iot_cloud/user data delete page.php: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 16 | // $sql = "DELETE FROM users WHERE id = ?"; 17 | // $q = $pdo->prepare($sql); 18 | // $q->execute(array($id)); 19 | // Database::disconnect(); 20 | // header("Location: user data.php"); 21 | 22 | $pdo = Database::connect(); 23 | $sql = "DELETE FROM users WHERE id = ?"; 24 | $q = $pdo->prepare($sql); 25 | $q->execute(array($id)); 26 | Database::disconnect(); 27 | header("Location: user data.php"); 28 | 29 | } 30 | ?> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Sterge utilizator 41 | 42 | 43 | 44 |

Sistem inteligent pentru tinerea in evidenta a prezentei

45 | 46 |
47 | 48 |
49 |
50 |

Stergere utilizator

51 |
52 | 53 |
54 | 55 |

Efectuati stergerea?

56 |
57 | 58 | Nu 59 |
60 |
61 |
62 | 63 |
64 | 65 | -------------------------------------------------------------------------------- /iot_cloud/user data.php: -------------------------------------------------------------------------------- 1 | "; 3 | file_put_contents('UIDContainer.php',$Write); 4 | ?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Studenti 16 | 17 | 18 | 19 |

Sistem inteligent pentru tinerea in evidenta a prezentei

20 | 27 |
28 |
29 |
30 |

Tabel studenti

31 |
32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | query($sql) as $row) { 49 | echo ''; 50 | echo ''; 51 | echo ''; 52 | echo ''; 53 | echo ''; 54 | echo ''; 58 | echo ''; 59 | } 60 | Database::disconnect(); 61 | ?> 62 | 63 |
NumePrenumeIDSpecializareOptiuni
'. $row['nume'] . ''. $row['prenume'] . ''. $row['id'] . ''. $row['specializare'] . 'Editeaza'; 55 | echo ' '; 56 | echo 'Sterge'; 57 | echo '
64 |
65 |
66 | 67 | -------------------------------------------------------------------------------- /iot_cloud/user data edit page.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 11 | $q->execute(array($id)); 12 | $data = $q->fetch(PDO::FETCH_ASSOC); 13 | Database::disconnect(); 14 | ?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 33 | 34 | Edit 35 | 36 | 37 | 38 | 39 | 40 |

Sistem inteligent pentru tinerea in evidenta a prezentei

41 | 42 |
43 | 44 |
45 |
46 |

Editeaza date

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 | 83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 |
91 | 92 | Inapoi 93 |
94 |
95 |
96 |
97 | 98 | -------------------------------------------------------------------------------- /iot_cloud/registration.php: -------------------------------------------------------------------------------- 1 | "; 3 | file_put_contents('UIDContainer.php',$Write); 4 | ?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 25 | 26 | Inregistrare 27 | 28 | 29 | 30 | 31 |

Sistem inteligent pentru tinerea in evidenta a prezentei

32 | 39 | 40 |
41 |
42 |
43 |
44 |

Inregistrare cartela

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 | 78 |
79 |
80 | 81 | 82 | 83 | 84 | 85 |
86 | 87 |
88 |
89 | 90 |
91 |
92 | 93 | -------------------------------------------------------------------------------- /iot_cloud/prezenta.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Prezenta 12 | 13 | 14 | 15 |

Sistem inteligent pentru tinerea in evidenta a prezentei

16 | 23 |
24 |
25 |
26 |

Tabel prezenta

27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | query($sql) as $row) { 53 | echo ''; 54 | echo ''; 55 | echo ''; 56 | echo ''; 57 | echo ''; 58 | echo ''; 59 | echo ''; 60 | echo ''; 61 | echo ''; 62 | $id++; //incrementare contor Nr. crt dupa fiecare record afisat 63 | } 64 | Database::disconnect(); 65 | ?> 66 | 67 |
Nr.crtNumePrenumeIDSpecializareData
'. $id . ''. $row['nume'] . ''. $row['prenume'] . ''. $row['UIDresult'] . ''. $row['specializare'] . ''. $row['created_at'] . '
68 |
69 |
70 | 71 | -------------------------------------------------------------------------------- /iot_cloud/read tag user data.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 12 | $q->execute(array($id)); 13 | $data = $q->fetch(PDO::FETCH_ASSOC); 14 | Database::disconnect(); 15 | 16 | $msg = null; 17 | if (null==$data['nume']) { 18 | 19 | $data['id']=$id; 20 | $msg = "Cartela invalida. Doriti sa inregistrati utilizatorul?"; 21 | $data['nume']="--------"; 22 | $data['prenume']="--------"; 23 | $data['specializare']="--------"; 24 | $Write=""; //"; 31 | file_put_contents('null.php',$Write); 32 | } 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | 48 | 49 | 51 | 52 | 53 | 79 | 80 |
50 | Date cartela
54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
ID:
Nume:
Prenume:
Specializare:
78 |
81 |
82 |
83 |

84 | 85 | 102 | 103 | -------------------------------------------------------------------------------- /iot_cloud/read tag.php: -------------------------------------------------------------------------------- 1 | "; 3 | file_put_contents('UIDContainer.php',$Write); 4 | ?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 | Date cartela 25 | 26 | 27 | 28 |

Sistem inteligent pentru tinerea in evidenta a prezentei

29 | 36 | 37 |
38 | 39 | 40 |
41 | 42 |
43 |
44 | 45 | 46 | 50 | 51 | 52 | 77 | 78 |
47 | Date cartela 48 | 49 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |
ID:
Nume:
Prenume:
Specializare:
76 |
79 |
80 |
81 | 82 | 118 | 119 | -------------------------------------------------------------------------------- /NodeMCU/NodeMCU.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | 15 | #define SS_PIN D4 16 | #define RST_PIN D2 17 | #define LED 2 18 | #define buzzer D8 19 | 20 | 21 | MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance. 22 | 23 | /* Set these to your desired credentials. */ 24 | const char *ssid = "DIGI-01067235"; //ENTER YOUR WIFI SETTINGS 25 | const char *parola = "yaBd99tA"; 26 | 27 | 28 | 29 | //int httpCode; 30 | String postData; 31 | String UIDresult; 32 | 33 | 34 | WiFiUDP ntpUDP; 35 | NTPClient timeClient(ntpUDP, "pool.ntp.org"); 36 | //Week Days 37 | String weekDays[7]={"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; 38 | 39 | //Month names 40 | String months[12]={"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; 41 | 42 | void setup() { 43 | pinMode(buzzer,OUTPUT); 44 | Wire.begin(2,0); 45 | 46 | 47 | delay(1000); 48 | Serial.begin(115200); 49 | Serial1.begin(115200); 50 | SPI.begin(); //--> Init SPI bus 51 | mfrc522.PCD_Init(); //--> Init MFRC522 card 52 | 53 | delay(500); 54 | 55 | WiFi.begin(ssid, parola); //--> Connect to your WiFi router 56 | Serial.println(""); 57 | 58 | pinMode(LED,OUTPUT); 59 | digitalWrite(LED, HIGH); //--> Turn off Led On Board 60 | 61 | //----------------------------------------Wait for connection 62 | 63 | // Serial.print("Conectare la reteaua WiFi"); 64 | while (WiFi.status() != WL_CONNECTED) { 65 | // Serial.print("."); 66 | //----------------------------------------Make the On Board Flashing LED on the process of connecting to the wifi router. 67 | digitalWrite(LED, LOW); 68 | delay(250); 69 | digitalWrite(LED, HIGH); 70 | delay(250); 71 | } 72 | 73 | digitalWrite(LED, HIGH);//--> Turn off the On Board LED when it is connected to the wifi router. 74 | //----------------------------------------If successfully connected to the wifi router, the IP Address that will be visited is displayed in the serial monitor 75 | tone(buzzer, 4000, 100); 76 | 77 | 78 | 79 | // Serial.println(""); 80 | // Serial.print("Conectat la reteaua WiFi : "); 81 | // Serial.println(ssid); 82 | // Serial.print("Adresa IP : "); 83 | // Serial.println(WiFi.localIP()); 84 | // Serial.println("Apropiati cartela pentru citire "); 85 | // Serial.println(""); 86 | 87 | timeClient.begin(); 88 | // Set offset time in seconds to adjust for your timezone, for example: 89 | // GMT +1 = 3600 90 | // GMT +8 = 28800 91 | // GMT -1 = -3600 92 | // GMT 0 = 0 93 | timeClient.setTimeOffset(10800); 94 | } 95 | 96 | void loop() { 97 | if (POST_GET()) { 98 | timp(); 99 | } 100 | return; 101 | } 102 | 103 | 104 | int getid(){ 105 | //look for new card 106 | if ( ! mfrc522.PICC_IsNewCardPresent()) { 107 | return 0; // daca nu a fost gasita nicio cartela, sari la inceputul buclei 108 | } 109 | 110 | if ( ! mfrc522.PICC_ReadCardSerial()) { 111 | return 0; //daca read card serial(0) returneaza 1, atunci s-a gasit UID-ul 112 | } 113 | 114 | // Serial.print("ID-ul cartelei scanate este : "); 115 | 116 | for (byte i = 0; i < mfrc522.uid.size; i++) { 117 | UIDresult += mfrc522.uid.uidByte[i]; //stocarea UID-ului in string 118 | } 119 | mfrc522.PICC_HaltA(); //oprirea citirii 120 | return 1; 121 | } 122 | 123 | int POST_GET() { 124 | if(getid()) { 125 | digitalWrite(LED, LOW); 126 | HTTPClient http; //Declare object of class HTTPClient 127 | 128 | //POST Data 129 | postData = "UIDresult=" + UIDresult; 130 | 131 | 132 | http.begin("http://192.168.1.4/iot_cloud/getUID.php"); //Specify request destination 133 | http.addHeader("Content-Type", "application/x-www-form-urlencoded"); //Specify content-type header 134 | 135 | int httpCode = http.POST(postData); //Send the request 136 | String payload = http.getString(); //Get the response payload 137 | 138 | // Serial.println(UIDresult); 139 | // Serial.println(httpCode); //Print HTTP return code 140 | // Serial.println(payload); //Print request response payload 141 | if(httpCode == 200){ 142 | tone(buzzer, 4000, 250); 143 | 144 | 145 | UIDresult = ""; 146 | postData = ""; 147 | 148 | http.end(); //Close connection 149 | delay(1000); 150 | digitalWrite(LED, HIGH); 151 | 152 | 153 | delay(2000); //Delay delimitare requesturi 154 | 155 | HTTPClient http; //Declare object of class HTTPClient 156 | http.begin("http://192.168.1.4/iot_cloud/null.php"); //Specify request destination 157 | int httpCode = http.GET(); 158 | String payload = http.getString(); //Get the request response payload 159 | 160 | Serial.print(payload); 161 | Serial1.print(payload); 162 | http.end(); //Close connection 163 | delay(1000); 164 | digitalWrite(LED, HIGH); 165 | Serial.print(" "); 166 | Serial1.print(" "); 167 | timp(); 168 | if (payload == "Cartela invalida") { 169 | 170 | tone(buzzer, 4000); 171 | delay(1500); 172 | noTone(buzzer); 173 | 174 | } 175 | else { 176 | tone(buzzer, 4000); 177 | delay(100); 178 | noTone(buzzer); 179 | delay(100); 180 | tone(buzzer, 4000); 181 | delay(100); 182 | noTone(buzzer); 183 | 184 | } 185 | 186 | } 187 | 188 | } 189 | } 190 | 191 | 192 | int timp () { 193 | timeClient.update(); 194 | 195 | unsigned long epochTime = timeClient.getEpochTime(); 196 | String formattedTime = timeClient.getFormattedTime(); 197 | 198 | Serial.print(formattedTime); 199 | Serial1.println(formattedTime); 200 | Serial.print(" "); 201 | Serial1.print(" "); 202 | 203 | //Crearea unei structuri de timp 204 | struct tm *ptm = gmtime ((time_t *)&epochTime); 205 | 206 | int monthDay = ptm->tm_mday; 207 | int currentMonth = ptm->tm_mon+1; 208 | 209 | String currentMonthName = months[currentMonth-1]; 210 | 211 | int currentYear = ptm->tm_year+1900; 212 | 213 | //Afisarea datei complete 214 | String currentDate = String(monthDay) + "-" + String(currentMonth) + "-" + String(currentYear); 215 | 216 | Serial.println(currentDate); 217 | Serial1.println(currentDate); 218 | 219 | } 220 | -------------------------------------------------------------------------------- /iot_cloud/css/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.3.2 3 | * 4 | * Copyright 2013 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world by @mdo and @fat. 9 | */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /iot_cloud/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap.js by @fat & @mdo 3 | * Copyright 2013 Twitter, Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | !function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('