0) { // turn it into an object $row = mysql_fetch_object($result); } else { echo "No results"; } // cv page type include include ("includes/cvinc.php"); // Page variables $pageType = "personnel"; $bgcolour = "CCCC99"; $pathColour = $colour[$pageType]; $pageTitle = $row->cvName . " - " . $pageName[$page]; // Page Header include ("includes/textHeader.php"); if ($page == 0 && $row->cvImage) { echo ""; } // Secondary Navigation for CVs if ( $page != 0 ) { $BiogInf = "> $pageName[0]
\n"; } else {unset($BiogInf);}; if ( $row->cvDisplay1 == 'on' and $page != 1 ) { $ProfAff = "> $pageName[1]
\n"; } else { unset($ProfAff); }; if ( $row->cvDisplay2 == 'on' and $page != 2 ) { $SchoPro = "> $pageName[2]
\n"; } else { unset($SchoPro); }; echo $BiogInf . $ProfAff . $SchoPro; if ( $SchoPro or $ProfAff ) $break = "
"; if ($page == 0 ) { // BIOGRAPHICAL INFORMATION // // // echo "$row->cvName
"; echo $break; if ($row->cvPhone) {echo "Phone: " . $row->cvPhone . "
"; } if ($row->cvMobile) {echo "Mobile: " . $row->cvMobile . "
";} if ($row->cvEmail) {echo "Email: " . $row->cvEmail . "
"; } echo "
"; $cvDesc = ereg_replace("\r", "", $row->cvDesc); echo nl2br($cvDesc); if ($row->cvDegrees) { $degrees = $row->cvDegrees; $degrees = ereg_replace("\r", "", $degrees); echo "

\nDegrees and Qualifications
" . nl2br($degrees); } // 2nd Header for top level pages... // lookup from projectCvLookup where CID = $cvID, // if a result, return header & results // join of projectCvLookup and projects $sql = "SELECT projectCvLookup.PID, projects.projectName, projects.projectDesc, projects.projectImageThumb, projects.projectID from projectCvLookup, projects WHERE CID = $cvID AND PID=projects.projectID;"; $relatedProjects = @mysql_query($sql) or die ("Oops in join on cv.php : " . mysql_error() ); if (mysql_num_rows($relatedProjects) > 0 ) { // if there are projects, include the pageheader and give it a grammatically correct title if ( mysql_num_rows($relatedProjects) > 1 ) { $s = "s"; }; $text2ndHeader = "Current Project" . $s ; include "includes/text2ndHeader.php"; echo ""; // turn result into an object called $row while($row = mysql_fetch_object($relatedProjects)) { echo "\n"; if ($row->projectImageThumb) { $colspan = " colspan='3'"; echo "\n"; echo ""; } else { $colspan=""; } echo "\n"; echo "\n"; } echo "
$row->projectName
"; // grab first 200 chars of the description to use as an introduction. echo substr ( $row->projectDesc, 0 ,200); echo "... Read more >
"; echo "
"; } else { //echo "No Projects registered for display."; } // if there are meetings accociated with this cv, display the header and the meetings // 1/ well do the lookup here, so it is only performed on this one page. $sql = "select meetings.meetingDisplay, meetings.endDate, meetings.meetingName, meetingCvLookup.MID as MID from meetings left join meetingCvLookup on MID = meetings.meetingID and CID = $cvID ORDER BY meetings.startDate;"; $result = @mysql_query($sql) or die("error in meeting lookup $sql " . mysql_error() ); // put the links into an array, count actual values // $n = mysql_num_rows($result); // actual content containing rows $meeting->MID!="" $rows = 0; $today = getdate(); $month = substr("0".$today['mon'],-2); $mday = substr("0".$today['mday'],-2); $year = $today['year']; $dateToday = $year.$month.$mday; while ($meeting = mysql_fetch_object($result)) { $endDate = $meeting->endDate; if ($endDate>=$dateToday and $meeting->MID!="" and $meeting->meetingDisplay=="on") { $meetings[$rows] = "".$meeting->meetingName."
\n"; //$endDates[$rows] = $meeting->endDate; $rows++; } } unset($s); if ( $rows > 1 ) { $s = "s"; }; if ( $rows > 0 ) { $text2ndHeader = "Upcoming Meeting" . $s ; include "includes/text2ndHeader.php"; for ($i=0;$i<$rows;$i++) { //if ($endDates[$i]<$dateToday) $meetings[$i]; echo $meetings[$i]; } } } elseif ( $page == 1 ) { // PROFESSIONAL AFFILIATIONS // // // Editorial if ($row->cvEditorial) { $editorial = $row->cvEditorial; $editorial = ereg_replace("\r", "", $editorial); echo "
\nEditorial
" . nl2br($editorial); } // Organising committies if ($row->cvCommitties) { $committies = $row->cvCommitties; $committies = ereg_replace("\r", "", $committies); echo "


\nOrganising Committies
" . nl2br($committies); } } elseif ( $page == 2 ) { // SCHOLARLY AND PROFESSIONAL WORK // // // REFEREED PUBLICATIONS // $cvOriginalArticles = $row->cvOriginalArticles; $cvReviewArticles = $row->cvReviewArticles; $cvBookChapters = $row->cvBookChapters; $cvProceedings = $row->cvProceedings; if ($cvOriginalArticles || $cvReviewArticles || $cvBookChapters || $cvProceedings) { $text2ndHeader = "Refereed Publications"; include "includes/text2ndHeader.php"; // cvOriginalArticles if ($cvOriginalArticles) { $cvOriginalArticles = ereg_replace("\r", "", $cvOriginalArticles); echo "Original Articles
" . nl2br($cvOriginalArticles) . "

"; } // cvReviewArticles if ($cvReviewArticles) { $cvReviewArticles = ereg_replace("\r", "", $cvReviewArticles); echo "Review Articles
" . nl2br($cvReviewArticles) . "

"; } // cvBookChapters if ($cvBookChapters) { $cvBookChapters = ereg_replace("\r", "", $cvBookChapters); echo "Book Chapters
" . nl2br($cvBookChapters) . "

"; } // cvProceedings if ($cvProceedings) { $cvProceedings = ereg_replace("\r", "", $cvProceedings); echo "Proceedings
" . nl2br($cvProceedings) . "

"; } } // NON-REFEREED PUBLICATIONS $cvManuscripts = $row->cvManuscripts; $cvArticles = $row->cvArticles; $cvPopPress = $row->cvPopPress; $cvReports = $row->cvReports; if ($cvManuscripts || $cvArticles || $cvPopPress || $cvReports) { $text2ndHeader = "Non-refereed Publications"; include "includes/text2ndHeader.php"; // cvManuscripts if ($cvManuscripts) { $cvManuscripts = ereg_replace("\r", "", $cvManuscripts); echo "Manuscripts
\n" . nl2br($cvManuscripts) . "

"; } // $cvArticles if ($cvArticles) { $cvArticles = ereg_replace("\r", "", $cvArticles); echo "Articles
\n" . nl2br($cvArticles) . "

"; } // $cvPopPress if ($cvPopPress) { $cvPopPress = ereg_replace("\r", "", $cvPopPress); echo "Popular Press
\n" . nl2br($cvPopPress) . "

"; } // cvProceedings if ($cvReports) { $cvReports = ereg_replace("\r", "", $cvReports); echo "Reports
\n" . nl2br($cvReports) . "

"; } } // PRESENTATIONS AT MEETINGS AND SYMPOSIA // $cvInvited = $row->cvInvited; $cvOther = $row->cvOther; $cvPosterPresentations = $row->cvPosterPresentations; if ( $cvInvited || $cvOther || $cvPosterPresentations ) { $text2ndHeader = "Presentations at Meetings and Symposia"; include "includes/text2ndHeader.php"; // cvInvited if ($cvInvited) { $cvInvited = ereg_replace("\r", "", $cvInvited); echo "Invited
" . nl2br($cvInvited) . "

"; } // $cvOther if ($cvOther) { $cvOther = ereg_replace("\r", "", $cvOther); echo "Other
" . nl2br($cvOther) . "

"; } // $cvPosterPresentations if ($cvPosterPresentations) { $cvPosterPresentations = ereg_replace("\r", "", $cvPosterPresentations); echo "Poster Presentations
" . nl2br($cvPosterPresentations) . "

"; } } // INVITED SEMINARS // $cvInvitedSeminars = $row->cvInvitedSeminars; if ($cvInvitedSeminars) { $text2ndHeader = "Invited Seminars"; include "includes/text2ndHeader.php"; // cvOriginalArticles if ($cvInvitedSeminars) { $cvInvitedSeminars = ereg_replace("\r", "", $cvInvitedSeminars); echo nl2br($cvInvitedSeminars) . "

"; } } } include ("includes/footer.php"); /* include of footer */ ?>