1
|
<?
|
2
|
include "autorizace.inc.php";
|
3
|
ksa_authorize();
|
4
|
//if ($auth_level == 0) ksa_unauthorized();
|
5
|
if ($auth_level < 10) ksa_unauthorized();
|
6
|
?>
|
7
|
<html>
|
8
|
<head>
|
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
10
|
<title>Selected items from the Old Babylonian Dictionary</title>
|
11
|
</head>
|
12
|
<body>
|
13
|
<FONT FACE='Verdana' Color="#9bbad6">
|
14
|
<h2><center>Selected items from the Old Babylonian Dictionary</center></FONT></h2>
|
15
|
<h3><FONT color=#8080ff face=Verdana size=4>List of items according to previous selection</FONT></h3>
|
16
|
<?
|
17
|
$status = true;
|
18
|
@$connection = Pg_Connect ("user=dbowner dbname=klinopis");
|
19
|
if (!$connection)
|
20
|
{
|
21
|
echo "There are probably too many querries, please try again later!";
|
22
|
}
|
23
|
else
|
24
|
{
|
25
|
$chain2 = URLDecode ($chain);
|
26
|
echo "<FONT FACE=\"Arial Unicode MS\">Searched item: <b>$chain2</b> </FONT><BR>";
|
27
|
$pod1 = "(text1 like ' $chain2%')";
|
28
|
if (@$result = @Pg_Exec (
|
29
|
"SELECT oid, item, text1, text2, autor, datum FROM obdict WHERE ($pod1) ORDER BY item ASC"))
|
30
|
{
|
31
|
if (($pocethesel = @Pg_NumRows ($result)) > 0)
|
32
|
{
|
33
|
echo "<FONT FACE=\"Arial Unicode MS\" SIZE=3>$pocethesel item(s) found.\n<BR>";
|
34
|
echo "<table border=0 bgcolor=\"#ecece6\" cellspacing=0 cellpadding=3>";
|
35
|
echo "<tr><td><FONT color=#8080ff size=3><small>item</small></td><td><FONT color=#8080ff size=4><small>provisional dictionary definition</small></FONT></td><td><FONT color=#8080ff size=4><small>last author</SMALL></FONT></TD></tr>";
|
36
|
for ($i = 0; $i < $pocethesel; $i++)
|
37
|
{
|
38
|
List ($oid, $item, $text1, $text2, $autor, $datum) = Pg_Fetch_Row ($result, $i);
|
39
|
echo "<tr><td>$item <td>$text1</td><td><small>$autor</small></td><td><small>$datum</small></td>
|
40
|
<td> <a href=\"/autor/obdict/obdictdelete.php?co=$oid\">edit</a></td></tr>";
|
41
|
}
|
42
|
echo "</table>";
|
43
|
}
|
44
|
else
|
45
|
echo "Sorry, this item is not yet written in this dictionary. Try to write <FONT FACE=\"Arial Unicode MS\" SIZE=3>$chain2</FONT>, thanks.<FORM ACTION=\"/autor/obdict/obdictnew1.php\" METHOD=\"post\" ACCEPT-CHARSET=\"utf-8\" enctype=\"multipart/form-data\"><input type=hidden name=item value=\"$chain2\"><? $chain2 = URLencode ($chain2); ?><BR><input type=submit value=\"write new dictionary item $item\"></FORM>";
|
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>
|