started work on pmelo
This commit is contained in:
@@ -27,7 +27,6 @@ function get()
|
||||
return $wkSqlResponse;
|
||||
}
|
||||
|
||||
|
||||
authorize();
|
||||
$wkSqlResponse = get();
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
// What to do when the document is loaded.
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// init materialize elements
|
||||
initModals();
|
||||
initSidenav();
|
||||
});
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded'
|
||||
, function () {
|
||||
// init materialize elements
|
||||
initModals();
|
||||
initSidenav();
|
||||
initSelects();
|
||||
}
|
||||
);
|
||||
|
||||
function initSidenav() {
|
||||
var sidenavElements = document.querySelectorAll('.sidenav');
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
require_once 'index.inc.php';
|
||||
?>
|
||||
<?php require_once 'index.inc.php'; ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@@ -325,4 +325,27 @@ SQL;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
16
homepage/participo/pmelo.inc.php
Normal file
16
homepage/participo/pmelo.inc.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . './lib/');
|
||||
|
||||
// Configs
|
||||
require_once 'config/participo.php';
|
||||
require_once $config['basePath'] . '/config/cwsvJudo.config.php';
|
||||
|
||||
// Libs
|
||||
require_once 'participoLib/user.php';
|
||||
|
||||
participo::init($cwsvJudoConfig);
|
||||
|
||||
$trainees = User::loadFromDbByAttribute(4);
|
||||
|
||||
?>
|
||||
57
homepage/participo/pmelo.php
Normal file
57
homepage/participo/pmelo.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php require_once("pmelo.inc.php");?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- shared imports (common css, MaterializeCss) -->
|
||||
<?php readfile('shared/imports.php'); ?>
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<script src="index.js"></script>
|
||||
|
||||
<title>participo</title>
|
||||
<meta name="description" content="pmelo">
|
||||
|
||||
<link rel="icon" href="<?echo($config['ressourceUrl']);?>/graphiken/icons/cwsv.ico" />
|
||||
<link rel="apple-touch-icon" href="<?echo($config['baseUrl']);?>/apple-touch-icon.png">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav class="indigo darken-4">
|
||||
<h1 style="display:inline;">cwsvJudo Apps</h1>
|
||||
<a class="right top-nav sidenav-trigger waves-effect waves-light hide-on-large-only" href="#" data-target="nav-mobile">
|
||||
<i class="material-icons">menu</i>
|
||||
</a>
|
||||
</nav>
|
||||
<ul class="sidenav sidenav-fixed sidenav-close" id="nav-mobile">
|
||||
<li class="logo">
|
||||
<a style="height:auto;" class="brand-logo" id="logo-container" href="/participo/">
|
||||
<img alt="cwsvJudoApps" style="max-width:100%;height:12vh;" class="responsive-img" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png" />
|
||||
</a>
|
||||
</li>
|
||||
<?php require_once 'sidenav/loginStatus.php'; ?><!-- brings its own li -->
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<h2>pmElo</h2>
|
||||
<?php var_dump($_POST);?>
|
||||
<form id="form" action="pmelo.php" method="post">
|
||||
<div class="input-field col s12">
|
||||
<select name ="selectedOptions[]" id="form-select-2" multiple>
|
||||
<option value="" disabled selected>Choose your option</option>
|
||||
<option value="1">Option 1</option>
|
||||
<option value="2">Option 2</option>
|
||||
<option value="3">Option 3</option>
|
||||
</select>
|
||||
<label for="form-select-2">Materialize Multiple Select</label>
|
||||
<input type="submit" value="submit">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user