More admin cleanups - improved user listing
This commit is contained in:
+1
-1
@@ -167,7 +167,7 @@
|
||||
$table->head = array ("Site Management", "Course Setup", "Other");
|
||||
$table->align = array ("CENTER", "CENTER", "CENTER");
|
||||
$table->data[0][0] = "<P><A HREF=\"site.php\">Site settings</A></P>".
|
||||
"<P><A HREF=\"../course/log.php?id=$site->id\">Site Logs</A></P>";
|
||||
"<P><A HREF=\"../course/log.php?id=$site->id\">Site logs</A></P>";
|
||||
$table->data[0][1] = "<P><A HREF=\"../course/edit.php\">Create a new course</A></P>".
|
||||
"<P><A HREF=\"../course/teacher.php\">Assign teachers to a course</A></P>".
|
||||
"<P><A HREF=\"../course/delete.php\">Delete a course</A></P>";
|
||||
|
||||
+9
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
require("../config.php");
|
||||
require("../user/lib.php");
|
||||
require("../lib/countries.php");
|
||||
|
||||
optional_variable($id); // user id
|
||||
|
||||
@@ -56,11 +57,16 @@
|
||||
$users = get_records_sql("SELECT * from user ORDER BY firstname");
|
||||
|
||||
print_header("Edit users", "Edit users", "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Edit users", "");
|
||||
echo "<CENTER>";
|
||||
print_heading("Choose a user to edit");
|
||||
$table->head = array ("Name", "Email", "City/Town", "Country");
|
||||
$table->align = array ("LEFT", "LEFT", "CENTER", "CENTER");
|
||||
foreach ($users as $user) {
|
||||
echo "<A HREF=\"user.php?id=$user->id\">$user->firstname $user->lastname</A><BR>";
|
||||
$table->data[] = array ("<A HREF=\"user.php?id=$user->id\">$user->firstname $user->lastname</A>",
|
||||
"$user->email",
|
||||
"$user->city",
|
||||
$COUNTRIES[$user->country]);
|
||||
}
|
||||
echo "</CENTER>";
|
||||
print_table($table);
|
||||
print_footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user