<?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['meet-add2'];
  $helppage = $TEXT['meet-help'];
  require_once "../config.php";
  require_once "../util/top_layer1.php";
  include "../util/tags.js";

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

  if(!isset($title)) $title = $TEXT['nd-title'];
  if(!isset($button)) $button = $TEXT['btn_add'];
  if(!isset($action)) $action = "add.php";
  if(!isset($showhide)) $visible = "checked";

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

?>
<form enctype='multipart/form-data' name='form' action=<?php echo $action; ?> method=post>
<table border="0">
<tr><td class="useraddedit"><?php echo $TEXT['meet-name']; ?></td><td class="useraddedit"><input size=30 maxlength=250 class="inputmandatory" type=text name=room_name ></td>
<td align="center" rowspan="7"><br /><br />
        <a href="javascript:inserttags('<span%20class=&quot;fntbld&quot;>','</span>')" title="<?php echo $TEXT['new-tag1']; ?>"><img alt="картинка" src="../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="../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="../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="../img/linetrough.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('<sup>','</sup>')" title="<?php echo $TEXT['new-tag6']; ?>"><img alt="картинка" src="../img/sup.png" align=middle /></a>
        <a href="javascript:inserttags('<sub>','</sub>')" title="<?php echo $TEXT['new-tag5']; ?>"><img alt="картинка" src="../img/sub.png" align=middle /></a>
        <a href="javascript:inserttags('<p>','</p>')" title="<?php echo $TEXT['new-tag7']; ?>"><img alt="картинка" src="../img/paragraf.png" align=middle /></a>
        <a href="javascript:inserttags('<hr />','')" title="<?php echo $TEXT['new-tag8']; ?>"><img alt="картинка" src="../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="картинка" src="../img/btn.png" align=middle /></a>
        <a href="javascript:inserttags('<span%20class=&quot;fntbldzag&quot;>','</span>')" title="<?php echo $TEXT['new-tag16'].$TEXT['new-tag17']; ?>"><img alt="font16" src="../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="../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="../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="../img/textcolor-yellow.png" align=middle border=0 /></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="../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="../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="../img/textcolor-blue.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="../img/marck-green.png" align=middle /></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="../img/marck-orange.png" align=middle /></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="../img/marck-yellow.png" align=middle /></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="../img/marck-grey.png" align=middle /></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="../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="../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="../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="../img/note-pic.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('&ldquo;','&rdquo;')" title="<?php echo $TEXT['new-tag15']; ?>"><img alt="картинка" src="../img/quote1.png" align=middle /></a>
        <a href="javascript:inserttags('&laquo;','&raquo;')" title="<?php echo $TEXT['new-tag15']; ?>"><img alt="картинка" src="../img/quote2.png" align=middle /></a>
        <a href=# onClick="window.open('../../support/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="картинка" src="../img/email.png" align=middle /></a>
        <a href=# onClick="window.open('../../support/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="../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="../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="../img/brl.png" align=middle /></a>
        <a href="javascript:inserttags('<br%20clear=&quot;all&quot;/>','')" title="<?php echo $TEXT['new-tag32']; ?>"><img alt="картинка" src="../img/bra.png" align=middle /></a>
        <a href="javascript:inserttags('<br%20clear=&quot;right&quot;/>','')" title="<?php echo $TEXT['new-tag34'].$TEXT['new-tag32']; ?>"><img alt="картинка" src="../img/brr.png" align=middle /></a>
        <br />
        <a href="javascript:inserttags('<ul>','</ul>')" title="<?php echo $TEXT['new-tag11']; ?>"><img alt="картинка" src="../img/list.png" align=middle /></a>
        <a href="javascript:inserttags('<li>','</li>')" title="<?php echo $TEXT['new-tag12']; ?>"><img alt="картинка" src="../img/listelement.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=useraddedit><?php echo $TEXT['inst-field1']; ?></td><td class=useraddedit><input class=input type=file name=photo></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tbl-position']; ?></td><td class="useraddedit"><input size=3 maxlength=11 class="inputmandatory" type=text name=position value="<?php echo $pos; ?>"></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['org-field1']; ?></td>
    <td class="useraddedit"><select class="inputmandatory" name="org_id">
    <?php
        $query2 = "SELECT * FROM `tbl_organizaciya` ORDER BY organizaciya ";
        $org_tmp = mysql_query($query2);
          if(!$org_tmp) puterror2($TEXT['error-tbl7']);
              while($org = mysql_fetch_array($org_tmp))
                {
                 $chk = "<option value=".$org['org_id'].">".$org['organizaciya'];
                 echo $chk;
                }
    ?>
    </select></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tbl-descr']; ?></td><td class="useraddedit"><textarea cols="50" rows="10" name=message ></textarea></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['global-visible']; ?></td><td><input type=checkbox name=visible <?php echo $visible; ?>></td></tr>
<tr><td>&nbsp;</td><td><input class=button type=submit value='<?php echo $button; ?>' /></td></tr>
</table>
</form>
<?php
  require_once "../util/bottom.php";
?>