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

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

  $title=$titlepage = $TEXT['exusr-unlock-title'];
  $helppage = "";

  require_once "../../config.php";
  require_once "../../util/top_layer2.php";

  if($result2['administrator'] == 0) puterror3($TEXT['error-loginform4']);

  if(empty($_GET['id'])) puterror3($TEXT['exusr-error1']);
  if(strlen($_GET['id'])>200) puterror3($TEXT['exusr-error2']);

  $query = "UPDATE `users` SET `active`='Y' WHERE `id`='".$_GET['id']."' ";
  if(mysql_query($query))
  {
    echo "<html><head>
          <meta HTTP-EQUIV='Refresh' CONTENT='0; URL=index.php' />
          </head></html>";
  } else puterror3($TEXT['error-tbl34']);
  require_once "../../util/bottom_exp.php";
?>
