Added register, login, logout pages

Added roles file
This commit is contained in:
Furentes
2019-05-09 13:59:54 +02:00
parent 36826f48a8
commit 135b0bb9c2
8 changed files with 186 additions and 5 deletions

36
lib/Bloggr/roles.php Normal file
View File

@ -0,0 +1,36 @@
<?php
namespace Bloggr;
class Roles
{
const ADMIN = 1;
const AUTHOR = 2;
const COLLABORATOR = 4;
const CONSULTANT = 8;
const CONSUMER = 16;
const CONTRIBUTOR = 32;
const COORDINATOR = 64;
const CREATOR = 128;
const DEVELOPER = 256;
const DIRECTOR = 512;
const EDITOR = 1024;
const EMPLOYEE = 2048;
const MAINTAINER = 4096;
const MANAGER = 8192;
const MODERATOR = 16384;
const PUBLISHER = 32768;
const REVIEWER = 65536;
const SUBSCRIBER = 131072;
const SUPER_ADMIN = 262144;
const SUPER_EDITOR = 524288;
const SUPER_MODERATOR = 1048576;
const TRANSLATOR = 2097152;
// const XYZ = 4194304;
// const XYZ = 8388608;
// const XYZ = 16777216;
// const XYZ = 33554432;
// const XYZ = 67108864;
// const XYZ = 134217728;
// const XYZ = 268435456;
// const XYZ = 536870912;
}
?>

View File

@ -23,3 +23,7 @@ if(!($request_uri == "/setup")) {
$pdo = new \PDO('mysql:dbname='.DB_NAME.';host='.DB_HOST.';charset=utf8mb4', DB_USER, DB_PASS);
$auth = new \Bloggr\Auth($pdo);
}
echo '<pre>';
print_r($_SESSION);
echo '</pre>';

View File

@ -1,10 +1,10 @@
<?php
define('SITE_TITLE', 'aaaaaaaaaaaa');
define('SITE_TITLE', 'A Bloggr Site');
define('DB_HOST', 'localhost');
define('DB_NAME', 'bloggr');
define('DB_USER', 'root');
define('DB_PASS', '');
define('ADMIN_USER', 'kein');
define('ADMIN_EMAIL', 'adsasd@hsadashd.com');
define('ADMIN_USER', 'admin');
define('ADMIN_EMAIL', 'test@test.com');