$rs = dbExec("select\n\t\t\t\t\t\t\t*\n\t\t\t\t\t\tfrom schools \n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\tcode = " . $u->school_code . "\n\t\t\t"); $u->school = $rs->FetchNextobj(); $rs = dbExec("select\n\t\t\t\t\t\t\t*\n\t\t\t\t\t\tfrom progress \n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\tuser_id = " . $u->id . "\n\t\t\t"); $u->progress = $rs->FetchNextobj(); $rs = dbExec("select\n\t\t\t\t\t\t\t*\n\t\t\t\t\t\tfrom tracking \n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\tuser_id = " . $u->id . "\n\t\t\t"); $u->tracking = $rs->FetchNextobj(); dbg($u); $ct = "cell"; if ($u->user_type == 't') { $ct = "tch"; } if ($u->active == 0) { $ct = "inact"; } $t = new Table("s"); $t->setspan(2, "User Details"); $t->nextrow(); $t->set("User ID", "head"); $t->set($u->id, $ct); $t->nextrow(); /* $t->set("Active", "head"); $t->set($u->active ? "Yes" : "No", $ct); $t->nextrow(); */ $t->set("User Type", "head"); $s = "Student"; if ($u->user_type == 't') { $s = "Teacher (" . $u->status . ")"; } if ($u->user_type == 'a') {