<?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['forecast-title5'];
  $helppage = $TEXT['forecast-help5'];

  require_once "../config.php";
  require_once "../util/top.php";

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

  if(!isset($title)) $title = $TEXT['forecast-title5'];
  if(!isset($button)) $button = $TEXT['btn_add'];
  if(!isset($action)) $action = "add.php";

  $wind_dir=15;
?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table>
<tr><td class="useraddedit"><?php echo $TEXT['ind']; ?></td><td class="useraddedit"><input size=10 maxlength=9 type=text name=ind ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tbl-country']; ?></td><td class="useraddedit"><input size=30 maxlength=85 type=text name=country ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tbl-region']; ?></td><td class="useraddedit"><input size=30 maxlength=85 class="inputmandatory" type=text name=region ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tbl-station']; ?></td><td class="useraddedit"><input size=30 maxlength=85 class="inputmandatory" type=text name=station ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tbl-date']; ?></td><td class="useraddedit"><input size=10 maxlength=10 class="inputmandatory" type=text name=dat title="<?php echo $TEXT['forecast-dat']; ?>"></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tday']; ?></td><td class="useraddedit"><input size=10 maxlength=6 type=text name=tday ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['tnight']; ?></td><td class="useraddedit"><input size=10 maxlength=6 type=text name=tnight ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['prec']; ?></td><td class="useraddedit"><input size=10 maxlength=6 type=text name=prec ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['prec_prob']; ?></td><td class="useraddedit"><input size=10 maxlength=6 type=text name=prec_prob ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['wind_dir']; ?></td><td class="useraddedit">
<select class=input name=wind_dir >
  <option value=15 <?php if($wind_dir==15) echo "selected"; ?>><?php echo $TEXT['forecast_n']; ?>
  <option value=40 <?php if($wind_dir==40) echo "selected"; ?>><?php echo $TEXT['forecast_ne']; ?>
  <option value=100 <?php if($wind_dir==100) echo "selected"; ?>><?php echo $TEXT['forecast_e']; ?>
  <option value=140 <?php if($wind_dir==140) echo "selected"; ?>><?php echo $TEXT['forecast_se']; ?>
  <option value=170 <?php if($wind_dir==170) echo "selected"; ?>><?php echo $TEXT['forecast_s']; ?>
  <option value=220 <?php if($wind_dir==220) echo "selected"; ?>><?php echo $TEXT['forecast_sw']; ?>
  <option value=270 <?php if($wind_dir==270) echo "selected"; ?>><?php echo $TEXT['forecast_w']; ?>
  <option value=315 <?php if($wind_dir==315) echo "selected"; ?>><?php echo $TEXT['forecast_nw']; ?>
</select></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['wind_speed']; ?></td><td class="useraddedit"><input size=10 maxlength=6 type=text name=wind_speed ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['weather_cond']; ?></td><td class="useraddedit"><input size=30 maxlength=85 type=text name=weather_cond ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['pday']; ?></td><td class="useraddedit"><input size=10 maxlength=6 type=text name=pday ></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['pnight']; ?></td><td class="useraddedit"><input size=10 maxlength=6 type=text name=pnight ></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";
?>