<?php
  ///////////////////////////////////////////////////
  //2010 (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['domain-title'];

  require_once "../config_a.php";
  require_once "../utils/functions.php";
  require_once "../utils/top_adm.php";

  if($result2['administrator'] == 0) {puterror($result2['skin'],$TEXT['error-loginform2']); require_once "../utils/bottom_adm.php"; exit();}

  if(!isset($button)) $button = $TEXT['btn_save'];
  if(!isset($action)) $action = "edit.php";

  if(strlen($_GET['dom_id'])>5) {puterror($result2['skin'],$TEXT['error-domain6']); require_once "../utils/bottom_adm.php"; exit();}
  $_GET['dom_id'] = rep($_GET['dom_id']);

  $old_dom_id = $_GET['dom_id'];

  $query10 = "SELECT * FROM `tbl_domain` WHERE `dom_id`='".$_GET['dom_id']."' ";
  $result10 = mysql_query($query10);
  if (!$result10) {puterror($result2['skin'],$TEXT['error-tbl7']); require_once "../utils/bottom_adm.php"; exit();}
      $result_dom = mysql_fetch_array($result10);
         $domain = $result_dom['domain'];
?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table align="center">
<tr><td class="bold_it"><?php echo $TEXT['global-edit']; ?></td><td class="bold_it"><input size=30 maxlength=30 class="input" type=text name=domain value='<?php echo $domain; ?>'></td></tr>
<tr><td></td><td>
<input class="button2" type=submit value='<?php echo $button; ?>'>
<input type=hidden name=dom_id value='<?php echo $old_dom_id; ?>'>
</td></tr>
</table>
</form>
<?php
require_once "../utils/bottom_adm.php";
?>