Skip to content
Snippets Groups Projects
Commit 94af734b authored by Robert Anderson's avatar Robert Anderson
Browse files

List current user's groups

parent 22a9001d
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ printHeader(array( ...@@ -36,7 +36,7 @@ printHeader(array(
?> ?>
<p class="pageheader">Groups List</p> <p class="pageheader">Groups List</p>
<form id="main_form" action="user-main.php" method="post"> <form id="main_form" action="user-groups.php" method="post">
<div class="textcenter"> <div class="textcenter">
Action Action
<select id="main_form_action" name="frmaction" <select id="main_form_action" name="frmaction"
...@@ -45,7 +45,7 @@ printHeader(array( ...@@ -45,7 +45,7 @@ printHeader(array(
var myobj = document.getElementById('main_form_action'); var myobj = document.getElementById('main_form_action');
if (myobj.selectedIndex == 2) { if (myobj.selectedIndex == 2) {
myform.action = 'user-group-add.php'; myform.action = 'user-groups-add.php';
} else if (myobj.selectedIndex == 3) { } else if (myobj.selectedIndex == 3) {
myform.action = 'user-groups-delete.php'; myform.action = 'user-groups-delete.php';
} }
...@@ -59,7 +59,7 @@ printHeader(array( ...@@ -59,7 +59,7 @@ printHeader(array(
</select> </select>
</div> </div>
<p /> <p />
<table class="results" style="width: 75%;"> <table class="results" style="width: 75%;">
<tr class="resultstitle"> <tr class="resultstitle">
...@@ -71,8 +71,6 @@ printHeader(array( ...@@ -71,8 +71,6 @@ printHeader(array(
</tr> </tr>
<?php <?php
if (isset($_POST['user_id'])) { if (isset($_POST['user_id'])) {
$_SESSION['groups_user_id'] = $_POST['user_id'];
$sql = "SELECT GroupID FROM ${DB_TABLE_PREFIX}users_to_groups WHERE UserID = ".$_POST['user_id']; $sql = "SELECT GroupID FROM ${DB_TABLE_PREFIX}users_to_groups WHERE UserID = ".$_POST['user_id'];
$res = $db->query($sql); $res = $db->query($sql);
...@@ -106,6 +104,8 @@ printHeader(array( ...@@ -106,6 +104,8 @@ printHeader(array(
?> ?>
<?php <?php
$_SESSION['groups_user_id'] = $_POST['user_id'];
printFooter(); printFooter();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment