commit db07fe007274b06b3f3b3267d995d91cccf6aae1
Author: Petr Lukašík <lukasik@rtsoft.cz>
Date:   Sun Jun 9 00:43:10 2019 +0200

    Re #7581 přidána funkcionalita na odkazy ve vyhledávači

diff --git a/old/html/utf/t.php b/old/html/utf/t.php
deleted file mode 100644
index d24e4ee..0000000
--- a/old/html/utf/t.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<html>
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-  <title>Selected items from the Old Babylonian Text Corpus</title>
-</head>
-<body>
-<LINK REL=StyleSheet HREF="/utf/obtc1.css" TYPE="text/css" MEDIA="screen, print">
-<FONT FACE='Verdana' Color="#9bbad6">
-<h2><center>Selected items from the Old Babylonian Text Corpus</center></FONT></h2>
-<h3><FONT color=#8080ff face=Verdana size=4>List of items according to previous selection</FONT></h3>
-<?
-$status = true;
-  @$connection = Pg_Connect ("user=dbowner dbname=klinopis");
-  if (!$connection)
-	{
-    echo "There are probably too many querries, please try again later!";
-	}
-  else
-	{
-//  $radek2.="(";
-  $radek2.=$s;
-  $s = $radek2;
-  $apostroph = "ʾ";
-  $selection2 = ($s.=$apostroph);
-  $selection3 = ($s.=$apostroph);
-  $selection4 = ($s.=$apostroph);
-  echo "<FONT FACE=\"Arial Unicode MS\"><B>$radek2)</B></FONT><BR>";
-  $pod1 = "bookandchapter='$radek2' OR bookandchapter='$selection2' OR bookandchapter='$selection3' OR bookandchapter='$selection4'";
-  if (@$result = @Pg_Exec ("SELECT * FROM obtexts WHERE ($pod1) ORDER BY OID"))
-	{
-  if (($pocethesel = @Pg_NumRows ($result)) > 0)
-	{
-  echo "<FONT FACE='Arial Unicode MS' SIZE=3>There are $pocethesel lines of this text.\n<BR>";
-  echo "<table border=0 bgcolor=\"#ecece6\" cellspacing=0 cellpadding=3>";
-  echo "<tr><td><FONT color=#8080ff size=3><small>paragraph</small></td><td><FONT color=#8080ff size=4><small>transliteration</small></FONT></td></tr>";
-			for ($i = 0; $i < $pocethesel; $i++)
-				{
-					List ($bookandchapter,$paragraph,$transliteration) = Pg_Fetch_Row ($result, $i);
-          echo "<tr><td>$paragraph</td><td>$transliteration</td></tr>";
-				}
-echo "<td>$bookandchapter$paragraph)</td></tr>";
-				echo "</table>";
-			}
-			else
-				echo ("it looks like there is nothing! You can try another search with a part of an item.<br>$radek2");
-		}
-		else
-			echo ("Wow, sorry, too many queries, maybe try again later<br>");
-  Pg_Close($connection);
-}
-?>
-<BR>
-</FONT>
-</body>
-</html>
\ No newline at end of file
diff --git a/old/html/utf/utf/t.php b/old/html/utf/utf/t.php
new file mode 100644
index 0000000..a74ce91
--- /dev/null
+++ b/old/html/utf/utf/t.php
@@ -0,0 +1,48 @@
+<!--
+Odkazy jsou natvrdo v db, proto je tu tahle chujovina bokem... NEED URGENT REWORK!!!
+-->
+
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <title>Selected items from the Old Babylonian Text Corpus</title>
+</head>
+<body>
+<LINK REL=StyleSheet HREF="/utf/obtc1.css" TYPE="text/css" MEDIA="screen, print">
+<FONT FACE='Verdana' Color="#9bbad6">
+<h2><center>Selected items from the Old Babylonian Text Corpus</center></FONT></h2>
+<h3><FONT color=#8080ff face=Verdana size=4>List of items according to previous selection</FONT></h3>
+
+<?php
+$conn = new mysqli("filek.cz", "dbowner", "", "aswi-klinopis");
+$conn->set_charset("utf8");
+$conn->query("SET collation_connection = utf8_czech_ci");
+
+if ($conn->connect_error) {
+    die("Connection failed: " . $conn->connect_error);
+}
+$chain = substr($_GET["s"], 0, strlen($_GET["s"])-1);
+
+echo "<FONT FACE=\"Arial Unicode MS\"><B>$chain)</B></FONT><BR>";
+$query = "SELECT * FROM obtexts WHERE bookandchapter LIKE '%$chain%'";
+$result = $conn->query($query);
+
+if ($result->num_rows > 0) {
+    echo "<FONT FACE='Arial Unicode MS' SIZE=3>There are $result->num_rows lines of this text.\n<BR>";
+    echo "<table border=0 bgcolor=\"#ecece6\" cellspacing=0 cellpadding=3>";
+    echo "<tr><td><FONT color=#8080ff size=3><small>paragraph</small></td><td><FONT color=#8080ff size=4><small>transliteration</small></FONT></td></tr>";
+    for ($i = 0; $i < $result->num_rows; $i++) {
+        List ($bookandchapter,$paragraph,$transliteration) = mysqli_fetch_row($result);
+        echo "<tr><td>$paragraph</td><td>$transliteration</td></tr>";
+    }
+    echo "<td>$bookandchapter$paragraph)</td></tr>";
+    echo "</table>";
+}else{
+    echo "it looks like there is nothing! You can try another search with a part of an item.";
+}
+mysqli_close($conn);
+?>
+<BR>
+</FONT>
+</body>
+</html>
\ No newline at end of file
