started work on pmelo
This commit is contained in:
@@ -27,7 +27,6 @@ function get()
|
|||||||
return $wkSqlResponse;
|
return $wkSqlResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
authorize();
|
authorize();
|
||||||
$wkSqlResponse = get();
|
$wkSqlResponse = get();
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
// What to do when the document is loaded.
|
// What to do when the document is loaded.
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener(
|
||||||
// init materialize elements
|
'DOMContentLoaded'
|
||||||
initModals();
|
, function () {
|
||||||
initSidenav();
|
// init materialize elements
|
||||||
});
|
initModals();
|
||||||
|
initSidenav();
|
||||||
|
initSelects();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
function initSidenav() {
|
function initSidenav() {
|
||||||
var sidenavElements = document.querySelectorAll('.sidenav');
|
var sidenavElements = document.querySelectorAll('.sidenav');
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php require_once 'index.inc.php'; ?>
|
||||||
require_once 'index.inc.php';
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -325,4 +325,27 @@ SQL;
|
|||||||
}
|
}
|
||||||
return User::fromDbArray($response[0]);
|
return User::fromDbArray($response[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function loadFromDbByAttribute(int $attributeId){
|
||||||
|
$query =
|
||||||
|
"SELECT DISTINCT" .
|
||||||
|
" `wkParticipo_Users`.* " .
|
||||||
|
" FROM `wkParticipo_Users`" .
|
||||||
|
" JOIN `wkParticipo_user<=>userAttributes`" .
|
||||||
|
" ON `wkParticipo_user<=>userAttributes`.`userId` = `wkParticipo_Users`.`id`" .
|
||||||
|
" WHERE `wkParticipo_user<=>userAttributes`.`attributeId` = 4".
|
||||||
|
" ORDER BY `wkParticipo_Users`.`id` ASC;";
|
||||||
|
|
||||||
|
$response = dbConnector::query($query);
|
||||||
|
|
||||||
|
// Postprocessing
|
||||||
|
// - convert the comma separated list into an array
|
||||||
|
foreach ($response as &$user) {
|
||||||
|
$user["eMail"] = explode(",", $user["eMail"]);
|
||||||
|
foreach ($user["eMail"] as &$email) {
|
||||||
|
$email = trim($email);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user