$entry[fname] $entry[lname]";
return $contentvar;
}
function extAuthors($extAuthorsString)
{
if($extAuthorsString == null)
return;
$extAuthorsString = trim($extAuthorsString);
if($extAuthorsString == null || $extAuthorsString == "")
return null;
preg_match_all("%((\!|\@)([0-9A-Za-z\ ]*)(\@|\!))%", $extAuthorsString, $answer, PREG_PATTERN_ORDER);
for($i = 0; $i < count($answer[3]); $i++)
{
if(trim($answer[2][$i] == "@")) {
$contentvar .= localAuthors($answer[3][$i]);
} else {
$contentvar .= trim($answer[3][$i]);
}
if($i == (count($answer[3]) - 1))
$contentvar .= ".";
else
$contentvar .= ", ";
}
return $contentvar;
}
mysql_connect('localhost', 'root');
//DO NOT RELEASE
mysql_select_db('dept_coredb');
$query = "SELECT * from vitals";
$result = mysql_query($query);
$entry = mysql_fetch_array($result);
$deptName = $entry[deptName];
$deptAbbv = $entry[deptAbbv];
$deptLogo = $entry[deptLogo];
$address1 = $entry[address1];
$address2 = $entry[address2];
$city = $entry[city];
$state = $entry[state];
$zip = $entry[zip];
$phone = $entry[phone];
if($_GET['id'] != '') {
$personID = $_GET['id'];
$query = "SELECT * from people WHERE personID = $personID";
$result = mysql_query($query);
$entry = mysql_fetch_array($result);
$fname = $entry[fname];
$lname = $entry[lname];
$pictureURL = $entry[pictureURL];
$officeLoc = $entry[officeLoc];
$phone = $entry[phone];
$groupName = "$fname $lname";
$pageName = $groupName;
$title = $entry[title];
$personDesc = $entry[description];
$groupIDarray = array();
preg_match("|\!([0-9]*)\!|", "$entry[groups]", $groupIDarray);
$query = "SELECT * from groups WHERE groupID = '$groupIDarray[1]'";
$result = mysql_query($query);
$entry = mysql_fetch_array($result);
$content .= "$title, $entry[groupName]
Office: $officeLoc Phone: $phone
"; } $content .=" | $personDesc |
"; $query = "SELECT * FROM papers ORDER BY year"; $result = mysql_query($query); $content .= "
"; for ($i = 0; $i < mysql_num_rows($result); $i++) { $entry = mysql_fetch_array($result); if(strpos($entry[localAuthors], "!".$personID."!") === false) { ; } else { $content .= "
"; $content .= localAuthors($entry[localAuthors]); $content .= extAuthors($entry[extAuthors]); $content .= " |
$entry[title] |
$entry[journal], $entry[year], $entry[status]. |
download |
No Download Available |
"; } } } else { $groupName = "$deptAbbv People"; $content = "The definitive list.
"; $query = "SELECT * from people ORDER BY lname"; $result = mysql_query($query); $content .= "
";
$content .= "$entry[lname], $entry[fname]";
$content .= " - $entry[title] $entry[phone] $entry[officeLoc] |
> People > $fname $fname >"); } ?> | |
- - , , - |