echo "<td {$classAdd} style='padding:3px;'><a href='publisherPlatform.php?" . $urlstring . "&showTab=sushi'>change/test connection</a></td>"; echo "</tr>"; } echo "</table>"; } else { echo "(no sushi services set up)"; } break; //display user info for admin screen //display user info for admin screen case 'getAdminUserList': $instanceArray = array(); $user = new User(); $tempArray = array(); $config = new Configuration(); if (count($user->allAsArray()) > 0) { ?> <table class='dataTable' style='width:550px'> <tr> <th>Login ID</th> <th>First Name</th> <th>Last Name</th> <th>Privilege</th> <th> </th> <th> </th> <?php foreach ($user->allAsArray() as $instance) { $privilege = new Privilege(new NamedArguments(array('primaryKey' => $instance['privilegeID']))); echo "<tr>"; echo "<td>" . $instance['loginID'] . "</td>"; echo "<td>" . $instance['firstName'] . "</td>";
<?php if (isset($_GET['userGroupID'])) { $userGroupID = $_GET['userGroupID']; } else { $userGroupID = ''; } $userGroup = new UserGroup(new NamedArguments(array('primaryKey' => $userGroupID))); //get all users for output in drop down $allUserArray = array(); $userObj = new User(); $allUserArray = $userObj->allAsArray(); //get users already set up for this user group in case it's an edit $ugUserArray = $userGroup->getUsers(); ?> <div id='div_userGroupForm'> <form id='userGroupForm'> <input type='hidden' name='editUserGroupID' id='editUserGroupID' value='<?php echo $userGroupID; ?> '> <div class='formTitle' style='width:280px; margin-bottom:5px;position:relative;'><span class='headerText'><?php if ($userGroupID) { echo _("Edit User Group"); } else { echo _("Add User Group"); } ?> </span></div>
<?php $instanceArray = array(); $user = new User(); $tempArray = array(); foreach ($user->allAsArray() as $tempArray) { $privilege = new Privilege(new NamedArguments(array('primaryKey' => $tempArray['privilegeID']))); $tempArray['priv'] = $privilege->shortName; array_push($instanceArray, $tempArray); } if (count($instanceArray) > 0) { ?> <div class="adminRightHeader">Users</div> <table class='linedDataTable' style='width:570px;margin-bottom:5px;'> <tr> <th>Login ID</td> <th>First Name</td> <th>Last Name</td> <th>Privilege</td> <th>View Accounts</td> <th>Email Address</td> <th> </td> <th> </td> </tr> <?php foreach ($instanceArray as $instance) { if ($instance['accountTabIndicator'] == '1') { $accountTab = 'Y'; } else { $accountTab = 'N'; }
** ** This file is part of CORAL. ** ** CORAL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ** ** CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License along with CORAL. If not, see <http://www.gnu.org/licenses/>. ** ************************************************************************************************************************** */ include_once 'directory.php'; switch ($_GET['action']) { case 'getUsers': $userObj = new User(); $usersArray = $userObj->allAsArray(); if (count($usersArray) > 0) { ?> <table class='linedDataTable' style='width:327px;'> <tr> <th>Login ID</th> <th>Admin?</th> <th style='width:20px;'> </th> <th style='width:20px;'> </th> </tr> <?php foreach ($usersArray as $userArray) { if ($userArray['adminInd'] == 'Y' || $userArray['adminInd'] == '1') { $isAdmin = 'Y'; } else { $isAdmin = 'N';