You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
577 B

<?php
function printError($str) {
echo '<div class="alert alert-danger" role="alert">' . $str . '</div>';
}
function printSuccess($str) {
echo '<div class="alert alert-success" role="alert">' . $str . '</div>';
}
function isInstalled($bdd) {
$req = $bdd->prepare("SHOW TABLES LIKE 'admin'");
$req->execute();
if(!$req->fetch())
return false;
return true;
}
function hashPass($pass) {
return password_hash($pass, PASSWORD_DEFAULT);
}
function passEqual($pass, $hash) {
return password_verify($pass, $hash);
}
?>