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

  if($result2['user'] == 1) puterror2($TEXT['error-loginform4']);
  if($result2['master'] == 1) puterror2($TEXT['error-loginform4']);
  if($result2['manager'] == 1) puterror2($TEXT['error-loginform4']);
?>
 <img alt="<?php echo $TEXT['size-add-new'] ;?>" src= "../img/insert.png" height="15" align="top" /><a class="boldit" href="addform.php" title="<?php echo $TEXT['size-add-new-tit']; ?>"><?php echo $TEXT['size-add-new'] ;?></a>
 <br />
 <br />
 <span class="tabledata"><?php echo $TEXT['size-text1'] ;?></span>
<table class="table" border="1" cellpadding="3" cellspacing="0" width="60%">
<?php
     $query = "SELECT * FROM `tbl_sizes` ORDER BY size_id ";
     $result = mysql_query($query);
     if(!$result) puterror2($TEXT['error-tbl35']);
       if(mysql_num_rows($result)>0);
         {
           ?>
           <tr class="tableheadercat">
             <td><?php echo $TEXT['tbl-size']; ?></td>
             <td colspan=2><?php echo $TEXT['tbl-action']; ?></td>
           </tr>
           <?php
             while($result_sizes = mysql_fetch_array($result,MYSQL_ASSOC))
              {
              $edit = "<a href=editform.php?size_id=".$result_sizes['size_id']." title='".$TEXT['tbl-edit-tit']."'>".$TEXT['tbl-edit']."</a>";
              $delete = "<a href=deleteform.php?size_id=".$result_sizes['size_id']." title='".$TEXT['tbl-delete-tit']."'>".$TEXT['tbl-delete']."</a>";
           ?>
           <tr class="tabledata" onmouseover="this.style.backgroundColor='#cccccc';" onmouseout="this.style.backgroundColor='#ffffff';">
              <td><?php echo $result_sizes['size_name']; ?></td>
              <td><?php echo $edit; ?></td>
              <td><?php echo $delete; ?></td>
           </tr>
           <?php
              }
         }
?>
</table>
<?php
  require_once "../util/bottom.php";
?>