Размер файла: 758B
<?php
include '../wap/config.php';
$path=htmlspecialchars(trim($_POST['path']),ENT_QUOTES);
if (($name_eng=='')||($path=='')) {
print "<html><head><title>пЫЙВЛБ</title></head><body>оЕ ЧУЕ ДБООЩЕ ЧЧЕДЕОЩ</body></html>";
exit;
}
if ($enabled=='') $enabled=0;
if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
exit;
};
$res=pg_query($conn,"SET CLIENT_ENCODING TO 'KOI8';");
$res=pg_query($conn,"insert into midi (name_eng,name_rus,category,path,enabled,adate) values ('$name_eng','$name_rus','$category','$path','$enabled','now');");
$res=pg_query($conn,"update cat set rdate='now' where id='$category';");
header("Location: files.php");
pg_close($conn);
?>