View file katrinka.ru/admin/book_update.php

File size: 471B
<?php
  include '../wap/config.php';
    if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
      echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
    };
	if ($moder==1) $moder=0; else $moder=1;
	pg_query($conn,"SET CLIENT_ENCODING TO 'KOI8';");
    pg_query($conn,"update wapgbk set message='$message',reply='$reply',moder='$moder' where id=$id");
    pg_close($conn);
	$loc=sprintf("Location: book.php#%d", $id);
	header($loc);
?>