File size: 683B
<?php
include '../wap/config.php';
if ($id==0) exit;
if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
exit;
};
if ($delete==1) {
pg_query($conn, "delete from chat_tags where id=$id;");
pg_close($conn);
header("Location: tags.php");
exit;
}
if (($tag=='')||($txt=='')) {
print "<html><head><title>пЫЙВЛБ</title></head><body>оЕ ЧУЕ ДБООЩЕ ЧЧЕДЕОЩ</body></html>";
pg_close($conn);
exit;
}
$res=pg_query($conn,"SET CLIENT_ENCODING TO 'KOI8';");
$res=pg_query($conn,"update chat_tags set tag='$tag',txt='$txt' where id='$id';");
header("Location: tags.php");
pg_close($conn);
?>