// Publications Script of Mario // General Variables $dbname="Mario"; $dbusername="Mario_mario"; $dbpassword="w23qsM5qws34A"; $tablename="publications"; ?>
"; echo "{"; echo "top.header.location='/publications/publicationshead.php3';"; echo "}"; echo ""; ?>// books & Thesisses INPUT $yearshtml[1]="Books and Thesissesffff
"; echo "$yearshtml[$showyear]"; echo ""; } ?>
// Output available years
$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 $tablename Group by Year Order by Year Desc");
$ybr=mysql_num_rows($result);
echo "![]() "; while ($myrow=mysql_fetch_array($result)) { echo "".$myrow[5]." "; } mysql_close($ed); echo " | ![]() |
// If loaded from menu.html, list last available Year publications
if (!isset($_GET['y'])) {
$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 $tablename Order by Year Asc");
while ($myrow=mysql_fetch_array($result))
{
if (!isset($_GET['last_known_year'])) {$last_known_year=$myrow[5];}else{$last_known_year=$_GET['last_known_year'];};
}
$y=$last_known_year;
} else {$y=$_GET['y'];}
if (!isset($_GET['auth'])) {
// Show page for years and authors
$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
// Show Years
if (!isset($_GET_['sortby'])) { $sortby='Journal'; } else {$sortby=$_GET_['sortby']; }
$qry="Select * from $tablename Where Year='$y' Order by $sortby Asc";
$hh="Listing publications for selected year (".$y.")";
// Show Journals
if ($sortby=='Year') { $sortby='Year Desc'; }
if (isset($_GET['jour'])) { $qry="Select * from $tablename Where Journal='".str_replace("_"," ",$jour)."' Order by $sortby"; $hh="Listing publications for selected journal (".str_replace("_"," ",$jour).")";}
else { $jour=$_GET['jour'];}
$result=mysql_db_query($dbname,$qry);
if ($sortby=='Year Desc') {$sortby='Year'; }
$pub=mysql_num_rows($result);
echo "".$hh.""; if ($pub==1) {echo "Found $pub article.";} else {echo "Found $pub articles.";} echo "
![]() "; echo "You can sort by: "; if ($sortby=='Journal') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Authors') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Title') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Files') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Year') { echo "Author | Title | Journal | Download availability | Year"; } echo" "; echo " ![]() |
no download available";} else {$files="
download document";}
echo "![]() "; echo "You can sort by: "; if (!isset($_GET['sortby'])) { $sortby='Journal'; } else {$sortby=$_GET['sortby'];} if ($sortby=='Journal') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Authors') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Title') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Files') { echo "Author | Title | Journal | Download availability | Year"; } if ($sortby=='Year') { echo "Author | Title | Journal | Download availability | Year"; $sortby='Year Desc';} $result=mysql_db_query($dbname,"Select * from $tablename Order by $sortby"); echo" "; echo " ![]() |

| ";
// Output available journals
$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 $tablename Group by Journal Order by Journal Asc");
$mbr=mysql_num_rows($result);
echo "Available Journals "; $ww=0; while ($myrow=mysql_fetch_array($result)) { $ww++; echo "".$myrow[3].""; if ($ww< $mbr) {echo ", ";} } mysql_close($ed); echo " |
| ";
// Output available authors
$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 Authors, ID from $tablename");
$sbr=mysql_num_rows($result);
echo "Available Authors "; $ca=-1; while ($myrow=mysql_fetch_array($result)) { $thispub = split(",",$myrow[0]); for ($ww = 0; $ww < count($thispub); $ww++) { $ca++; $allautors[$ca]=str_replace(" ","",$thispub[$ww]); } //for } mysql_close($ed); $allautors1=$allautors; sort($allautors1); reset($allautors1); $allautors = array(); $i = 0; $element = current($allautors1); for ($n=0;$n |
| ";
echo "Available Features "; echo "Add publications into the Database, Modify existing publications (requires authorized stuff)"; echo " |
| ";
echo "Automatic Information (Statistics) "; echo "Publishers: ".count($allautors).", "; echo "Publications: ".$sbr.", "; echo "Journals: ".$mbr.", "; echo "Years covered: ".$ybr.", "; echo "Available downloads: ".$dbr." "; echo " |