Projekt

Obecné

Profil

« Předchozí | Další » 

Revize db07fe00

Přidáno uživatelem Petr Lukašík před téměř 6 roky(ů)

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

Zobrazit rozdíly:

old/html/utf/t.php
1
<html>
2
<head>
3
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4
  <title>Selected items from the Old Babylonian Text Corpus</title>
5
</head>
6
<body>
7
<LINK REL=StyleSheet HREF="/utf/obtc1.css" TYPE="text/css" MEDIA="screen, print">
8
<FONT FACE='Verdana' Color="#9bbad6">
9
<h2><center>Selected items from the Old Babylonian Text Corpus</center></FONT></h2>
10
<h3><FONT color=#8080ff face=Verdana size=4>List of items according to previous selection</FONT></h3>
11
<?
12
$status = true;
13
  @$connection = Pg_Connect ("user=dbowner dbname=klinopis");
14
  if (!$connection)
15
	{
16
    echo "There are probably too many querries, please try again later!";
17
	}
18
  else
19
	{
20
//  $radek2.="(";
21
  $radek2.=$s;
22
  $s = $radek2;
23
  $apostroph = "ʾ";
24
  $selection2 = ($s.=$apostroph);
25
  $selection3 = ($s.=$apostroph);
26
  $selection4 = ($s.=$apostroph);
27
  echo "<FONT FACE=\"Arial Unicode MS\"><B>$radek2)</B></FONT><BR>";
28
  $pod1 = "bookandchapter='$radek2' OR bookandchapter='$selection2' OR bookandchapter='$selection3' OR bookandchapter='$selection4'";
29
  if (@$result = @Pg_Exec ("SELECT * FROM obtexts WHERE ($pod1) ORDER BY OID"))
30
	{
31
  if (($pocethesel = @Pg_NumRows ($result)) > 0)
32
	{
33
  echo "<FONT FACE='Arial Unicode MS' SIZE=3>There are $pocethesel lines of this text.\n<BR>";
34
  echo "<table border=0 bgcolor=\"#ecece6\" cellspacing=0 cellpadding=3>";
35
  echo "<tr><td><FONT color=#8080ff size=3><small>paragraph</small></td><td><FONT color=#8080ff size=4><small>transliteration</small></FONT></td></tr>";
36
			for ($i = 0; $i < $pocethesel; $i++)
37
				{
38
					List ($bookandchapter,$paragraph,$transliteration) = Pg_Fetch_Row ($result, $i);
39
          echo "<tr><td>$paragraph</td><td>$transliteration</td></tr>";
40
				}
41
echo "<td>$bookandchapter$paragraph)</td></tr>";
42
				echo "</table>";
43
			}
44
			else
45
				echo ("it looks like there is nothing! You can try another search with a part of an item.<br>$radek2");
46
		}
47
		else
48
			echo ("Wow, sorry, too many queries, maybe try again later<br>");
49
  Pg_Close($connection);
50
}
51
?>
52
<BR>
53
</FONT>
54
</body>
55
</html>
old/html/utf/utf/t.php
1
<!--
2
Odkazy jsou natvrdo v db, proto je tu tahle chujovina bokem... NEED URGENT REWORK!!!
3
-->
4

  
5
<html>
6
<head>
7
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8
  <title>Selected items from the Old Babylonian Text Corpus</title>
9
</head>
10
<body>
11
<LINK REL=StyleSheet HREF="/utf/obtc1.css" TYPE="text/css" MEDIA="screen, print">
12
<FONT FACE='Verdana' Color="#9bbad6">
13
<h2><center>Selected items from the Old Babylonian Text Corpus</center></FONT></h2>
14
<h3><FONT color=#8080ff face=Verdana size=4>List of items according to previous selection</FONT></h3>
15

  
16
<?php
17
$conn = new mysqli("filek.cz", "dbowner", "", "aswi-klinopis");
18
$conn->set_charset("utf8");
19
$conn->query("SET collation_connection = utf8_czech_ci");
20

  
21
if ($conn->connect_error) {
22
    die("Connection failed: " . $conn->connect_error);
23
}
24
$chain = substr($_GET["s"], 0, strlen($_GET["s"])-1);
25

  
26
echo "<FONT FACE=\"Arial Unicode MS\"><B>$chain)</B></FONT><BR>";
27
$query = "SELECT * FROM obtexts WHERE bookandchapter LIKE '%$chain%'";
28
$result = $conn->query($query);
29

  
30
if ($result->num_rows > 0) {
31
    echo "<FONT FACE='Arial Unicode MS' SIZE=3>There are $result->num_rows lines of this text.\n<BR>";
32
    echo "<table border=0 bgcolor=\"#ecece6\" cellspacing=0 cellpadding=3>";
33
    echo "<tr><td><FONT color=#8080ff size=3><small>paragraph</small></td><td><FONT color=#8080ff size=4><small>transliteration</small></FONT></td></tr>";
34
    for ($i = 0; $i < $result->num_rows; $i++) {
35
        List ($bookandchapter,$paragraph,$transliteration) = mysqli_fetch_row($result);
36
        echo "<tr><td>$paragraph</td><td>$transliteration</td></tr>";
37
    }
38
    echo "<td>$bookandchapter$paragraph)</td></tr>";
39
    echo "</table>";
40
}else{
41
    echo "it looks like there is nothing! You can try another search with a part of an item.";
42
}
43
mysqli_close($conn);
44
?>
45
<BR>
46
</FONT>
47
</body>
48
</html>

Také k dispozici: Unified diff