"; $sTemp=explode("=",$res[$count]); //echo $sTemp[0]." ".$sTemp[1]."
"; if (isset($sTemp[1])) { //echo $sTemp[0]." ".$sTemp[1]."
"; //echo $sTemp[0]."--->".$sTemp[1]."
"; switch ($sTemp[0]) { case "cboAuthor": break; case "cboSearch": if ($sTemp[1]!="All") { //echo "User nicht hat All gew�hlt
"; $sTemp2="TYPE = '".$sTemp[1]."'"; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "refid": if ($sTemp[1]!="") { //$sTemp2="ID = '".$sTemp[1]."'"; $sTemp2="ID = ".$sTemp[1].""; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "author": if ($sTemp[1]!="") { $sTemp2=""; $sFindInWhat=explode("=",$res[2]); //echo $sFindInWhat[1]."
"; switch ($sFindInWhat[1]) { case "ED": $sTemp2=" Editors LIKE '%".$sTemp[1]."%'"; break; case "AUTH": $sTemp2=" Authors LIKE '%".$sTemp[1]."%'"; break; case "AUTHED": $sTemp2=" (Authors LIKE '%".$sTemp[1]."%' OR Editors LIKE '%".$sTemp[1]."%')"; break; } if ($sSQL=="") { $sSQL=$sTemp2; //echo "
-1 ".$sSQL."
"; } else { $sSQL=$sSQL." AND ".$sTemp2; //echo "
-2 ".$sSQL."
"; } } break; case "title": if ($sTemp[1]!="") { $sTemp2=" TITLE_1 LIKE '".$sTemp[1]."%'"; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "periodical": if ($sTemp[1]!="") { $sTemp2=" PERIODICAL LIKE '".$sTemp[1]."%'"; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "keywords": if ($sTemp[1]!="") { $sTemp2=" KEYWORDS LIKE '%".$sTemp[1]."%'"; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "ISBN": if ($sTemp[1]!="") { $sTemp2=" ISBN LIKE '%". $sTemp[1]. "%' OR ISSN LIKE '%".$sTemp[1]."%'"; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "language": if ($sTemp[1]!="") { $sTemp2=" LANGUAGE LIKE '%".$sTemp[1]."%'"; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "congress": if ($sTemp[1]!="") { $sTemp2=" CONGRESS LIKE '%".$sTemp[1]."%'"; if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } } break; case "pubyear": if ($sTemp[1]!="") { $sFieldValue=explode("-",$sTemp[1]); if (count($sFieldValue)==2){ $sTemp2=" (PUB_YEAR >= ".$sFieldValue[0]." AND PUB_YEAR <= ".$sFieldValue[1].")"; } else { $sTemp2=" PUB_YEAR = ".$sTemp[1]; } if ($sSQL=="") { $sSQL=$sTemp2; } else { $sSQL=$sSQL." AND ".$sTemp2; } break; } } } //else { //echo "ich bin hier"; //} //else //{ // echo $sTemp[0]."---> leer
"; //} } //echo "
RESULT: ".$sSQL; //echo $sSQL."
"; if ($sSQL=="") { $sSQL=""; } return $sSQL; } function getUser($sUserName,$sPassWord,$sSQL) { $db=ConnectToDB(); //$dbName="usr_web617_1"; $dbName="ba50"; //$dbName="hemiptera"; $sSQL="select * from customer where username = '" . $sUserName . "' and userpwd = '" . $sPassWord & "';"; $res = mysql_db_query($dbName, $sSQL); if (!$res) { return $sSQL; exit; } else { return "OK"; exit; } } function makeSQLNew($sFieldName,$sFieldValue ,$myCriteria, $nDataType) { $sRetVal=""; switch ($sFieldName){ case "ID": if ($myCriteria!=""){ $sRetVal=$sFieldName."=".$sFieldValue; } else { $sRetVal=$myCriteria." AND ".$sFieldName."=".$sFieldValue; } case "Author": if ($myCriteria!=""){ } } return $sRetVal; } function umlaute($text) { //$search = array ('�', '�', '�', '�'); //$replace = array ('ä', 'ö', 'ü', 'ss'); $search = array ('-','�','�','�','+','�','+','�','+','�','-','�','�','�','�','�','�','�','+','�','-','�','+','�','�','�','�','-','�','�','�','-','�','+','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','=','�','�','i','�','�','�','�','�','�','�','�','�','�','�','+','�','�','�','+','�','_','�','�','�','�','�','�'); $replace = array ('Â','â','Æ','æ','À','à','Å','å','Ã','ã','Ä','ä','Ç','ç','¸','¢','ˆ','©','É','é','Ê','ê','È','è','∅','Ð','ð','Ë','ë','€','ƒ','Í','í','Î','î','¡','Ì','ì','Ï','ï','Ñ','ñ','Ó','ó','Ô','ô','Œ','œ','Ò','ò','Ø','ø','Õ','õ','Ö','ö','¶','‰','£','®','Š','š','§','ß','Ú','ú','Û','û','Ù','ù','Ü','ü','Ý','ý','¥','Ÿ','ÿ'); $str = str_replace($search, $replace, $text); return $str; } function makeSQL($sFieldName,$sFieldValue ,$myCriteria, $nDataType,$nSearchWhat) { /*echo $sFieldName; echo "
"; echo $sFieldValue; echo "
"; echo $myCriteria; echo "
"; echo $nDataType; echo "
"; echo $nDataType; echo "
"; echo $nSearchWhat; echo "
";*/ if ($sFieldValue !=""){ if ($myCriteria !=""){ if ($sFieldValue == "Editors" and $nSearchWhat==1) { $myCriteria = $myCriteria." OR "; } else { $myCriteria = $myCriteria." AND "; } } } switch ($nDataType){ case "0" : $myCriteria = $myCriteria.$sFieldName." LIKE '".$sFieldValue."%'"; case "1" : //myCriteria = $myCriteria.$sFieldName." LIKE '".$sFieldValue."%'" $teile = explode(" ", $sFieldValue); //echo $schluesselwoerter; case "2" : $myCriteria = $myCriteria.$sFieldName." = ".$sFieldValue; //echo "
bin jetzt hier".$myCriteria."
"; } return $myCriteria; } function data_output($result) { $anz=mysql_num_fields($result); $breit=100/$anz."%"; $num = mysql_num_rows($result); echo "

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; for ($j = 0; $j < $num; $j++) { $row = mysql_fetch_array($result); $fn="ID"; $fn2="AUTHORS"; $fn3="PUB_YEAR"; $fn4="TITLE_1"; echo ""; echo ""; echo ""; echo ""; echo ""; // // // echo ""; //echo "
Ref. IDAuthorsYearTitle
$row[$fn]$row[$fn2]$row[$fn3]$row[$fn4]   
"; //echo ""; //echo ""; //echo ""; //echo "
"; //echo "

$row[$fn] $row[$fn2] $row[$fn3] $row[$fn4]

"; //echo "

EMail: $row[$fn]

"; //echo "

$row[$fn]


"; } echo ""; } function send_sql($db, $sql) { if (! $res=mysql_db_query($db, $sql)) { echo mysql_error(); exit; } return $res; } function data_output_incomplete($result,$nType) { $anz=mysql_num_fields($result); $breit=100/$anz."%"; $num = mysql_num_rows($result); //echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "Records found: $num"; //echo ""; echo "
"; //echo "
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; for ($j = 0; $j < $num; $j++) { $row = mysql_fetch_array($result); $fn="ID"; $fn2="AUTHORS"; $fn3="PUB_YEAR"; $fn4="TITLE_1"; $fn5="NOTES"; $fn6="EDITORS"; if ($row[$fn2]<>"") { if ($row[$fn6]<>"") { $sValue=$row[$fn6]; //echo $sValue . "
"; //$sValue= umlaute($sValue); //080707 //echo $sValue . "
"; //071111 //Vergessen $sValue2=$row[$fn2]; //$sValue2= umlaute($sValue2); //080707 //$AuthEd="Author: ".$row[$fn2] . "
Editor: ". $row[$fn6]; $AuthEd="Authors: ".$sValue2 . "
Editor: ". $sValue; } else { $sValue=$row[$fn2]; //$sValue= umlaute($sValue); //080707 //$AuthEd="Author: ".$row[$fn2]; $AuthEd="Author: ".$sValue; } } else { $sValue=$row[$fn6]; //$sValue= umlaute($sValue); //080707 //$AuthEd="Editor: ".$row[$fn6]; $AuthEd="Editor: ".$sValue; } $sValue=$row[$fn4]; // $sValue= umlaute($sValue); //080707 $sValue=str_replace("<", "", "", $sValue); $sValue=str_replace("", $sValue); $Ausgabe=$sValue; if ($nType=="0") { echo " "; } else { echo " "; } //$row[$fn4] = Ausgabe /* */ echo ""; /*if ($j%2==0 ){ echo ""; echo ""; echo ""; echo ""; } else { echo ""; echo ""; echo ""; echo ""; } // // // echo ""; */ //echo "
 Ref. ID Authors Year Title
$AuthEd $row[$fn3] $Ausgabe
$AuthEd $row[$fn3] $Ausgabe
BOOK 10924 Caroli a Linne systema naturae ex editions duodeci...   1722   Auchenorrhyncha; Cercopoidea; Cicada; Descriptions...   1 240             Linn+�, Carl von; Beckmann, Johann   G+�ttingen Vandenhoeck Latin                       1. Regnum animale               1722 NULL
$row[$fn2]
$row[$fn6]
$row[$fn3]$row[$fn4]$row[$fn2]
$row[$fn6]
$row[$fn3]$row[$fn4]   
"; //echo ""; //echo ""; //echo ""; //echo "
"; //echo "

$row[$fn] $row[$fn2] $row[$fn3] $row[$fn4]

"; //echo "

EMail: $row[$fn]

"; //echo "

$row[$fn]


"; } echo ""; echo "
"; } function data_output_faq($result) { $anz=mysql_num_fields($result); $breit=100/$anz."%"; $num = mysql_num_rows($result); for ($j = 0; $j < $num; $j++) { $row = mysql_fetch_array($result); $fn="Question"; $fn2="Answer"; echo "Question : ".$row[$fn]; echo "
"; echo "   Answer : ".$row[$fn2]; } } /* If nDataType = 0 Then 'myCriteria = myCriteria & sFieldName & " LIKE '" & sFieldValue & "%'" myCriteria = myCriteria & sFieldName & " LIKE '" & sFieldValue & "*'" ElseIf nDataType = 1 Then ' sVal = Split(sFieldValue, " ") 'sVal = Split(sFieldValue, "AND") 'sVal = Split(sFieldValue, ",") If UBound(sVal) >= 1 Then 'sMultiVal = sFieldName & " LIKE '%" & sVal(0) & "%'" sMultiVal = sFieldName & " LIKE '*" & sVal(0) & "*'" For i = 1 To UBound(sVal) sMultiVal = sMultiVal & " OR " & sFieldName & " LIKE '*" & sVal(i) & "*'" Next i If sFieldName = "Title_1" Then sTmp = sMultiVal sMultiVal = "" sMultiVal = "JOURNAL LIKE '*" & sVal(0) & "*'" For i = 1 To UBound(sVal) sMultiVal = sMultiVal & " AND JOURNAL LIKE '*" & sVal(i) & "*'" Next i myCriteria = myCriteria & "(" & sTmp & " OR " & sMultiVal & ")" 'myCriteria = myCriteria & "(" & sMultiVal & ")" Else myCriteria = myCriteria & "(" & sMultiVal & ")" End If Else 'myCriteria = myCriteria & sFieldName & " LIKE '%" & sFieldValue & "%'" If sFieldName = "ISBN" Then myCriteria = myCriteria & "(ISBN LIKE '*" & sFieldValue & "*' OR ISSN LIKE '*" & sFieldValue & "*')" Else myCriteria = myCriteria & sFieldName & " LIKE '*" & sFieldValue & "*'" 'myCriteria = myCriteria & sFieldName & " LIKE '" & sFieldValue & "*'" End If End If 'myCriteria = myCriteria & sFieldName & " LIKE '*" & sFieldValue & "*'" ElseIf nDataType = 2 Then myCriteria = myCriteria & sFieldName & " = " & sFieldValue ElseIf nDataType = 3 Then n = 0 n = n + InStr(1, UCase(sFieldValue), " AND ") n = n + InStr(1, UCase(sFieldValue), " OR ") n = n + InStr(1, UCase(sFieldValue), " NOT ") sVal = Split(sFieldValue, " ") If UBound(sVal) > 0 And n > 0 Then myCriteria = myCriteria & "(" For i = 0 To UBound(sVal) Select Case UCase(sVal(i)) Case "AND", "OR" myCriteria = myCriteria & " " & sVal(i) & " " Case "NOT" myCriteria = myCriteria & " AND " Case Else If i > 0 Then If UCase(sVal(i - 1)) = "NOT" Then myCriteria = myCriteria & sFieldName & " <> '" & sVal(i) & "'" Else myCriteria = myCriteria & sFieldName & " LIKE '*" & sVal(i) & "*'" End If Else myCriteria = myCriteria & sFieldName & " LIKE '*" & sVal(i) & "*'" End If End Select 'myCriteria = myCriteria & sFieldName & " LIKE '*" & sFieldValue & "*'" Next i myCriteria = myCriteria & ")" Else myCriteria = myCriteria & sFieldName & " LIKE '*" & sFieldValue & "*'" End If ElseIf nDataType = 4 Then If InStr(1, sFieldValue, "-") > 0 Then 'Eine Angabe von Bis ist erfolgt ParseString sFieldValue, vaValues, "-" If UBound(vaValues) > 1 Then myCriteria = myCriteria & " (" & sFieldName & " >= " & vaValues(1) & " AND " & sFieldName & " <= " & vaValues(2) & ")" End If Else myCriteria = myCriteria & sFieldName & " = " & sFieldValue End If End If End If Resume_Err_Handler: Exit Sub Err_Handler: DefErrHandler Me.Name, "makeSQL", Err.Number, Err.Description Resume Resume_Err_Handler End Sub */ ?> hemiptera

Navigation

Links