<?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['know-foto'];
//  $helppage = $TEXT['know-foto-help'];

  require_once "../config.php";
  require_once "top.php";
  ?>
  <title><?php echo $title; ?></title>
  <link rel="StyleSheet" type="text/css" href="../utils/grid.css" />
  </head>
  <body leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bottommargin="0" topmargin="0" >
  <?php
  if(!isset($button)) $button = $TEXT['btn_add'];
  if(!isset($action)) $action = "know_add_photo.php";
  if(empty($_GET['photo_obt'])) $_GET['photo_obt'] = "imgleft";
?>
<table class="tabledata" align="center">
  <tr><td class="z1"><?php echo $titlepage; ?></td></tr>
  <tr><td class="help"><?php echo $helppage; ?></td></tr>
</table>
<br />
<form enctype='multipart/form-data' name='form' action=<?php echo $action; ?> method=post>
<table class="tabledata" align="center" border="0">
<tr><td class="useraddedit"><?php echo $TEXT['know-foto']; ?></td><td><input size=20 type=file name=image /></td></tr>
 <tr><td class="useraddedit"><?php echo $TEXT['photo_obr']; ?></td><td>
    <select name="photo_obr">
  <option value='1' selected><?php echo $TEXT['photo_no']; ?>
  <option value='2' ><?php echo $TEXT['photo_rec_l']; ?>
  <option value='3' ><?php echo $TEXT['photo_rec_v']; ?>
  <option value='4' ><?php echo $TEXT['photo_rec_l_t']; ?>
  <option value='5' ><?php echo $TEXT['photo_rec_v_t']; ?>
    </select>
  </td></tr>
 <tr><td class="useraddedit"><?php echo $TEXT['ssilka-otobr4']; ?></td><td align="left">
    <select name="photo_obt">
       <option value='imgleft' <?php if ($_GET['photo_obt'] =='imgleft') echo "selected"; ?>><?php echo $TEXT['ssilka-otobr5']; ?>
       <option value='imgcentr' <?php if ($_GET['photo_obt'] =='imgcentr') echo "selected"; ?>><?php echo $TEXT['ssilka-otobr7']; ?>
       <option value='imgright' <?php if ($_GET['photo_obt'] =='imgright') echo "selected"; ?>><?php echo $TEXT['ssilka-otobr6']; ?>
    </select>
  </td></tr>
 <tr><td class="useraddedit"><?php echo $TEXT['new-field7']; ?></td><td class="useraddedit"><input type="text" size=30 maxlength=255 name="descrip" cols="50" rows="5" /></td></tr>
<tr><td align="center" colspan="2"><input class="button" type=submit value='<?php echo $button; ?>' /></td></tr>
</table>
</form>
<?php
  if(!empty($_GET['pic'])) {
      $pic_big = substr($_GET['pic_big'], 6,200);
      $pic = substr($_GET['pic'], 6,200);
      echo "<p class='statssilka'><img class='tipsimg' alt='tips' src='../img/ftp16.png' />&lt;a href='".$pic_big."' target='_blank' title='".$_GET['descr']."'&gt;&lt;img alt='picture' class='".$_GET['photo_obt']."' src='".$pic."'&gt;&lt;/a&gt;</p>";
  }
?>
</body>
</html>