Размер файла: 687B
- <?php
- include '../wap/config.php';
-
- if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
- echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
- };
- pg_query($conn,"SET CLIENT_ENCODING TO 'KOI8';");
- pg_query($conn,"update wapgbk set reply='$reply',moder=0 where id=$id");
- if ($bymail) {
- $res=pg_query($conn,"select email from wapgbk where id='$id';");
- $email=pg_result($res,0,0);
- mail($email, "Reply from Nastusha", "оБУФАЫБ ПФЧЕФЙМБ:\n $reply","From: WAP.NASTUSHA.RU Guestbook <wap@nastusha.ru>\nContent-Type: text/plain; charset=KOI8-r");
- }
- pg_close($conn);
- $loc=sprintf("Location: book.php#%d", $id);
- header($loc);
- ?>