<?php
  ///////////////////////////////////////////////////
  //База знаний
  //2010 (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['new-tag14'];

  require_once "../config.php";
  require_once "top.php";
  ?>
  <title><?php echo $title; ?></title>
  <link rel="StyleSheet" type="text/css" href="../utils/grid.css" />
  <link rel="shortcut icon" href="../Favicon/know-base.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['btn_gen'];
  if(!isset($action)) $action = "know_add_linkform.php";
?>
<table class="tabledata" align="center">
  <tr><td class="z1"><?php echo $titlepage; ?></td></tr>
</table>
<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['link']; ?></td><td>
<select name="ss_type">
  <option value='http' selected>http
  <option value='https' >https
  <option value='ftp' >ftp
 </select>&nbsp://</td>
  <td><input type="text" size=30 maxlength=155 name="ssilka" /></td>
 </tr>
 <tr><td class="useraddedit"><?php echo $TEXT['photo_obr']; ?></td><td colspan="2" align="left">
    <select name="ss_vspl">
  <option value='_blank' selected><?php echo $TEXT['ssilka-otobr1']; ?>
  <option value='_self' ><?php echo $TEXT['ssilka-otobr2']; ?>
  <option value='_top' ><?php echo $TEXT['ssilka-otobr3']; ?>
    </select>
  </td></tr>
 <tr><td class="useraddedit"><?php echo $TEXT['link-descrip']; ?></td><td colspan="2"><input type="text" size=40 maxlength=255 name="descrip" /></td></tr>
 <tr><td class="useraddedit"><?php echo $TEXT['izm-visible']; ?></td><td colspan="2"><input type="text" size=40 maxlength=255 name="otobr" /></td></tr>
<tr><td align="center" colspan="3"><input class="button" type=submit value='<?php echo $button; ?>' /></td></tr>
</table>
</form>
<?php
  if(!empty($_POST['otobr'])) $otobr1 = $_POST['otobr'];
   else $otobr1 = $TEXT['link'];
  if(!empty($_POST['ssilka'])) echo "<table border=\"0\" width=\"95%\" align=\"center\"><tr><td><p class=\"statssilka\"><img class=\"tipsimg\" alt=\"tips\" src=\"../img/inet16.png\" />&lt;a class=\"newsdesc\" href=\"".$_POST['ss_type']."://".$_POST['ssilka']."\" target=\"".$_POST['ss_vspl']."\" title=\"".$_POST['descrip']."\"&gt;".$otobr1."&lt;/a&gt;</p></td></tr></table>";
?>
</body>
</html>