session_start(); require $_SERVER['DOCUMENT_ROOT']."/backend/helper/GenToken.php"; if($_SESSION['auth'] == null) { echo ''; } else{ try{ $de = DecryptToken($_SESSION['auth']); $mydata = DecodeJwt($de); $date = time(); }catch(Exception $e){ $ID = $_SESSION['me']; $query = "select * from Account where ID = $ID"; $row = mysqli_fetch_assoc($account); $User = array($row['DisplayName'],$row['Email'],$row['DataJson'],$row['Atype']); $jwtToken = GenerateToken($User); $myToken = EncryptToken($jwtToken); $_SESSION['auth'] = $myToken; try{ $account = mysqli_query($con,$query); }catch(Exception $e){ echo ''; } } } ?>