-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathajax_htmldata.php
83 lines (58 loc) · 2.67 KB
/
ajax_htmldata.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/*
**************************************************************************************************************************
** CORAL Authentication Module v. 1.0
**
** Copyright (c) 2011 University of Notre Dame
**
** 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';
}
echo "<tr>";
echo "<td>" . $userArray['loginID'] . "</td>";
echo "<td>" . $isAdmin . "</td>";
echo "<td><a href='ajax_forms.php?action=getAdminUserUpdateForm&loginID=" . $userArray['loginID'] . "&height=230&width=315&modal=true' class='thickbox'><img src='images/edit.gif' alt='"._("edit password or admin status")."' title='"._("edit password or admin status")."'></a></td>";
echo "<td><a href='javascript:void(0);' class='deleteUser' id='" . $userArray['loginID'] . "'><img src='images/cross.gif' alt='"._("remove")."' title='"._("remove")."'></a></td>";
echo "</tr>";
}
?>
</table>
<a href='ajax_forms.php?action=getAdminUserUpdateForm&loginID=&height=215&width=315&modal=true' class='thickbox' id='addUser'><?= _("add new user")?></a>
<?php
}else{
echo "(none found)<br /><a href='ajax_forms.php?action=getUserUpdateForm&loginID=&height=275&width=315&modal=true' class='thickbox' id='addUser'>"._("add new user")."</a>";
}
break;
default:
echo _("Action ") . $action . _(" not set up!");
break;
}
?>