<?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['pho-title'];
  $helppage = $TEXT['pho-help'];
  require_once "../config.php";
  require_once "../util/top_layer1.php";

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

  if(!isset($title)) $title = $TEXT['pho-title'];
  if(!isset($button)) $button = $TEXT['btn_add'];
  if(!isset($action)) $action = "add.php";
  if(!isset($showhide)) $visible = "checked";
?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table>
<tr><td class="useraddedit"><?php echo $TEXT['pho-field1']; ?></td><td class="useraddedit"><input size=30 maxlength=100 class="inputmandatory" type=text name=meropriyatie ></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 ></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-show']; ?></td><td><input type=checkbox name=visible <?php echo $visible; ?>></td></tr>
<tr><td></td><td><input class=button type=submit value='<?php echo $button; ?>' /></td></tr>
</table>
</form>
<?php
  require_once "../util/bottom.php";
?>