<?php
  ///////////////////////////////////////////////////
  //2012 (C)
  //Карпухин Павел
  ///////////////////////////////////////////////////

  $lang = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0,2);
  if(is_file ("lang/".$lang.".php")) include "lang/".$lang.".php";
     else include "lang/ru.php";

  $title=$titlepage=$TEXT['meet-help2'];

  require_once "config.php";
  require_once "utils/top_meet_otv.php";

  if(empty($_GET['evnt_id'])) puterror($TEXT['meet-err-edit2']);
  if(strlen($_GET['evnt_id'])>11) puterror($TEXT['meet-err-edit3']);
  $_GET['evnt_id'] = rep($_GET['evnt_id']);

  $query = "DELETE FROM `tbl_meet_event` WHERE `evnt_id` = '".$_GET['evnt_id']."' ";
   if(mysql_query($query))
   {
   $usr_prep = mysql_query("DELETE FROM tbl_meet_users WHERE `evnt_id` = '".$_GET['evnt_id']."' ");

   $query6 = "SELECT `familiya`, `name`, `otchestvo` FROM `tbl_users` WHERE `user_id` = '".$result2['usr_id']."'";
   $usr_tmp = mysql_query($query6);
    if(!$usr_tmp) puterror($TEXT['error-tbl2']);
     $usr = mysql_fetch_array($usr_tmp,MYSQL_ASSOC);
     $usr_name = $usr['familiya']." ".$usr['name']." ".$usr['otchestvo'];

    //*************************************
    $ip = $_SERVER['REMOTE_ADDR'];
    $doing = $TEXT['meet-log'];
    $what = $TEXT['meet-log3']." ".$_GET['evnt_id'];
    $who = $usr_name;
    //*************************************
    $query2 = "INSERT INTO tbl_logs ( `log_id` , `data` , `ip` , `who` , `doing` , `what` ) VALUES ( NULL , NOW() , '$ip' , '$who' , '$doing' , '$what')";
        if(mysql_query($query2))
           {
             echo "<html><head>
                   <meta HTTP-EQUIV='Refresh' CONTENT='0; URL=meet_otv.php' />
                   </head></html>";
           } else puterror($TEXT['error-log']);
   } else puterror($TEXT['error-tbl49']);

  require_once "utils/bottom_search.php";
?>