// General Variables
//$table Set Localy for SQL connect
$dbname="Mario"; // Generally use on alinea.bg MySQL Server (You can add more tables inside this database, as your permissions are OK with that.)
// You cannot change this username and password (only Angel can)
$dbusername="Martin_Ivanov"; // case-sensitive
$dbpassword="w23qsM5qws34A"; // case-sensitive
// End General Variables ( use command GLOBAL when called inside a function() )
?>
//echo "";
?>
// If not asked for a Profile view, simply view the TOC
if (!isset($_GET['showprofile'])) {
?>
| |
Laboratory of Theoretical Nuclear Physics |
| Member | Occupation |
|
Ivan Zh. Petkov
|
Professor, Dr.Sc.
(IN MEMORIAM) |
|
Roussy P. Roussev
|
Associate Professor, Dr.
(IN MEMORIAM) |
// Load Members of the Group, currently in DBase (table Personal Data)
$table="personaldata"; // Set working table
$ed=mysql_connect("localhost", $dbusername, $dbpassword) or Die("Can't connect. Invalid username or password, or maybe SQL server down."); // Open connection to SQL Server
$result=mysql_db_query($dbname,"Select Name, Occupation, UserID from $table order by Sorted"); //Select all users , sorted by the "Name" Field (We will get only the name, occupation and userid)
$num_rows=mysql_num_rows($result); // Get number of the rows (number of members)
while ($myrow=mysql_fetch_array($result)) {
echo "
| $myrow[0] | $myrow[1] |
";
}
mysql_close($ed); // Close connection to SQL Server (We have to save AlineA Batteries for long-life :-) )
// END: Load Members of the Group, currently in DBase (table Personal Data)
?>
| |
|
Group members, please update your personal profiles regularly.
(Need of valid Username & Pass)
|
} // END: If not asked for a Profile view, simply view the TOC
else {
$showprofile=$_GET['showprofile'];
// If asked for a profile, shows it!
$table="personaldata"; // Set working table
$ed=mysql_connect("localhost", $dbusername, $dbpassword) or Die("Can't connect. Invalid username or password, or maybe SQL server down."); // Open connection to SQL Server
$result=mysql_db_query($dbname,"Select * from $table WHERE UserID='$showprofile';"); //Select all fields for requested UserID, ignore other members
// Build Personal Data Table
echo "PERSONAL DATA
";
while ($myrow=mysql_fetch_array($result)) {
echo "Last updated on: $myrow[14]
";
echo "";
if (substr($myrow[0],1,9)!="o informa") { echo "| | Name: | $myrow[0] |
"; }
if (substr($myrow[10],1,9)!="o informa") { echo "| | Photo: | 
|
"; }
if (substr($myrow[16],1,9)!="o informa") { echo "| | Occupation: | $myrow[16] |
"; }
if (substr($myrow[15],1,9)!="o informa") { echo "| | Office Address: | $myrow[15] |
"; }
if (substr($myrow[1],1,9)!="o informa") { echo "| | Office Phone: | $myrow[1] |
"; }
if (substr($myrow[2],1,9)!="o informa") { echo "| | Office Fax: | $myrow[2] |
"; }
if (substr($myrow[3],1,9)!="o informa") { echo "| | E-mail: | $myrow[3] |
"; }
if (substr($myrow[4],1,9)!="o informa") { echo "| | Home Address: | $myrow[4] |
"; }
if (substr($myrow[5],1,9)!="o informa") { echo "| | Home Phone: | $myrow[5] |
"; }
if (substr($myrow[6],1,9)!="o informa") { echo "| | Birth Date: | $myrow[6] |
"; }
if (substr($myrow[7],1,9)!="o informa") { echo "| | Birth Place: | $myrow[7] |
"; }
if (substr($myrow[8],1,9)!="o informa") { echo "| | Citizenship: | $myrow[8] |
"; }
if (substr($myrow[9],1,9)!="o informa") { echo "| | Marital Status: | $myrow[9] |
"; }
echo "
";
} // end while
mysql_close($ed); // Close connection to SQL Server (We have to save AlineA Batteries for long-life :-) )
// END: Build Personal Data Table
// Now, Build Background Information
$table="scientiestsinfo"; // Set working table
$ed=mysql_connect("localhost", $dbusername, $dbpassword) or Die("Can't connect. Invalid username or password, or maybe SQL server down."); // Open connection to SQL Server
$dbname="Mario";
$result=mysql_db_query($dbname,"Select * from $table WHERE UserID='$showprofile' order by Sorter;"); //Select all fields for requested UserID, ignore other members
while ($myrow=mysql_fetch_array($result)) {
// $myrow[0] - Info type (education, experience, etc.)
// $myrow[1] - UserID
// $myrow[2] - Info body
if ($myrow[0]=="education" or $myrow[0]=="experience" or $myrow[0]=="societies" or $myrow[0]=="visits" or $myrow[0]=="conferencies") {
// Formatting
// : means new record
// ~ means division between heading and body
$mydatalines=split(":",$myrow[2]); // Get all entries
if (substr($mydatalines[1],1,6)=="o info")
{
} else {
echo "".strtoupper($myrow[0])."
\n";
for ($ww = 1; $ww < count($mydatalines); $ww++) {
$currentrec=split("~",$mydatalines[$ww]);
echo "$currentrec[0]
$currentrec[1]
\n";
} // end for
} // endif education, experience, societies, visits and conferencies
}
if ($myrow[0]=="languages" or $myrow[0]=="interests") {
// No formatting, it is a paragraph
if (substr($myrow[2],1,6)=="o info") { } else {
echo "".strtoupper($myrow[0])."
\n";
echo "$myrow[2]
\n";
}
} // endif languages, interests
if ($myrow[0]=="specific") {
// No formatting, user must do it
if (substr($myrow[2],28,9)=="No inform") { } else {
echo "$myrow[2]\n"; }
} // endif specific
if ($myrow[0]=="selected publications" or $myrow[0]=="conference reports") {
// Formatting
// : means new record
$mydatalines=split(":",$myrow[2]); // Get all entries
if (substr($mydatalines[1],4,9)=="nformatio")
{
} else {
echo "".strtoupper($myrow[0])."
\n";
echo "\n";
for ($ww = 1; $ww < count($mydatalines); $ww++) {
echo "$mydatalines[$ww]\n";
} // end for
echo "
\n";
}
} // endif languages, interests
} // end while
mysql_close($ed); // Close connection to SQL Server (We have to save AlineA Batteries for long-life :-) )
// END: Now, Build Background Information
echo "
Top of this page | Back
\n";
}
// END: If asked for a profile, shows it!
?>