Просмотр файла katrinka.ru/admin/tag_update.php

Размер файла: 683B
  1. <?php
  2. include '../wap/config.php';
  3.  
  4. if ($id==0) exit;
  5.  
  6. if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
  7. echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
  8. exit;
  9. };
  10.  
  11. if ($delete==1) {
  12. pg_query($conn, "delete from chat_tags where id=$id;");
  13. pg_close($conn);
  14. header("Location: tags.php");
  15. exit;
  16. }
  17.  
  18. if (($tag=='')||($txt=='')) {
  19. print "<html><head><title>пЫЙВЛБ</title></head><body>оЕ ЧУЕ ДБООЩЕ ЧЧЕДЕОЩ</body></html>";
  20. pg_close($conn);
  21. exit;
  22. }
  23.  
  24. $res=pg_query($conn,"SET CLIENT_ENCODING TO 'KOI8';");
  25.  
  26. $res=pg_query($conn,"update chat_tags set tag='$tag',txt='$txt' where id='$id';");
  27. header("Location: tags.php");
  28. pg_close($conn);
  29. ?>