Literaturseminar / Literature seminar - Detail

Debug messages from network_approved function: '; echo '
'; echo ' IP-number: ',$client_ip,'
'; echo ' DNS name: ', $client_useraddr,'
'; echo ' Octets: ', $client_ip_arr[0],' ',$client_ip_arr[1],' ',$client_ip_arr[2],' ',$client_ip_arr[3],'
'; echo ' Retval: ', $retval,'
( Access '; if ($retval=='0') echo 'not '; echo 'allowed )'; } return $retval; } function checkdoi($doistring,$dbg) { $retval=0; // Rules for valid Digital Object Identifier (according ISO 26324) // 0) Logical length > 10 // 1) Starting with "10." // 2) "/" is at position 8 // 3) Value in from string pos 4 bis 7 is >=1000 if (strlen($doistring)>10) if(strncmp($doistring,'10.',3)==0) if(substr_compare($doistring, '/',7,1)==0) if(intval(substr($doistring,3,4))>=1000) $retval=1; if($dbg==1) { echo 'strlen: ',strlen($doistring),' '; echo ' strncmp: ',strncmp($doistring,'10.',3),' '; echo ' substr_comp: ',substr_compare($doistring, '/',7,1),' '; echo ' intval: ',intval(substr($doistring,3,4)),' '; echo ' substr: ',substr($doistring,3,4),' '; echo ' returnvalue:', $retval; } return $retval; } function url_ok($urlstring,$dbg) { $retval=0; $retval=1; if($dbg==1) { echo ' returnvalue: ',$retval,' '; } return $retval; } header('Content-Type: text/html; charset=ISO-8859-1'); if (isset($_GET["litid"])) { // Establish dataBase link $mysqli = mysqli_connect("db13.zim.uni-duisburg-essen.de","hp0052","Mvxod0n7rzuB","hp0052_1"); if (!mysqli_connect_errno()) { //$_GET["litid"] //filter_input(INPUT_GET, "litid", FILTER_VALIDATE_INT) $SelectString = 'SELECT * FROM Literatur WHERE zaehler='.strip_tags($_GET["litid"]); $Ergebnis=mysqli_query($mysqli, $SelectString); $db_output=mysqli_fetch_assoc($Ergebnis); if($db_output) { echo ''; echo ''; echo ''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo ''; echo ''; echo ''; if(network_approved(0)==1) { echo ''; echo ''; echo ''; echo ''; } echo ''; echo '',''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo '',''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
ParameterWert
Datum',$db_output["datum"],'
Semester',$db_output["semester"],'
Sprecher',$db_output["sprecher"],'
Titel',$db_output["titel"],'
Referenz',$db_output["text"],'
DOI'; if (checkdoi($db_output["doi"],0)==1) { echo 'DOI'; } else { echo $db_output["doi"]; } echo '
Link/s'; if(url_ok($db_output["link"],0)==1) { $links = preg_split("/[;,]/",$db_output["link"]); for ($counter=0;$counter0) { $pathextension=pathinfo($links[$counter],PATHINFO_EXTENSION); echo ''; echo 'Link '; if (count($links)>1) echo $counter+1; if (strlen($pathextension)>0) { if (($pathextension=="pdf") || ($pathextension=="ppt") || ($pathextension=="pptx")) echo ' (',$pathextension,')'; } echo '
'; } else echo '-'; } } else { if (strlen($db_output["link"])>0) echo $db_output["link"]; else echo '-'; } echo '
Info 1',$db_output["info1"],'
Info 2',$db_output["info2"],'
Sprache'; if ($db_output["sprache"]=="DEU") { echo 'Deutsch'; } elseif ($db_output["sprache"]=="ENU") { echo 'Englisch'; } else { echo 'Unspezifiziert'; } echo '
Geändert',$db_output["zeitstempel"],'
'; echo '

'; echo '
'; echo '
(funktioniert nur unter bestimmten Bedingungen!)
'; } else echo 'Datensatz existiert nicht!'; mysqli_close($mysqli); } else echo '

Datenbankfehler!
Bitte später erneut versuchen!

'; } else echo 'Parameterfehler !'; ?>