"index.tpl" , index_e => "index_e.tpl" , index_sp => "index_sp.tpl" , index_p => "index_p.tpl" , index_g => "index_g.tpl" , body_e => "body_e.tpl" , body_sp => "body_sp.tpl" , body_p => "body_p.tpl" , body_general => "body_general.tpl" , topnav => "topnav.tpl" , research => "research.tpl" , faculty => "faculty.tpl" , leftnav => "leftnav.tpl" , footer => "footer.tpl" , other => "other.tpl" , publications => "publications.tpl" , books => "books.tpl" , journals => "journals.tpl" , grants_contracts => "grants_contracts.tpl" , presentations => "presentations.tpl" , professional_activities => "professional_activities.tpl" , awards => "awards.tpl" , education => "education.tpl" , experience => "experience.tpl" , research_interests => "research_interests.tpl" , courses => "courses.tpl" , fac_phone_numbers => "fac_phone_numbers.tpl" , email_addresses => "email_addresses.tpl" , url_addresses => "fac_url.tpl" , supervision => "supervision.tpl" , backtotop => "backtotop.tpl" , blank => "blank.tpl" , head_ri => "head_ri.tpl" ); $tpl->define($define); // All of these are arrays /* /////////////////////////////////////////////////////////////////////////// // this is the full list of all faculty // $research_interests = $fp->get("research_interests"); $personal = $fp->get("personal"); $tpl->assign( array( FAC_FULLNAME => $personal[0][firstn] . " " . $personal[0][lastn] , FAC_TITLE => $personal[0][title] )); foreach(${"_" . $REQUEST_METHOD} as $k=>$v) { $tpl->assign(strtoupper($k), $v); } foreach ($fp->get("email_addresses") as $a) { $tpl->assign(array( FAC_EMAIL_ADDRESS => $a[email_address] )); $tpl->parse(FAC_EMAIL, ".email_addresses"); } unset($a); foreach ($fp->get("phone_numbers") as $a) { $phone_number = preg_replace("/\D/", "", $a[phone_number]); $phone_number = preg_replace("/(\d\d\d)(\d\d\d)(\d\d\d\d)/", "($1) $2-$3", $phone_number); $tpl->assign(array( FAC_PHONE_NUMBER => $phone_number , FAC_PHONE_DESCRIPTION => $a[description] )); $tpl->parse(FAC_PHONE_NUMBERS, ".fac_phone_numbers"); } unset($a); foreach ($fp->get("research_interests") as $a) { if ( count($fp->get("research_interests")) > 0 and is_array($a)) { $tpl->assign( array(RI_DESCRIPTION => ucfirst($a["description"])) ); $tpl->parse(RESEARCH_INTERESTS, ".research_interests"); } else { $tpl->parse(RESEARCH_INTERESTS, "blank"); } } unset($a); /////////////////////////////////////////////////////////////////////////// */ // $research_interests = $fp->get("research_interests"); foreach ($fp->get("research_interests") as $a) { if ( count($fp->get("research_interests")) > 0 and is_array($a)) { $tpl->assign( array(RI_DESCRIPTION => ucfirst($a["description"])) ); $tpl->parse(HEAD_RI, "head_ri"); $tpl->parse(RESEARCH_INTERESTS, ".research_interests"); $tpl->parse(BACKTOTOP, "backtotop"); } else { $tpl->parse(HEAD_RI, "blank"); $tpl->parse(RESEARCH_INTERESTS, "blank"); $tpl->parse(BACKTOTOP, "blank"); } } unset($a); $tpl->assign( array( RIGHTCOL => get_htmldata(rightcol) )); // $awards = $fp->get("awards"); foreach ($fp->get("awards") as $a) { if ( $a[begin] != "0000-00-00" and $a[end] != "0000-00-00" and $a[begin] != "" and $a[end] != "" ){ $dates = format_date($a[begin]) . " - " . format_date($a[end]); } else { $dates = format_date($a[begin]) . format_date($a[end]); } if ($dates) $a[award] .= ", "; if ( count($fp->get("awards")) > 0 and is_array($a)) { $tpl->assign( array( AWA_AWARD => $a[award] , AWA_DATES => $dates , AWA_BEGIN => $a[begin] , AWA_END => $a[end] )); $tpl->parse(AWARDS, ".awards"); } else { $tpl->assign(AWARDS, ""); } } unset($a); // $courses = $fp->get("courses"); foreach ($fp->get("courses") as $a) { if ( count($fp->get("courses")) > 0 and is_array($a)) { $tpl->assign( array( COU_YEAR => $a[year] , COU_SEMESTER => $a[semester] , COU_COURSENUM => $a[coursenum] , COU_TITLE => $a[title] , COU_COMMENTS => $a[comments] , COU_UNDERGRADNUM => $a[undergradnum] , COU_GRADNUM => $a[gradnum] )); $tpl->parse(COURSES, ".courses"); } else { $tpl->assign(COURSES, ""); } } unset($a); foreach ($fp->get("education") as $a) { if ( $a[begin] != "0000-00-00" and $a[end] != "0000-00-00" and $a[begin] != "" and $a[end] != "" ){ $dates = format_date($a[begin]) . " - " . format_date($a[end]); } else { $dates = format_date($a[begin]) . format_date($a[end]); } if ( count($fp->get("education")) > 0 and is_array($a)) { $tpl->assign( array( EDU_UNIVERSITY => $a[university] , EDU_DEGREE => $a[degree] , EDU_SUBJECT => $a[subject] , EDU_DATES => $a[dates] , EDU_BEGIN => $a[begin] , EDU_END => $a[end] )); $tpl->parse(EDUCATION, ".education"); } else { $tpl->assign(EDUCATION, ""); } } unset($a); // $email_addresses = $fp->get("email_addresses"); foreach ($fp->get("email_addresses") as $a) { $tpl->assign(array( FAC_EMAIL_ADDRESS => preg_replace("/\./", " . ", preg_replace("/@/", " @ ", $a[email_address])) )); $tpl->parse(FAC_EMAIL, ".email_addresses"); } unset($a); // $urls = $fp->get("urls"); /* foreach ($fp->get("urls") as $a) { $tpl->assign(array( FAC_URL_ADDRESS => $a[url] , FAC_URL_DESC => $a[description] )); $tpl->parse(FAC_URL, ".url_addresses"); } unset($a); */ foreach ($fp->get("urls") as $a) { if ( count($fp->get("urls")) > 0 and is_array($a)) { $tpl->assign(array(FAC_URL_ADDRESS => $a["url"], FAC_URL_DESC => $a["description"]) ); $tpl->parse(FAC_URL, ".url_addresses"); } else { $tpl->parse(FAC_URL, "blank"); } } unset($a); // $experience = $fp->get("experience"); foreach ($fp->get("experience") as $a) { if ( $a[begin] != "0000-00-00" and $a[end] != "0000-00-00" and $a[begin] != "" and $a[end] != "" ){ $dates = format_date($a[begin]) . " - " . format_date($a[end]); } else { $dates = format_date($a[begin]) . format_date($a[end]); } if ( count($fp->get("experience")) > 0 and is_array($a)) { $tpl->assign( array( EXP_DATES => $a[dates] , EXP_BEGIN => $a[begin] , EXP_END => $a[end] , EXP_DESCRIPTION => $a[description] )); $tpl->parse(EXPERIENCE, ".experience"); } else { $tpl->assign(EXPERIENCE, ""); } } unset($a); $external_interactions = $fp->get("external_interactions"); unset($a); // $grants_contracts = $fp->get("grants_contracts"); foreach ($fp->get("grants_contracts") as $a) { if ( $a[begin] != "0000-00-00" and $a[end] != "0000-00-00" and $a[begin] != "" and $a[end] != "" ){ $dates = format_date($a[begin]) . " - " . format_date($a[end]); } else { $dates = format_date($a[begin]) . format_date($a[end]); } if ( count($fp->get("grants_contracts")) > 0 and is_array($a)) { $tpl->assign( array( GC_TITLE => $a[title] , GC_ROLE => $a[role] , GC_ASSOCIATE => $a[associate] , GC_AMOUNT => $a[amount] , GC_DATES => $a[dates] , GC_BEGIN => $a[begin] , GC_END => $a[end] , GC_COMMENTS => $a[comments] , GC_STATUS => $a[status] )); $tpl->parse(GRANTS_CONTRACTS, ".grants_contracts"); } else { $tpl->assign(GRANTS_CONTRACTS, ""); } } unset($a); // $other = $fp->get("other"); foreach ($fp->get("other") as $a) { if ( count($fp->get("other")) > 0 and is_array($a)) { $tpl->assign(array( OTH_TITLE => $a[title] , OTH_DESCRIPTION => $a[description] )); $tpl->parse(OTHER, ".other"); } else { $tpl->assign(OTHER, ""); } } unset($a); // $phone_numbers = $fp->get("phone_numbers"); foreach ($fp->get("phone_numbers") as $a) { $phone_number = preg_replace("/\D/", "", $a[phone_number]); $phone_number = preg_replace("/(\d\d\d)(\d\d\d)(\d\d\d\d)/", "($1) $2-$3", $phone_number); $tpl->assign(array( FAC_PHONE_NUMBER => $phone_number , FAC_PHONE_DESCRIPTION => $a[description] )); $tpl->parse(FAC_PHONE_NUMBERS, ".fac_phone_numbers"); } unset($a); // $presentations = $fp->get("presentations"); foreach ($fp->get("presentations") as $a) { if ( count($fp->get("presentations")) > 0 and is_array($a)) { $a[date] = format_date($a[date]); $tpl->assign(array( PRE_AUTHOR => $a[author] , PRE_TITLE => $a[title] , PRE_EVENT => $a[event] , PRE_LOCATION => $a[location] , PRE_DATE => $a[date] , PRE_COMMENTS => $a[comments] , PRE_INVITED => $a[invited] )); $tpl->parse(PRESENTATIONS, ".presentations"); } else { $tpl->assign(PRESENTATIONS, ""); } } unset($a); // $professional_activities = $fp->get("professional_activities"); foreach ($fp->get("professional_activities") as $a) { if ( $a[begin] != "0000-00-00" and $a[end] != "0000-00-00" and $a[begin] != "" and $a[end] != "" ){ $dates = format_date($a[begin]) . " - " . format_date($a[end]); } else { $dates = format_date($a[begin]) . format_date($a[end]); } if ( count($fp->get("professional_activities")) > 0 and is_array($a)) { $tpl->assign(array( PA_DESCRIPTION => $a[description] )); $tpl->parse(PROFESSIONAL_ACTIVITIES, ".professional_activities"); } else { $tpl->assign(PROFESSIONAL_ACTIVITIES, ""); } } unset($a); // $publications = $fp->get("publications"); foreach ($fp->get("publications") as $a) { if ( count($fp->get("publications")) > 0 and is_array($a)) { $tpl->assign(array( PUB_AUTHORS => $a[authors] , PUB_TITLE => $a[title] , PUB_PUBLICATION => $a[publication] , PUB_VOLUME => $a[volume] , PUB_NUMBER => $a[number] , PUB_YEAR => $a[year] , PUB_PAGES => $a[pages] , PUB_COMMENTS => $a[comments] , PUB_STATUS => $a[status] , PUB_START_PAGE => $a[start_page] , PUB_END_PAGE => $a[end_page] )); $tpl->parse(PUBLICATIONS, ".publications"); } else { $tpl->assign(PUBLICATIONS, ""); } } unset($a); // $journals = $fp->get("journals"); foreach ($fp->get("journals") as $a) { if ( count($fp->get("journals")) > 0 and is_array($a)) { $tpl->assign(array( JOU_AUTHORS => $a[authors] , JOU_TITLE => $a[title] , JOU_PUBLICATION => $a[publication] , JOU_VOLUME => $a[volume] , JOU_NUMBER => $a[number] , JOU_YEAR => $a[year] , JOU_PAGES => $a[pages] , JOU_COMMENTS => $a[comments] , JOU_STATUS => $a[status] , JOU_START_PAGE => $a[start_page] , JOU_END_PAGE => $a[end_page] )); $tpl->parse(JOURNALS, ".journals"); } else { $tpl->assign(JOURNALS, ""); } } unset($a); // $books = $fp->get("books"); foreach ($fp->get("books") as $a) { if ( $a[begin] != "0000-00-00" and $a[end] != "0000-00-00" and $a[begin] != "" and $a[end] != "" ){ $dates = format_date($a[begin]) . " - " . format_date($a[end]); } else { $dates = format_date($a[begin]) . format_date($a[end]); } if ( count($fp->get("books")) > 0 and is_array($a)) { $tpl->assign(array( BOO_AUTHORS => $a[authors] , BOO_TITLE => $a[title] , BOO_PUBLISHER => $a[publisher] , BOO_EDITOR => $a[editor] , BOO_VOLUME => $a[volume] , BOO_NUMBER => $a[number] , BOO_YEAR => $a[year] , BOO_PAGES => $a[pages] , BOO_COMMENTS => $a[comments] , BOO_STATUS => $a[status] , BOO_START_PAGE => $a[start_page] , BOO_END_PAGE => $a[end_page] )); $tpl->parse(BOOKS, ".books"); } else { $tpl->assign(BOOKS, ""); } } unset($a); // $supervision = $fp->get("supervision"); foreach ($fp->get("supervision") as $a) { if ( count($fp->get("supervision")) > 0 and is_array($a)) { $tpl->assign(array( SUP_FIRSTN => $a[firstn] , SUP_LASTN => $a[lastn] , SUP_STATUS => $a[status] , SUP_CATEGORY => $a[category] , SUP_COMMENTS => $a[comments] )); $tpl->parse(SUPERVISION, ".supervision"); } else { $tpl->assign(SUPERVISION, ""); } } unset($a); $urls = $fp->get("urls"); $personal = $fp->get("personal"); if ( $FACULTY_IMAGES[$personal[0][lastn]] ) { $faculty_image = $FACULTY_IMAGES[$personal[0][lastn]]; } else { $faculty_image = "../images/coming_soon.jpg"; } if ( $FACULTY_VIDEOS[$personal[0][lastn]] ) { $faculty_video = $FACULTY_VIDEOS[$personal[0][lastn]]; } else { $faculty_video = ""; } $tpl->assign( array( FAC_TITLE => $personal[0][title] , FAC_FULLNAME => $personal[0][firstn] . " " . $personal[0][lastn] , FAC_IMAGE => $faculty_image , FAC_VIDEO => $faculty_video )); foreach(${"_" . $REQUEST_METHOD} as $k=>$v) { $tpl->assign(strtoupper($k), $v); } $tpl->parse(BODY_GENERAL, "body_general"); // $tpl->parse(BODY_E, "body_e"); // $tpl->parse(BODY_SP, "body_sp"); // $tpl->parse(BODY_P, "body_p"); // $tpl->parse(BODY_SP, "body_general"); $tpl->parse(FACULTY, "faculty"); $tpl->parse(TOPNAV, "topnav"); $tpl->parse(RESEARCH, "research"); $tpl->parse(LEFTNAV, "leftnav"); $tpl->parse(FOOTER, "footer"); // $tpl->parse(INDEX3, "index3"); // $tpl->parse(INDEX_E, "index_e"); // $tpl->parse(INDEX_SP, "index_sp"); // $tpl->parse(INDEX_P, "index_p"); $tpl->parse(INDEX_G, "index_g"); header("Content-type: text/html"); $tpl->FastPrint(); exit; ?> 'none', '01'=>'January', '02'=>'February', '03'=>'March', '04'=>'April', '05'=>'May', '06'=>'June', '07'=>'July', '08'=>'August', '09'=>'September', '10'=>'October', '11'=>'November', '12'=>'December' ); if ( $year == '0000' ) return; if ( $year == '9999' ) return "Present"; if ( $MONTHS[$month] == 'none' ) return $year; if ( $day != '00' ) { $date = $MONTHS[$month] . " " . $day . ", " . $year; } else { $date = $MONTHS[$month] . ", " . $year; } return $date; } function n_a($thing) { if ($thing == "" ) { $thing = "N/A"; } return $thing; } ?>