1 |
6daefa8c
|
Petr Lukašík
|
<?
|
2 |
|
|
@$spojeni = Pg_Connect ("user=dbowner dbname=klinopis");
|
3 |
|
|
if (! $spojeni)
|
4 |
|
|
{
|
5 |
|
|
echo ("Sorry, it was impossible to connect to the database, try later!<BR>\n");
|
6 |
|
|
exit;
|
7 |
|
|
}
|
8 |
|
|
if (@Pg_Exec ($spojeni, "UPDATE graf01 SET scteni='$scteni', lcteni='$lcteni' WHERE (oid='$oid')"))
|
9 |
|
|
echo ("Sign item saved OK:<br>\n");
|
10 |
|
|
else
|
11 |
|
|
{
|
12 |
|
|
echo ("An error occured, item change was not saved !\n");
|
13 |
|
|
}
|
14 |
|
|
@$result = Pg_Exec(
|
15 |
|
|
"select gnazev, bcislo01, scteni, lcteni from graf01 WHERE oid='$oid'");
|
16 |
|
|
if (!$result):
|
17 |
|
|
echo "An error occured!";
|
18 |
|
|
break;
|
19 |
|
|
endif;
|
20 |
|
|
echo "<BR>";
|
21 |
|
|
@$result2 = Pg_Exec(
|
22 |
|
|
"select gnazev, bcislo01, scteni, lcteni from graf01 WHERE oid='$oid'");
|
23 |
|
|
echo "<table border=1>";
|
24 |
|
|
echo "<tr><td><center>ABZ number</center></td><td><center><b>sign name</b></center></td><td><center><b><small>logographic reading</small></b></center></td><td>syllabic reading</td></tr>";
|
25 |
|
|
for ($j=0; $j < Pg_NumRows($result2); $j++):
|
26 |
|
|
$zaznam = Pg_Fetch_Array($result2, $j);
|
27 |
|
|
echo ("<tr><td>".$zaznam["bcislo01"]."</td><td><FONT FACE='Arial Unicode MS' color=#3399ff SIZE=2>".$zaznam["gnazev"]."</font></td><td><FONT FACE='Arial Unicode MS' color=#3399ff SIZE=3>".$zaznam["lcteni"]."</FONT></td><td><FONT FACE='Arial Unicode MS' SIZE=3>".$zaznam["scteni"]."</FONT></td></tr>\n");
|
28 |
|
|
endfor;
|
29 |
|
|
echo "</table>";
|
30 |
|
|
Pg_Close ($spojeni);
|
31 |
|
|
?>
|
32 |
|
|
<form>
|
33 |
|
|
<INPUT TYPE="Button" VALUE="Bring me back to select other sign item" onClick="history.go(-2)">
|
34 |
|
|
</form>
|