|
|
|
require('connectdb.php');
require('pubfunctions.php');
$faculty_query_result=mysql_query('SELECT * FROM Faculty ' .
' ORDER BY LastName,FirstName',
$db);
if (!$faculty_query_result){
exit('There was a technical problem connecting to the ' .
'faculty database. Try again later.' . mysql_error());
}
while($faculty_row=mysql_fetch_array($faculty_query_result)) {
$facultynames[$faculty_row['Number']]=
$faculty_row['FirstName'] . ' ' . $faculty_row['LastName'];
}
$table_query_result=mysql_query('SELECT Number,Name FROM ResearchDivisions' .
' ORDER BY Name',
$db);
if (!$table_query_result) {
exit("Error performing query: " . mysql_error() .
" ");
}
while($table_row=mysql_fetch_array($table_query_result)) {
$research_divisions[$table_row['Number']]=$table_row['Name'];
}
$table_query_result=mysql_query('SELECT Number,Name FROM Quarters' .
' ORDER BY Name',
$db);
if (!$table_query_result) {
exit("Error performing query: " . mysql_error() .
" ");
}
while($table_row=mysql_fetch_array($table_query_result)) {
$quarters[$table_row['Number']]=$table_row['Name'];
}
$student_query_result=mysql_query('SELECT * FROM Students ' .
'WHERE Member=1 ' .
'ORDER BY LastName,FirstName,OSUID',
$db);
if (!$student_query_result){
exit('There was a technical problem connecting to the ' .
'student database. Try again later.');
}
while ($student_row=mysql_fetch_array($student_query_result)){
$id = $student_row['Number'];
$name = $student_row['FirstName'];
if ($student_row['MiddleName']!='') {
$name=$name . ' ' . $student_row['MiddleName'];
}
$name=$name . ' ' . $student_row['LastName'];
$Ad1 = $student_row['Address1'];
$Ad2 = $student_row['Address2'];
$Ad3 = $student_row['Address3'];
$tel = $student_row['Phone'];
$email = $student_row['Email'];
$web = $student_row['Url'];
$osuid = $student_row['OSUID'];
$haspicture= $student_row['HasPicture'];
$cvtype= $student_row['CVType'];
if ($haspicture) {
$picture= './stdfiles/pic.' . $id . '.jpg';
if (!file_exists($picture)){ $picture = "./data/f/blank.jpg"; }
} else {
$picture = "./data/f/blank.jpg";
}
$start_date = $quarters[$student_row['StartQuarter']] . " '" .
$student_row['StartYear'];
?>
|
echo $name ?>
if (strlen($start_date)>2){ ?> ( echo $start_date ?> ) }?>
if (strlen($student_row['ResDiv'])>0) { ?>
Research Division:
echo $research_divisions[$student_row['ResDiv']] ?> } ?>
$advisorsprinted=0;
$advisor_query_result=mysql_query('SELECT * FROM StudentAdvisors ' .
'WHERE Student=' . $id, $db);
if ($advisor_query_result) {
$advisorsfound=0;
while($advisor_row=mysql_fetch_array($advisor_query_result)) {
if (strlen($facultynames[$advisor_row['Advisor']])>0) {
$advisorid[$advisorsfound]=$advisor_row['Advisor'];
$advisorname[$advisorsfound++]=
$facultynames[$advisor_row['Advisor']];
}
}
if ($advisorsfound) {
?>
Advisor if ($advisorsfound>1) {echo('s');}?> :
for($j=0;$j<$advisorsfound;$j++) {
if ($j && $advisorsfound!=2) print(", ");
if ($j && $j==$advisorsfound-1) {
if ($advisorsfound==2) { print(" ");}
print("and ");
}
print("");
printf($advisorname[$j] . "");
}
$advisorsprinted=1;
?>
}
}
?>
if (strlen($email)>0) { ?>
echo $email ?>
} ?>
PubMed
if (printPublicationLink( -$id, $db,
'size="1" face="Arial" color="#800000"')) {
echo(" ");
}?>
|
}
?>
|