<?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['str-title3'];
  $helppage = $TEXT['str-help3'];

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

  if($result2['user'] == 1) puterror2($TEXT['error-loginform4']);
  if($result2['master'] == 1) puterror2($TEXT['error-loginform4']);
  if($result2['manager'] == 1) puterror2($TEXT['error-loginform4']);

  if(!isset($title)) $title = $TEXT['str-title3'];
  if(!isset($button)) $button = $TEXT['btn_edit'];
  if(!isset($action)) $action = "edit.php";

  if(strlen($_GET['str_id'])>11) puterror2($TEXT['error-str6']);
  $_GET['str_id'] = rep($_GET['str_id']);

  $old_str_id = $_GET['str_id'];

  $query = "SELECT * FROM `tbl_street` WHERE `str_id`='".$_GET['str_id']."' ";
  $result = mysql_query($query);
  if (!$result) puterror2($TEXT['error-tbl3']);
     $result2 = mysql_fetch_array($result);
         $street = $result2['street'];
?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table>
<tr><td class="useraddedit"><?php echo $TEXT['tbl-str']; ?></td><td class="useraddedit"><input size=30 maxlength=50 class="inputmandatory" type=text name=street value='<?php echo $street; ?>'></td></tr>
<tr><td></td><td>
<input class="button" type=submit value='<?php echo $button; ?>' />
<input type=hidden name=str_id value='<?php echo $old_str_id; ?>' />
</td></tr>
</table>
</form>
<?php
  require_once "../util/bottom.php";
?>