logged_in)) { exit; } #print "lvl:".$session->userlevel."
"; if ($session->userlevel < TEAMLEAD_LEVEL) { print "Sorry, you do not have permission to access this page.
"; print "Back to Main
"; return; } $query = "select `username` , `name` , `phone` , `address` , `medicine` , `allergies` , `medical_conditions` , `doctor_name` , `doctor_phone`, `modification_date` from medical_info order by name"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); $row_count = mysql_num_rows($result); print "

PPS Emergency Contact and Medical List

"; $out = "

"; $out .= ""; for ($counter=0; $counter < $row_count; $counter++) { list ($username, $name, $phone, $address, $medicine, $allergies, $medical_conditions, $doctor_name, $doctor_phone, $modification_date) = mysql_fetch_row($result); $out .= ""; $out .= ""; $out .= ""; $out .= ""; $out .= ""; $out .= ""; $out .= ""; $out .= ""; $out .= ""; } $out .= "
Username"; $out .= "Contact Name"; $out .= "Phone"; $out .= "Address"; $out .= "Medicine"; $out .= "Allergies"; $out .= "Doctor Name"; $out .= "Doctor Phone"; $out .= "Modification Date
$username$name$phone$address$medicine$allergies$doctor_name$doctor_phone$modification_date
"; print $out; ?>