$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 = "";
}
}
-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.
// $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) {
$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) {
"<FONT SIZE=2>".$COUNTRIES["$student->country"]."</FONT>",
"<FONT SIZE=2>$lastaccess</FONT>");
}
- print_table($table, 2, 0);
+ print_table($table);
}
}