<?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['pass-imp'];
  $helppage = "";

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

  if($result2['administrator'] == 0) puterror2($TEXT['error-supp11']);

  if(empty($_GET['pas_str_id'])) puterror2($TEXT['error-zhurn1']);
  if(strlen($_GET['pas_str_id'])>11) puterror2($TEXT['error-zhurn2']);

  $_GET['pas_str_id'] = rep($_GET['pas_str_id']);
?>
  <title><?php echo $title; ?></title>
  <link rel="StyleSheet" type="text/css" href="../utils/grid.css" />
  <link rel="StyleSheet" type="text/css" href="../utils/reader.css" />
  <link rel="shortcut icon" href="../Favicon/pass-keep.ico" type="image/x-icon" />
  </head>
  <body leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bottommargin="0" topmargin="0" >
<?php
  if(!isset($button)) $button = $TEXT['pass-use'];
  if(!isset($action)) $action = "pass_import.php";
?>
<table class="tabledata" align="center">
  <tr><td class="z1"><?php echo $titlepage; ?></td></tr>
</table>
<br />
<form enctype='multipart/form-data' name='form' action=<?php echo $action; ?> method=post>
<table align="center" border="0">
 <tr><td><input type="file" name=impfl /></td></tr>
 <tr><td>
         <fieldset class="zayavka2" >
              <legend  class="autor"><?php echo $TEXT['pass-imp-from']; ?></legend>
               <table align='center' border='0' width='100%' cellpadding='0' cellspacing='0' class="tabledata">
                <tr><td width="16px"><img alt='internal' src='../img/lock.png' /></td><td width="16px"><input type=radio name=typepar value=1 checked></td><td class="support24"><?php echo $TEXT['pass-imp1']; ?></td></tr>
                <tr><td width="16px"><img alt='keepass' src='../img/keepass.png' /></td><td width="16px"><input type=radio name=typepar value=2></td><td class="support24"><?php echo $TEXT['pass-imp2']; ?></td></tr>
              </table>
          </fieldset>
     </td></tr>
<tr>
    <td align="left" >
        <input type=submit value='<?php echo $button; ?>' />
        <input type=hidden name=pas_str_id value='<?php echo $_GET['pas_str_id']; ?>' />
    </td>
</tr>
</table>
</form>
</body>
</html>