"") {$ziel="http://pc55w3.wiso.uni-augsburg.de/journals.html?searchstring=$suche&logik=$logik";} else {$ziel="http://pc55w3.wiso.uni-augsburg.de/journals.html";}; // echo "\n"; $Titel = "Journal Info"; $search = true; if ($searchstring<>"") {$suchwoerter=split(" +",$searchstring);} else {$search=false;}; $Bedingung=""; // maximum number of results to display $results = 2000; // Die folgenden Zeilen wegen alter Suchformulare if (($log <> "And") && ($log <> "Or")) $logik="And"; if ($log == "1") $logik = "And"; if ($log =="0") $logik = "Or"; function mache_bedingung( $wort ) { global $Bedingung; global $logik; If ($Bedingung <>"") $Bedingung = $Bedingung . " " . $logik ." "; $Bedingung = $Bedingung . "(JournalID=". $wort .")"; } function highlight($zeile){ global $suchwoerter; $m=0; $n=0; $anfang[0]=0; $ende[0]=0; while ($suchwoerter[$m]) { $wort[$m] = strtolower($suchwoerter[$m]); $hzeile = strtolower($zeile); $position=0; while (strstr($hzeile, $wort[$m])) { $n++; $anfang[$n]=$position+strpos($hzeile, $wort[$m])+1; $ende[$n]=$anfang[$n] + strlen($wort[$m])-1; $position=$ende[$n]; $hzeile=substr($hzeile, strpos($hzeile, $wort[$m])+strlen($wort[$m])); }; $m++; }; sort($anfang); sort($ende); $n=1; while ($anfang[$n+1]) { if ($anfang[$n+1]<=$ende[$n]) $anfang[$n+1]=$ende[$n]+1; $n++; } $n=0; $hzeile=""; while ($anfang[$n+1]) { $n++; if ($anfang[$n]==$ende[$n-1]) {$sub=0;} else {$sub=1;} $hzeile=$hzeile.htmlentities(substr($zeile,$ende[$n-1],$anfang[$n]-$ende[$n-1]-$sub)).""; $hzeile=$hzeile.htmlentities(substr($zeile,$anfang[$n]-1,$ende[$n]+1-$anfang[$n])).""; } $hzeile=$hzeile.htmlentities(substr($zeile,$ende[$n],strlen($zeile)-$ende[$n])); $zeile=$hzeile; return $zeile; } function print_record() { global $Description, $Name, $Sec_Title, $eJournal, $Info, $Announcement, $ToC, $Link2, $Comment, $Link2Content, $Publisher, $Result, $i; $Description=mysql_result($Result,$i,"Description"); $eJournal=mysql_result($Result,$i,"eJournal"); $Info=mysql_result($Result,$i,"Info"); $Announcement=mysql_result($Result,$i,"Announcement"); $ToC=mysql_result($Result,$i,"ToC"); $Abstracts=mysql_result($Result,$i,"Abstracts"); $Articles=mysql_result($Result,$i,"Articles"); $Link2=mysql_result($Result,$i,"Link2"); $Link2Content=mysql_result($Result,$i,"Link2Content"); $Comment=mysql_result($Result,$i,"Comment"); $Name=mysql_result($Result,$i,"Name"); $Sec_Title=mysql_result($Result,$i,"2nd_Title"); $Publisher=mysql_result($Result,$i,"Publisher"); $Verlag=urlencode($Publisher); // $Description=highlight($Description); // $Name=highlight($Name); echo "
"; echo ""; echo $Name. ""; if ($eJournal == 1) {echo " (eJournal)";} echo "
"; if ($Sec_Title <> "") echo "$Sec_Title"; if ($Description <> "") echo "

"" . $Description . ""

"; echo "

Online: "; if ($Info == 1) echo "Journal information. "; if ($Announcement <> "") echo "Journal announced for $Announcement. "; if ($ToC <> "") echo "Tables of contents $ToC. "; if ($Abstracts <> "") echo "Abstracts $Abstracts. "; if ($Articles <> "") echo "Free full text articles $Articles "; if (($Link2 <> "") || ($Comment <> "")) echo "
Links & Hints: "; if ($Link2 <> "") echo "$Link2Content"; if (($Link2 <> "") && ($Comment <> "")) echo "| "; if ($Comment <> "") echo $Comment; if ($Publisher <> "") echo "
Publisher: $Publisher (more)."; echo "

\n"; } If (sizeof($suchwoerter)>0) { array_walk( $suchwoerter, 'mache_bedingung' ); $Bedingung = "WHERE " . $Bedingung; } else { $Bedingung = ""; } $SQLStmt = "SELECT JournalID, Name, Description, eJournal, Info, ToC, Announcement, Abstracts, Articles, Link2, Link2Content, Comment, 2nd_Title, Publisher, Trans, Geronto, Health, Linguistic, Methode, Pedagogical, Perception, Personality, Psychiatry, Psychoanalysis, Social, Sociology, Family, Cognitive, AI, Animal, Child, Developmental, Economic, Experimental, Clinical FROM journals " . $Bedingung . " ORDER BY Name"; mysql_connect($host,$user,$passwd) ; $Result = MYSQL($Dbname,$SQLStmt); $Result_count = MYSQL_NUM_ROWS($Result); $SQLStmt2 = "SELECT * FROM journals"; $Result2 = MYSQL($Dbname,$SQLStmt2); $DB_size = MYSQL_NUM_ROWS($Result2); ?> PSYCLINE: Your Guide to Psychology and Social Science Journals on the Web

"; If (sizeof($suchwoerter)>0) { if ($Result_count > $results) { echo "More than $results journal(s) found! First $results journals shown."; } else { echo "$Result_count journal(s) found. $DB_size journals in database."; }; } else { echo "No search launched. Missing keyword(s)!"; } echo "

\n"; $i = 0; // countervariable WHILE ( ($i < $Result_count) && ($i < $results) && ($search)){ print_record(); $i++; } ?>
armin.guenther@psycline.org © Armin Günther