EOI; if($_GET['pid']){ $pid = ($_GET['pid']); } // Remove all but first 15 digits to prevent hacks $pid = preg_replace('/[^0-9\s]/', '', $pid); $pid = substr($pid, 0, 15); // Check if mysql is up and running, db available $db = mysql_connect("localhost", "FBC", "hrtlprt"); $query = "use FBC"; if (!mysql_query($query, $db)) { echo <<
Database or server error, please try again later 1
END; die(); } // Check if db FBC and table E163 are available $sqlab_members = "SELECT * FROM E163"; $res_members = mysql_query($sqlab_members); if (!$res_members) { echo <<Database or server error, please try again later
END; die(); } //$query_charset = "SET NAMES utf8"; $query_charset = "SET NAMES utf8"; if (!mysql_query($query_charset, $db)) { echo <<Database or server error, please try again later - Charset
END; die(); } // Function to print tel numbers function tel($arg2){ print "\n";} // Function to print fax numbers function fax($arg4){ print "
\n";} // Function to print email addresses function checkmail($arg3){ print "
\n";} // Function to print urls for publications function checkurl($arg4) { print "
\n"; } /* NOT USED ATM // Function to parse urls for homepage function checkhp($arg4) { foreach ($arg4 as $urlout) { if (rtrim($urlout->beschreibung) == "Homepage") print "
\n"; } } */ //function to check/print picture function piccheck($tmppid){ $picname = './perspic/'.$tmppid.'.jpg'; if (file_exists($picname)) { echo "
" . $arg1[l_name] . " " . $arg1[f_name]; if ($arg1[titel] != "") print ", " . $arg1[titel] . "
\n"; else print "\n"; if ($arg1[plz] != "") { print "
".$arg1[plz] . " ";
print $arg1[city] . ", ";
print $arg1[strasse] . "
\n";
}
if ($arg1[room] != "")
{
print "
";
print $arg1[room] . "
\n";
}
}
echo "
Personal-Information
\n"; // fetch personal entry from db $sql_person = "SELECT * FROM `E163` WHERE `oid` = $pid"; $res_person = mysql_query($sql_person); if (!$res_person) { echo <<Database or server error, please try again later
END; die(); } //check for / print pic piccheck($pid); //convert sql result to array $row = mysql_fetch_array($res_person); $field_oid = $row["oid"]; $field_fname = $row["f_name"]; $field_lname = $row["l_name"]; $field_titel = $row["titel"]; $field_tel1 = $row["tel_1"]; $field_tel2 = $row["tel_2"]; $field_fax = $row["fax"]; $field_genmail = $row["genericemail"]; $field_publ = $row["publikationen"]; $field_picuri = $row["picture_uri"]; // call output function levelout($row); // echo "$field_fname $field_lname $field_titel $field_oid $field_fg"; // output for rest of data // tel number 1 if ($field_tel1 != "") { // print "\n"; tel($field_tel1); //print "
\n"; } // tel number 2 if ($field_tel2 != "") { // print "\n"; tel($field_tel2); //print "
\n"; } // check fax number if ($field_fax != "") { //print "\n";
fax($field_fax);
// \n";
checkmail($field_genmail);
//print "
\n";
print "


