

Nextrek
@ 593
Nextrek / Android / SmartCharging / endPoints / nightly / control_panel / index.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<?php require_once(dirname(__FILE__)."/../constants.php"); require_once(dirname(__FILE__)."/../repositories/UserRepository.php"); try { $conn = new PDO("mysql:host=".DB_SERVERNAME.";dbname=".DB_NAME, DB_USERNAME, DB_PASSWORD); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //var_dump($_COOKIE); if (!empty($_COOKIE["token"]) && UserRepository::checkToken($_COOKIE["token"], $conn)) { //echo "Token"; header("Location: main.php"); die(); } else { //echo "No Token"; header("Location: login.html"); die(); } } catch (PDOException $e) { echo $e->getMessage(); } ?> |
Commits for Nextrek/Android/SmartCharging/endPoints/nightly/control_panel/index.php
Revision | Author | Commited | Message |
---|---|---|---|
569 |
![]() |
Wed 26 Aug, 2015 10:04:06 +0000 | Inizio implementazione della control_panel |