Added comments to javascript code #215
@@ -126,11 +126,11 @@ if (isset($_GET["groupstatus"])) {
|
|||||||
if ($userinfo == 'owner') {
|
if ($userinfo == 'owner') {
|
||||||
echo "<button type=\"submit\"
|
echo "<button type=\"submit\"
|
||||||
name=\"batchactions\"
|
name=\"batchactions\"
|
||||||
id=\"admin\"
|
id=\"batch-admin\"
|
||||||
value=\"admin\">Maak Admin</button>
|
value=\"admin\">Maak Admin</button>
|
||||||
<button type=\"submit\"
|
<button type=\"submit\"
|
||||||
name=\"batchactions\"
|
name=\"batchactions\"
|
||||||
id=\"owner\"
|
id=\"batch-owner\"
|
||||||
value=\"owner\">Maak Eigenaar</button>";
|
value=\"owner\">Maak Eigenaar</button>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -139,9 +139,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">Verborgen</button>
|
<button type="submit" name="batchactions" id="batch-hide" value="hidden">Verborgen</button>
|
||||||
<button type="submit" name="batchactions" id="ban" value="public">Publiek</button>
|
<button type="submit" name="batchactions" id="batch-public" value="public">Publiek</button>
|
||||||
<button type="submit" name="batchactions" id="members" value="membersonly">Alleen Leden</button>
|
<button type="submit" name="batchactions" id="batch-members" value="membersonly">Alleen Leden</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -151,5 +151,3 @@ if (isset($_GET["groupstatus"])) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -55,10 +55,17 @@
|
|||||||
<h3>Vrienden</h3>
|
<h3>Vrienden</h3>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
while($friend = $profile_friends->fetch()) {
|
$friendcount = $profile_friends->rowCount();
|
||||||
|
$frienddif = $friendcount - 7;
|
||||||
|
|
||||||
|
for ($i = 0; $i < min($friendcount, 7); $i += 1) {
|
||||||
|
$friend = $profile_friends->fetch();
|
||||||
echo "<a href='profile.php?username=${friend["username"]}' data-title='${friend["username"]}'><img class='profile-picture' height='42' width='42' src='${friend["profilepicture"]}' alt='${friend["username"]}' /></a>";
|
echo "<a href='profile.php?username=${friend["username"]}' data-title='${friend["username"]}'><img class='profile-picture' height='42' width='42' src='${friend["profilepicture"]}' alt='${friend["username"]}' /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($frienddif > 0) {
|
||||||
|
echo $frienddif === 1 ? "en nog 1 andere." : "...en nog $frienddif anderen.";
|
||||||
|
}
|
||||||
|
|
||||||
if($profile_friends->rowCount() === 0) {
|
if($profile_friends->rowCount() === 0) {
|
||||||
echo "<p>Deze gebruiker heeft nog geen vrienden gemaakt.</p>";
|
echo "<p>Deze gebruiker heeft nog geen vrienden gemaakt.</p>";
|
||||||
@@ -71,10 +78,18 @@
|
|||||||
<h3>Groepen</h3>
|
<h3>Groepen</h3>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
while($group = $profile_groups->fetch()) {
|
$groupcount = $profile_groups->rowCount();
|
||||||
|
$groupdif = $groupcount - 7;
|
||||||
|
|
||||||
|
for ($i = 0; $i < min($groupcount, 7); $i += 1) {
|
||||||
|
$group = $profile_groups->fetch();
|
||||||
echo "<a href='group.php?groupname=${group['name']}' data-title='${group["name"]}'><img class='group-picture' src='${group["picture"]}' alt='${group["name"]}s logo'></a>";
|
echo "<a href='group.php?groupname=${group['name']}' data-title='${group["name"]}'><img class='group-picture' src='${group["picture"]}' alt='${group["name"]}s logo'></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($groupdif > 0) {
|
||||||
|
echo $groupdif === 1 ? "en nog 1 andere." : "...en nog $groupdif anderen.";
|
||||||
|
}
|
||||||
|
|
||||||
if($profile_groups->rowCount() === 0) {
|
if($profile_groups->rowCount() === 0) {
|
||||||
echo "<p>Deze gebruiker is nog geen lid van een groep.</p>";
|
echo "<p>Deze gebruiker is nog geen lid van een groep.</p>";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user