Update App.php

This commit is contained in:
AGSTR 2024-12-27 17:13:53 +07:00 committed by GitHub
parent 86407f731b
commit 51b68b648c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,4 +29,23 @@ class App{
}
}
}
public static function getVoucher(){
return md5(microtime());
}
public static function setVoucher($token, $value){
$_SESSION[$token] = $value;
}
public static function getVoucherValue($key){
if(empty($key)){
return "";
}
if(isset($_SESSION[$key])){
return $_SESSION[$key];
}else{
return "";
}
}
}