<?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['zhurn-new'];
  $helppage = $TEXT['zhurn-new-help'];

  require_once "../config.php";
  require_once "top.php";
  include "tags_know.js";
  ?>
  <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.php";

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

  $query3 = "SELECT MAX(position) AS position FROM `tbl_bd_zhnaniy` WHERE `zh_str_id` = ".$_GET['zh_str_id']."";
   $tmp3 = mysql_query($query3);
    if(!$tmp3) puterror2($TEXT['error-tbl46']);
     $tmp_pos = mysql_fetch_array($tmp3,MYSQL_ASSOC);
      if($tmp_pos['position'] == null) $pos = 1;
       else $pos = $tmp_pos['position'] + 1;

?>
<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="support2"><?php echo $TEXT['izm-tema']; ?>:</td><td class="support"><input size=100 maxlength=255 type=text name=tema /></td><td></td></tr>
<tr><td class="support2"><?php echo $TEXT['izm-soobsch']; ?>:</td><td><textarea cols="100" rows="15" name=zh_soobschenie ></textarea></td>
<td>
        <a href="javascript:inserttags('<span%20class=&quot;fntbld&quot;>','</span>')" title="<?php echo $TEXT['new-tag1']; ?>"><img alt="картинка" src="../admin/img/bold.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntit&quot;>','</span>')" title="<?php echo $TEXT['new-tag2']; ?>"><img alt="картинка" src="../admin/img/italic.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntunderline&quot;>','</span>')" title="<?php echo $TEXT['new-tag3']; ?>"><img alt="картинка" src="../admin/img/underline.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntzacherknuto&quot;>','</span>')" title="<?php echo $TEXT['new-tag4']; ?>"><img alt="картинка" src="../admin/img/linetrough.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('<sup>','</sup>')" title="<?php echo $TEXT['new-tag6']; ?>"><img alt="картинка" src="../admin/img/sup.png" align=middle /></a>
        <a href="javascript:inserttags('<sub>','</sub>')" title="<?php echo $TEXT['new-tag5']; ?>"><img alt="картинка" src="../admin/img/sub.png" align=middle /></a>
        <a href="javascript:inserttags('<p>','</p>')" title="<?php echo $TEXT['new-tag7']; ?>"><img alt="картинка" src="../admin/img/paragraf.png" align=middle /></a>
        <a href="javascript:inserttags('<hr />','')" title="<?php echo $TEXT['new-tag8']; ?>"><img alt="картинка" src="../admin/img/hr.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('<span%20class=&quot;buttonbkg&quot;>','</span>')" title="<?php echo $TEXT['new-tag38']; ?>"><img alt="picture" src="../admin/img/btn.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntbldzag1&quot;>','</span>')" title="<?php echo $TEXT['new-tag16'].$TEXT['new-tag17']; ?>"><img alt="font16" src="../admin/img/fontsize16.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntbldzag2&quot;>','</span>')" title="<?php echo $TEXT['new-tag16'].$TEXT['new-tag18']; ?>"><img alt="font18" src="../admin/img/fontsize18.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;zagolovok&quot;>','</span>')" title="<?php echo $TEXT['new-tag16'].$TEXT['new-tag19']; ?>"><img alt="font20" src="../admin/img/fontsize20.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('<span%20class=&quot;fntyellow&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag35']; ?>"><img alt="text-yellow" src="../admin/img/textcolor-yellow.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntred&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag21']; ?>"><img alt="text-red" src="../admin/img/textcolor-red.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntgreen&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag22']; ?>"><img alt="text-green" src="../admin/img/textcolor-green.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntblue&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag23']; ?>"><img alt="text-blue" src="../admin/img/textcolor-blue.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('<span%20class=&quot;fntgray&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag39']; ?>"><img alt="text-gray" src="../admin/img/textcolor-gray.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntorange&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag40']; ?>"><img alt="text-orange" src="../admin/img/textcolor-orange.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntkorich&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag41']; ?>"><img alt="text-brown" src="../admin/img/textcolor-brown.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntwhite&quot;>','</span>')" title="<?php echo $TEXT['new-tag20'].$TEXT['new-tag42']; ?>"><img alt="text-white" src="../admin/img/textcolor-white.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('<span%20id=&quot;marobj&quot;%20class=&quot;fntmarckgreen&quot;>','</span>')" title="<?php echo $TEXT['new-tag31']; ?>"><img alt="marc-green" src="../admin/img/marck-green.png" align=middle border=0 /></a>
        <a href="javascript:inserttags('<span%20id=&quot;marobj&quot;%20class=&quot;fntmarckorange&quot;>','</span>')" title="<?php echo $TEXT['new-tag29']; ?>"><img alt="marc-orange" src="../admin/img/marck-orange.png" align=middle border=0 /></a>
        <a href="javascript:inserttags('<span%20id=&quot;marobj&quot;%20class=&quot;fntmarckyellow&quot;>','</span>')" title="<?php echo $TEXT['new-tag30']; ?>"><img alt="marc-yellow" src="../admin/img/marck-yellow.png" align=middle border=0 /></a>
        <a href="javascript:inserttags('<span%20id=&quot;marobj&quot;%20class=&quot;fntmarckgray&quot;>','</span>')" title="<?php echo $TEXT['new-tag28']; ?>"><img alt="marc-grey" src="../admin/img/marck-grey.png" align=middle border=0 /></a>
        <br />
        <a href="javascript:inserttags('<p%20class=&quot;console&quot;><img%20class=&quot;tipsimg&quot;%20alt=&quot;console&quot;%20src=&quot;../admin/img/cmd.png&quot; />','</p>')" title="<?php echo $TEXT['new-tag24']; ?>"><img alt="console" src="../admin/img/console.png" align=middle /></a>
        <a href="javascript:inserttags('<p%20class=&quot;tips&quot;><img%20class=&quot;tipsimg&quot;%20alt=&quot;tips&quot;%20src=&quot;../admin/img/note.png&quot; />','</p>')" title="<?php echo $TEXT['new-tag26']; ?>"><img alt="tips" src="../admin/img/tips-pic.png" align=middle /></a>
        <a href="javascript:inserttags('<p%20class=&quot;textfilecont&quot;><img%20class=&quot;tipsimg&quot;%20alt=&quot;text&quot;%20src=&quot;../admin/img/text.png&quot; />','</p>')" title="<?php echo $TEXT['new-tag25']; ?>"><img alt="text" src="../admin/img/text-pic.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;tooltip&quot;>место%20для%20слова<span>то%20что%20будет%20всплывать,%20очень%20кратко','<small></small></span></span>')" title="<?php echo $TEXT['new-tag27']; ?>"><img alt="baloon" src="../admin/img/note-pic.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('&ldquo;','&rdquo;')" title="<?php echo $TEXT['new-tag15']; ?>"><img alt="картинка" src="../admin/img/quote1.png" align=middle /></a>
        <a href="javascript:inserttags('&laquo;','&raquo;')" title="<?php echo $TEXT['new-tag15']; ?>"><img alt="картинка" src="../admin/img/quote2.png" align=middle /></a>
        <a href=# onClick="window.open('know_add_mailform.php','ee','top=<?php echo $TEXT['about-top']; ?>,left=<?php echo $TEXT['about-left']; ?>,width=<?php echo $TEXT['about-width']; ?>,height=<?php echo $TEXT['about-height']; ?>,status=no,scrollbars=no,location=no,menubar=no,toolbar=no,directories=no')" title="<?php echo $TEXT['new-tag13']; ?>"><img alt="e-mail" src="../admin/img/email.png" align=middle /></a>
        <a href=# onClick="window.open('know_add_linkform.php','ee','top=<?php echo $TEXT['about-top']; ?>,left=<?php echo $TEXT['about-left']; ?>,width=<?php echo $TEXT['about-width']; ?>,height=<?php echo $TEXT['about-height']; ?>,status=no,scrollbars=no,location=no,menubar=no,toolbar=no,directories=no')" title="<?php echo $TEXT['new-tag14']; ?>"><img alt="ссылка" src="../admin/img/url.png" align=middle /></a>
        <br />
        <a href=# onClick="window.open('know_add_photoform.php','ee','top=<?php echo $TEXT['about-top']; ?>,left=<?php echo $TEXT['about-left']; ?>,width=<?php echo $TEXT['about-width']; ?>,height=<?php echo $TEXT['about-height']; ?>,status=no,scrollbars=no,location=no,menubar=no,toolbar=no,directories=no')" title="<?php echo $TEXT['know-foto']; ?>"><img alt="картинка" src="../admin/img/add-photo.png" align=middle /></a>
        <a href="javascript:inserttags('<br%20clear=&quot;left&quot;/>','')" title="<?php echo $TEXT['new-tag33'].$TEXT['new-tag32']; ?>"><img alt="картинка" src="../admin/img/brl.png" align=middle border=0 /></a>
        <a href="javascript:inserttags('<br%20clear=&quot;all&quot;/>','')" title="<?php echo $TEXT['new-tag32']; ?>"><img alt="картинка" src="../admin/img/bra.png" align=middle border=0 /></a>
        <a href="javascript:inserttags('<br%20clear=&quot;right&quot;/>','')" title="<?php echo $TEXT['new-tag34'].$TEXT['new-tag32']; ?>"><img alt="картинка" src="../admin/img/brr.png" align=middle border=0 /></a>
        <br />
        <a href=# onClick="window.open('know_add_table.php','ee','top=<?php echo $TEXT['resour-top']; ?>,left=<?php echo $TEXT['resour-left']; ?>,width=<?php echo $TEXT['resour-width']; ?>,height=<?php echo $TEXT['resour-height']; ?>,status=no,scrollbars=yes,location=no,menubar=no,toolbar=no,directories=no')" title="<?php echo $TEXT['new-tag36']; ?>"><img alt="таблица" src="../admin/img/table.png" align=middle /></a>
        <a href=# onClick="window.open('know_add_fileform.php','ee','top=<?php echo $TEXT['about-top']; ?>,left=<?php echo $TEXT['about-left']; ?>,width=<?php echo $TEXT['about-width']; ?>,height=<?php echo $TEXT['about-height']; ?>,status=no,scrollbars=no,location=no,menubar=no,toolbar=no,directories=no')" title="<?php echo $TEXT['support15']; ?>"><img alt="файл" src="../admin/img/file.png" align=middle /></a>
        <a href="javascript:inserttags('&#9632;','')" title="<?php echo $TEXT['new-tag11']; ?>"><img alt="картинка" src="../admin/img/list.png" align=middle /></a>
        <a href="javascript:inserttags('&#9679;','')" title="<?php echo $TEXT['new-tag12']; ?>"><img alt="картинка" src="../admin/img/listelement.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('%20<span%20class=&quot;strelki&quot;>&rArr;','</span>%20')" title="<?php echo $TEXT['new-tag43']; ?>"><img alt="картинка" src="../admin/img/rarr.png" align=middle /></a>
        <a href="javascript:inserttags('%20<span%20class=&quot;strelki&quot;>&hArr;','</span>%20')" title="<?php echo $TEXT['new-tag43']; ?>"><img alt="картинка" src="../admin/img/rlarr.png" align=middle /></a>
        <a href="javascript:inserttags('%20<span%20class=&quot;strelki&quot;>&lArr;','</span>%20')" title="<?php echo $TEXT['new-tag43']; ?>"><img alt="картинка" src="../admin/img/larr.png" align=middle /></a>
        <a href="javascript:inserttags('%20<span%20class=&quot;strelki&quot;>&#8629;','</span>%20')" title="<?php echo $TEXT['new-tag43']; ?>"><img alt="картинка" src="../admin/img/enter.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('%20:smile:%20','')"><img alt="картинка" src="../img/smile.png" align=middle /></a>
        <a href="javascript:inserttags('%20:tongue:%20','')"><img alt="картинка" src="../img/tongue.png" align=middle /></a>
        <a href="javascript:inserttags('%20:wink:%20','')"><img alt="картинка" src="../img/wink.png" align=middle /></a>
        <a href="javascript:inserttags('%20:wassat:%20','')"><img alt="картинка" src="../img/wassat.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('%20:sad:%20','')"><img alt="картинка" src="../img/sad.png" align=middle /></a>
        <a href="javascript:inserttags('%20:crying:%20','')"><img alt="картинка" src="../img/crying.png" align=middle /></a>
        <a href="javascript:inserttags('%20:angry:%20','')"><img alt="картинка" src="../img/angry.png" align=middle /></a>
</td>
</tr>
<tr><td class="support2"><?php echo $TEXT['know-prim']; ?>:</td><td><textarea cols="100" rows="5" name=primechanie ></textarea></td><td></td></tr>
<tr><td class="support2"><?php echo $TEXT['izm-pos']; ?>:</td><td class="support"><input size=6 maxlength=6 type=text name=position value="<?php echo $pos; ?>" /></td><td></td></tr>
<tr><td class="support2"><?php echo $TEXT['izm-krit']; ?>:</td>
    <td class="support"><select name="krit_id">
    <?php
        $query4 = "SELECT * FROM `tbl_kritichnost` WHERE `krit_id` != '0' ORDER BY position, kritichnost";
        $kritichnost_tmp = mysql_query($query4);
          if(!$kritichnost_tmp) puterror2($TEXT['error-tbl39']);
              while($kritichnost = mysql_fetch_array($kritichnost_tmp,MYSQL_ASSOC))
                {
                 $chk = "<option value=".$kritichnost['krit_id'].">".$kritichnost['kritichnost']."";
                 echo $chk;
                }
    ?>
    </select></td><td></td></tr>
<tr><td></td><td>
  <input class="button" type=submit value='<?php echo $button; ?>' />
  <input type=hidden name=zh_str_id value='<?php echo $old_zh_str_id; ?>' />
</td><td></td>
</tr>
</table>
</form>
</body>
</html>