WIP: bring participo back - consistent use of bootstrap - formatting -
phpstan level 0 error free - fixes for kyu subpage - move mams into participo framework - remove legacy `lib/db.php` usage - add attributer admin function - add newsposter - fixing apiKey creation
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
<?php
|
||||
require_once 'config/participo.php';
|
||||
require_once "config/participo.php";
|
||||
|
||||
require_once './local/cwsvJudo.php';
|
||||
require_once "./local/cwsvJudo.php";
|
||||
|
||||
require_once 'participoLib/participo.php';
|
||||
require_once 'participoLib/apiKey.php';
|
||||
require_once "participoLib/participo.php";
|
||||
require_once "participoLib/apiKey.php";
|
||||
|
||||
require_once 'spyc/Spyc.php';
|
||||
require_once "spyc/Spyc.php";
|
||||
|
||||
dbConnector::setOptions([
|
||||
"dbCharset" => $cwsvJudoConfig["dbCharset"] ?? "UTF-8",
|
||||
"outCharset" => $cwsvJudoConfig["outCharset"] ?? "UTF-8",
|
||||
]);
|
||||
dbConnector::connect(
|
||||
$cwsvJudoConfig['db']['host'],
|
||||
$cwsvJudoConfig['db']['name'],
|
||||
$cwsvJudoConfig['db']['user'],
|
||||
$cwsvJudoConfig['db']['password']
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"],
|
||||
);
|
||||
|
||||
$userId = 1;
|
||||
$apiKey = ApiKey::create();
|
||||
// $rightString = 'event:' . PHP_EOL . ' id: 1';
|
||||
// $rightArray = Spyc::YAMLLoadString($rightString);
|
||||
$right = 'login';
|
||||
$right = "login";
|
||||
$date = new DateTime();
|
||||
$newKey = new ApiKey(null, $userId, $apiKey, $right, $date->format('Y-m-d'));
|
||||
$newKey = new ApiKey(null, $userId, $apiKey, $right, $date->format("Y-m-d"));
|
||||
$newKey->addToDb();
|
||||
$loadedKey = ApiKey::loadFromDb($apiKey);
|
||||
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
@@ -33,4 +36,4 @@ $loadedKey = ApiKey::loadFromDb($apiKey);
|
||||
<li>rightsRoundabout: <?echo( $loadedKey->isValidFor($right) ? 'TRUE' : 'FALSE' );?></li>
|
||||
</ul>
|
||||
</body>
|
||||
<html>
|
||||
<html>
|
||||
|
||||
Reference in New Issue
Block a user