Fixes to table widths

This commit is contained in:
martin 2002-09-22 14:11:45 +00:00
parent b4ead712f2
commit 274f62e6d5
3 changed files with 8 additions and 2 deletions

View File

@ -149,6 +149,7 @@
$table->head = array ($name, $email, $city, $country, $lastaccess, "", "");
$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER");
$table->width = "95%";
foreach ($users as $user) {
if ($user->id == $USER->id or $user->username == "changeme") {
$deletebutton = "";

View File

@ -181,7 +181,7 @@ function print_user_picture($userid, $courseid, $picture, $large=false, $returns
}
}
function print_table($table, $cellpadding=10, $cellspacing=1) {
function print_table($table) {
// Prints a nicely formatted table.
// $table is an object with several properties.
// $table->head is an array of heading names.
@ -189,6 +189,8 @@ function print_table($table, $cellpadding=10, $cellspacing=1) {
// $table->size is an array of column sizes
// $table->data[] is an array of arrays containing the data.
// $table->width is an percentage of the page
// $table->cellpadding padding on each cell
// $table->cellspacing spacing between cells
if (isset($table->align)) {
foreach ($table->align as $key => $aa) {

View File

@ -81,6 +81,9 @@
$table->head = array (" ", $name, $city, $country, $lastaccess);
$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT");
$table->size = array ("10", "*", "*", "*", "*");
$table->size = array ("10", "*", "*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
foreach ($students as $student) {
if ($student->lastaccess) {
@ -101,7 +104,7 @@
"<FONT SIZE=2>".$COUNTRIES["$student->country"]."</FONT>",
"<FONT SIZE=2>$lastaccess</FONT>");
}
print_table($table, 2, 0);
print_table($table);
}
}