$id = intval($_GET['id']);
require('connectdb.php');
require('pubfunctions.php');
$faculty_query_result=mysql_query('SELECT * FROM Faculty' .
' WHERE Number=' .
$id, $db);
if (!$faculty_query_result){
exit('There was a technical problem connecting to the ' .
'faculty database. Try again later.');
}
$faculty_row=mysql_fetch_array($faculty_query_result);
if (!$faculty_row) {
exit('You selected an invalid faculty.');
}
$student_query_result=mysql_query('SELECT * FROM Students', $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)) {
$studentnames[$student_row['Number']]=
$student_row['FirstName'] . ' ' . $student_row['LastName'];
$studentiscurrent[$student_row['Number']]=$student_row['Member'];
}
$studentsfound=0;
$alumnifound=0;
$advisor_query_result=mysql_query('SELECT * FROM StudentAdvisors ' .
'WHERE Advisor=' . $id, $db);
if ($advisor_query_result) {
while($advisor_row=mysql_fetch_array($advisor_query_result)) {
$advisorid=$advisor_row['Student'];
if (strlen($studentnames[$advisorid])>0) {
if ($studentiscurrent[$advisorid]) {
$studentid[$studentsfound]=$advisorid;
$studentname[$studentsfound++]=$studentnames[$advisorid];
} else {
$alumniid[$alumnifound]=$advisorid;
$alumniname[$alumnifound++]=$studentnames[$advisorid];
}
}
}
}
$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 Departments' .
' ORDER BY Name',
$db);
if (!$table_query_result) {
exit("Error performing query: " . mysql_error() .
"
");
}
while($table_row=mysql_fetch_array($table_query_result)) {
$departments[$table_row['Number']]=$table_row['Name'];
}
$table_query_result=mysql_query('SELECT Number,Name FROM Titles' .
' ORDER BY Name',
$db);
if (!$table_query_result) {
exit("Error performing query: " . mysql_error() .
"
");
}
while($table_row=mysql_fetch_array($table_query_result)) {
$titles[$table_row['Number']]=$table_row['Name'];
}
$name = $faculty_row['FirstName'];
if ($faculty_row['MiddleName']!='') {
$name=$name . ' ' . $faculty_row['MiddleName'];
}
$name=$name . ' ' . $faculty_row['LastName'];
$title = $titles[$faculty_row['Title']];
$research = $faculty_row['ShortResDesc'];
$phd = $faculty_row['PhDInfo'];
$Ad1 = $faculty_row['Address1'];
$Ad2 = $faculty_row['Address2'];
$Ad3 = $faculty_row['Address3'];
$tel = $faculty_row['Phone'];
$email = $faculty_row['Email'];
$web = $faculty_row['Url'];
$osuid = $faculty_row['OSUID'];
$haspicture= $faculty_row['HasPicture'];
$cvtype= $faculty_row['CVType'];
$recruiting = $faculty_row['Recruitment'];
if ($haspicture && !is_null($faculty_row['Picture'])) {
$picture= 'facpic.php?id=' . $faculty_row['Number'];
} else {
$picture = "./data/f/blank.jpg";
}
?>
|
|
echo $name ?>
echo $title ?>
for($j=1;$j<5;$j++) {
if (strlen($faculty_row['Department' . $j])>0) {
$department=$faculty_row['Department' . $j];
if (strlen($departments[$department])>0) {
echo($departments[$department] . " \n");
}
}
}
?>
echo $phd ?>
$divisionprinted=0;
for($j=1;$j<5;$j++) {
if (strlen($faculty_row['ResDiv' . $j])>0) {
$resdiv=$faculty_row['ResDiv' . $j];
if (strlen($research_divisions[$resdiv])>0) {
if ($divisionprinted==1) {
print(" / ");
} else {?>
Research Division : |
}
$divisionprinted=1;
echo('' . $research_divisions[$resdiv]
. '');
}
}
}
if ($divisionprinted==1) { print(" | \n");}
?>
Contact : |
echo $Ad1 ?>
echo $Ad2 ?>
echo $Ad3 ?>
echo $tel ?>
if (strlen($email)>0){ ?>
echo $email ?>
} ?>
if (strlen($web)>0){ ?>
print $web ?>
} ?>
|
$hasmore=0;
if ($cvtype>0) {
if (!$hasmore) { ?>
More info : |
} else { ?> } $hasmore=1; ?>
if ($cvtype==1) { echo('Biosketch'); } else { echo('CV'); }
?>
} ?>
if (strlen($osuid)>0) {
if (!$hasmore) { ?>
More info : |
} else { ?>
}
$hasmore=1; ?>
osu:pro
} ?>
if (!$hasmore) { ?>
More info : |
} else { ?>
}
$hasmore=1; ?>
PubMed
echo(" ");
if (printPublicationLink( $id, $db,
'size="2" face="Arial" color="#800000"')) {
echo(" ");
}
?>
if ($hasmore) { ?> | } ?>
if ($studentsfound>0) { ?>
Students : |
for($i=0;$i<$studentsfound;$i++) {
if ($i>0) { echo(", "); } ?>
echo $studentname[$i]
?>
}?>
|
} ?>
if ($alumnifound>0) { ?>
Alumni : |
for($i=0;$i<$alumnifound;$i++) {
if ($i>0) { echo(", "); } ?>
echo $alumniname[$i]
?>
}?>
|
} ?>
| |
|
|
if (strlen($faculty_row['ResDesc'])>0) { ?>
|
Research Interests:
echo($faculty_row['ResDesc']); ?>
|
} ?>
|
|