Размер файла: 2.08Kb
<html>
<head><title>тЕДБЛФЙТПЧБОЙЕ ЪБРЙУЙ П MIDI ЖБКМЕ</title></head>
<body>
<?php
include '../wap/config.php';
if ($id=='') exit;
if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
exit;
};
pg_query($conn, "SET CLIENT_ENCODING TO 'KOI8';");
$res=pg_query($conn, "select id,name_eng,name_rus,category,path,enabled from midi where id=$id;");
$cres=pg_query($conn, "select id,name_eng,name_rus from cat order by id;");
$rows=pg_numrows($cres);
$enabled=1;
?>
<center><b>тЕДБЛФЙТПЧБОЙЕ</b></center>
<form action="file_update.php" method=post>
<input type=checkbox name="delete" value="1"> <b>хДБМЙФШ ЖБКМ ЙЪ ВБЪЩ</b><br><br>
<table>
<?php
print "<tr><td>бОЗМЙКУЛПЕ ОБЪЧБОЙЕ: </td><td><input type=text name=\"name_eng\" value=\"".pg_result($res,0,1)."\" size=60></td></tr>\n";
print "<tr><td>тХУУЛПЕ ОБЪЧБОЙЕ: </td><td><input type=text name=\"name_rus\" value=\"".pg_result($res,0,2)."\" size=60> <font size=1 face=arial>(оЕ ПВСЪБФЕМШОП)</font></td></tr>\n";
print "<tr><td>лБФЕЗПТЙС: </td><td><select name=\"category\" size=1>\n";
for ($i=0; $i<$rows; $i++) {
$catname=pg_result($cres,$i,2);
if ($catname=='') $catname=pg_result($cres,$i,1);
$catid=pg_result($cres,$i,0);
if (pg_result($res,0,3)==$catid)
print "<option value=\"".$catid."\" selected>".$catname."</option>\n";
else
print "<option value=\"".$catid."\">".$catname."</option>\n";
}
print "</select></td></tr>\n";
print "<tr><td>рХФШ Л ЖБКМХ: </td><td><input type=text name=\"path\" value=\"".pg_result($res,0,4)."\" size=60></td></tr>\n";
if (pg_result($res,0,5)==1)
print "<tr><td></td><td><input type=checkbox name=\"enabled\" value=\"1\" checked> рХВМЙЛПЧБФШ ЖБКМ</td></tr>\n";
else
print "<tr><td></td><td><input type=checkbox name=\"enabled\" value=\"1\"> рХВМЙЛПЧБФШ ЖБКМ</td></tr>\n";
print "</table>\n";
print "<input type=hidden name=\"id\" value=\"".pg_result($res,0,0)."\">\n";
pg_close($conn);
?>
<input type=submit value="пВОПЧЙФШ">
<input type=reset value="пЮЙУФЙФШ">
</form>
</body>
</html>