Merge branch 'hendrik-testing' into 'master'
add name field check in settings See merge request !188
This commit was merged in pull request #192.
This commit is contained in:
@@ -18,7 +18,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
try {
|
try {
|
||||||
switch ($_POST["form"]) {
|
switch ($_POST["form"]) {
|
||||||
case "profile":
|
case "profile":
|
||||||
updateSettings();
|
checkUpdateSettings();
|
||||||
break;
|
break;
|
||||||
case "password":
|
case "password":
|
||||||
changePassword();
|
changePassword();
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
background-color: firebrick;
|
background-color: firebrick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alerttext {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.user-box {
|
.user-box {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,15 @@ function getPasswordHash() {
|
|||||||
return $stmt->fetch();
|
return $stmt->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkUpdateSettings() {
|
||||||
|
if (empty(test_input($_POST['fname'])) || empty(test_input($_POST['lname']))) {
|
||||||
|
throw new AngryAlert("Geen voornaam of achternaam.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateSettings();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the setting from post.
|
* Changes the setting from post.
|
||||||
* @throws HappyAlert
|
* @throws HappyAlert
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><input class="table-checkbox" type="checkbox" id="checkall" name="checkall" onchange="checkAll(this)"></th>
|
<th><input class="table-checkbox" type="checkbox" id="checkall" name="checkall" onchange="checkAll(this)"></th>
|
||||||
<th class="table-username">Gebruikersnaam</th>
|
<th class="table-username">Groepsnaam</th>
|
||||||
<th class="table-status">Status</th>
|
<th class="table-status">Status</th>
|
||||||
<th class="table-comment">Aantekening</th>
|
<th class="table-comment">Beschrijving</th>
|
||||||
<th class="table-action">Actie</th>
|
<th class="table-action">Actie</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -33,9 +33,9 @@ while ($group = $q->fetch(PDO::FETCH_ASSOC)) {
|
|||||||
<form class='admin-groupaction'
|
<form class='admin-groupaction'
|
||||||
onsubmit=\"adminUpdate(this); return false;\">
|
onsubmit=\"adminUpdate(this); return false;\">
|
||||||
<select class='action' name='actions'>
|
<select class='action' name='actions'>
|
||||||
<option value='hidden'>Hidden</option>
|
<option value='hidden'>Verborgen</option>
|
||||||
<option value='public'>Public</option>
|
<option value='public'>Publiek</option>
|
||||||
<option value='membersonly'>Members</option>
|
<option value='membersonly'>Alleen Leden</option>
|
||||||
</select>
|
</select>
|
||||||
<input type='hidden' name='groupID' value='$groupID'>
|
<input type='hidden' name='groupID' value='$groupID'>
|
||||||
<input type='submit' value='Confirm'>
|
<input type='submit' value='Confirm'>
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ while($user = $q->fetch(PDO::FETCH_ASSOC)) {
|
|||||||
OR $user['role'] == 'owner'))) {
|
OR $user['role'] == 'owner'))) {
|
||||||
echo "<option value='frozen'>Bevries</option>
|
echo "<option value='frozen'>Bevries</option>
|
||||||
<option value='banned'>Ban</option>
|
<option value='banned'>Ban</option>
|
||||||
<option value='user'>Activeer</option>";
|
<option value='user'>Activeer</option>
|
||||||
|
<option value='unconfirmed'>Ongevalideerd</option>";
|
||||||
|
|
||||||
if ($userinfo == 'owner') {
|
if ($userinfo == 'owner') {
|
||||||
echo "<option value='admin'>Admin</option>
|
echo "<option value='admin'>Admin</option>
|
||||||
|
|||||||
@@ -67,13 +67,13 @@ if (isset($_GET["groupstatus"])) {
|
|||||||
id="frozen"
|
id="frozen"
|
||||||
value="frozen"
|
value="frozen"
|
||||||
<?php if (in_array("frozen", $status)) echo "checked";?>>
|
<?php if (in_array("frozen", $status)) echo "checked";?>>
|
||||||
<label for="frozen">Gefrozen</label><br>
|
<label for="frozen">Bevroren</label><br>
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
name="status[]"
|
name="status[]"
|
||||||
id="banned"
|
id="banned"
|
||||||
value="banned"
|
value="banned"
|
||||||
<?php if (in_array("banned", $status)) echo "checked";?>>
|
<?php if (in_array("banned", $status)) echo "checked";?>>
|
||||||
<label for="banned">Gebant</label><br>
|
<label for="banned">Verbannen</label><br>
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
name="status[]"
|
name="status[]"
|
||||||
id="admin"
|
id="admin"
|
||||||
@@ -91,7 +91,7 @@ if (isset($_GET["groupstatus"])) {
|
|||||||
id="owner"
|
id="owner"
|
||||||
value="owner"
|
value="owner"
|
||||||
<?php if (in_array("owner", $status)) echo "checked";?>>
|
<?php if (in_array("owner", $status)) echo "checked";?>>
|
||||||
<label for="owner">Owner</label>
|
<label for="owner">Eigenaar</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="admin-groupfilter">
|
<div id="admin-groupfilter">
|
||||||
@@ -122,6 +122,7 @@ if (isset($_GET["groupstatus"])) {
|
|||||||
<button type="submit" name="batchactions" id="freeze" value="frozen">Bevries</button>
|
<button type="submit" name="batchactions" id="freeze" value="frozen">Bevries</button>
|
||||||
<button type="submit" name="batchactions" id="ban" value="banned">Ban</button>
|
<button type="submit" name="batchactions" id="ban" value="banned">Ban</button>
|
||||||
<button type="submit" name="batchactions" id="restore" value="user">Activeer</button>
|
<button type="submit" name="batchactions" id="restore" value="user">Activeer</button>
|
||||||
|
<button type="submit" name="batchactions" id="unconfirm" value="unconfirmed">Maak Ongevalideerd</button>
|
||||||
<?php
|
<?php
|
||||||
if ($userinfo == 'owner') {
|
if ($userinfo == 'owner') {
|
||||||
echo "<button type=\"submit\"
|
echo "<button type=\"submit\"
|
||||||
@@ -131,7 +132,7 @@ if (isset($_GET["groupstatus"])) {
|
|||||||
<button type=\"submit\"
|
<button type=\"submit\"
|
||||||
name=\"batchactions\"
|
name=\"batchactions\"
|
||||||
id=\"owner\"
|
id=\"owner\"
|
||||||
value=\"owner\">Maak Owner</button>";
|
value=\"owner\">Maak Eigenaar</button>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
@@ -139,9 +140,9 @@ if (isset($_GET["groupstatus"])) {
|
|||||||
onsubmit="adminUpdate(this); return false;">
|
onsubmit="adminUpdate(this); return false;">
|
||||||
|
|
||||||
<input type="hidden" name="groupbatchactions" id="groupbatchinput">
|
<input type="hidden" name="groupbatchactions" id="groupbatchinput">
|
||||||
<button type="submit" name="batchactions" id="hide" value="hidden">Hide</button>
|
<button type="submit" name="batchactions" id="hide" value="hidden">Verborgen</button>
|
||||||
<button type="submit" name="batchactions" id="ban" value="public">Public</button>
|
<button type="submit" name="batchactions" id="ban" value="public">Publiek</button>
|
||||||
<button type="submit" name="batchactions" id="members" value="membersonly">Members</button>
|
<button type="submit" name="batchactions" id="members" value="membersonly">Alleen Leden</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class='platform alertbox' id="alertbox">
|
<div class='platform alertbox' id="alertbox">
|
||||||
<span id="alerttext"></span>
|
<span class="alerttext" id="alerttext"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="user-box">
|
<div class="user-box">
|
||||||
|
|||||||
Reference in New Issue
Block a user