<?php
  ///////////////////////////////////////////////////
  //2007 (C)
  //Карпухин Павел
  ///////////////////////////////////////////////////

  $lang = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0,2);
  if(is_file ("../lang/".$lang.".php")) include "../lang/".$lang.".php";
     else include "../lang/ru.php";

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

  ?>
  <meta http-equiv='Refresh' content='180; URL=rpt_tree.php' />
  <title><?php echo $title; ?></title>
  <link rel="StyleSheet" type="text/css" href="../utils/reader.css" />
  </head>
  <body leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bottommargin="0" topmargin="0" >
  <?php
  if($result2['user'] == 1) puterror2($TEXT['error-supp11']);
  if($result2['master'] == 1) puterror2($TEXT['error-supp11']);
?>
<table width="100%" align="left" border="0" cellspacing="0">
    <tr>
        <td class="support4"><?php echo $TEXT['support36']; ?></td>
    </tr>
  <tr>
        <td>
<table width="100%" align="left" border="0" cellspacing="0">
  <tr><td width="2%">&nbsp;</td><td width="98%"><a class="support2" href='report.php' target='right'><?php echo $TEXT['support57']; ?></a></td></tr>
</table>
</td>
    </tr>
     <tr>
        <td class="support4"><?php echo $TEXT['support42']; ?></td>
    </tr>
     <tr>
        <td>
        <table width="100%" align="left" border="0" cellspacing="0">
     <?php
               $query4 = "SELECT DISTINCT `manager` FROM `tbl_supp_archive` ORDER BY manager ";
                $arch_tmp = mysql_query($query4);
                  if(!$arch_tmp) puterror2($TEXT['error-tbl25']);
                    while($arch_man = mysql_fetch_array($arch_tmp,MYSQL_ASSOC))
                     {
                      echo "<tr><td width='2%'>&nbsp;</td><td width='98%'><a class='support2' href='rpt_man.php?manager=".$arch_man['manager']."' target='right'>".$arch_man['manager']."</a></td></tr>";
                     }
    ?>
        </table>
</td>
    </tr>
     <tr>
        <td class="support4"><?php echo $TEXT['support43']; ?></td>
    </tr>
     <tr>
        <td>
        <table width="100%" align="left" border="0" cellspacing="0">
     <?php
               $query3 = "SELECT DISTINCT `master` FROM `tbl_supp_archive` ORDER BY master ";
               $arch_tmp2 = mysql_query($query3);
                if(!$arch_tmp2) puterror2($TEXT['error-tbl25']);
                    while($arch_mast = mysql_fetch_array($arch_tmp2,MYSQL_ASSOC))
                      {
                       echo "<tr><td width='2%'>&nbsp;</td><td width='98%'><a class='support2' href='rpt_mast.php?master=".$arch_mast['master']."' target='right'>".$arch_mast['master']."</a></td></tr>";
                      }
    ?>
        </table>
</td>
    </tr>
     <tr>
        <td class="support4"><?php echo $TEXT['support47']; ?></td>
    </tr>
     <tr>
        <td>
        <table width="100%" align="left" border="0" cellspacing="0">
     <?php
               $query5 = mysql_query("SELECT COUNT(time_isp) FROM tbl_supp_archive WHERE time_isp < '30' ");
               $col_time30 = mysql_result($query5, 0);
               echo "<tr><td width='2%'>&nbsp;</td><td width='98%'><a class='support2' href='rpt_time.php?time=30' target='right'>".$TEXT['support58']."&nbsp;&#171;".$col_time30."&#187;</a></td></tr>";

               $query6 = mysql_query("SELECT COUNT(time_isp) FROM tbl_supp_archive WHERE time_isp BETWEEN '30' AND '60' ");
               $col_time60 = mysql_result($query6, 0);
               echo "<tr><td width='2%'>&nbsp;</td><td width='98%'><a  class='support2'href='rpt_time.php?time=60' target='right'>".$TEXT['support59']."&nbsp;&#171;".$col_time60."&#187;</a></td></tr>";

               $query7 = mysql_query("SELECT COUNT(time_isp) FROM tbl_supp_archive WHERE time_isp BETWEEN '61' AND '300' ");
               $col_time300 = mysql_result($query7, 0);
               echo "<tr><td width='2%'>&nbsp;</td><td width='98%'><a class='support2' href='rpt_time.php?time=300' target='right'>".$TEXT['support60']."&nbsp;&#171;".$col_time300."&#187;</a></td></tr>";

               $query8 = mysql_query("SELECT COUNT(time_isp) FROM tbl_supp_archive WHERE time_isp BETWEEN '301' AND '1440' ");
               $col_time1440 = mysql_result($query8, 0);
               echo "<tr><td width='2%'>&nbsp;</td><td width='98%'><a class='support2' href='rpt_time.php?time=1440' target='right'>".$TEXT['support61']."&nbsp;&#171;".$col_time1440."&#187;</a></td></tr>";

               $query9 = mysql_query("SELECT COUNT(time_isp) FROM tbl_supp_archive WHERE time_isp > '1441' ");
               $col_time1441 = mysql_result($query9, 0);
               echo "<tr><td width='2%'>&nbsp;</td><td width='98%'><a class='support2' href='rpt_time.php?time=1441' target='right'>".$TEXT['support62']."&nbsp;&#171;".$col_time1441."&#187;</a></td></tr>";
    ?>
        </table>
</td>
    </tr>
    <tr>
        <td class="support4"><?php echo $TEXT['support63']; ?></td>
    </tr>
     <tr>
        <td>
        <table width="100%" align="left" border="0" cellspacing="0">
            <tr>
              <td width="2%">&nbsp;</td>
              <td width="98%"><a class="support2" href='rpt_org.php' target='right'><?php echo $TEXT['support14']; ?></a></td>
            </tr>
        </table>
</td>
    </tr>
    <tr>
        <td class="support4"><?php echo $TEXT['support13']; ?></td>
    </tr>
     <tr>
        <td>
        <table width="100%" align="left" border="0" cellspacing="0">
           <tr>
              <td width="2%">&nbsp;</td>
              <td width="98%"><a class="support2" href='rpt_tema.php' target='right'><?php echo $TEXT['support14']; ?></a></td>
           </tr>
        </table>
</td>
    </tr>
    <tr>
        <td class="support4"><?php echo $TEXT['support85']; ?></td>
    </tr>
     <tr>
        <td>
        <table width="100%" align="left" border="0" cellspacing="0">
           <tr>
              <td width="2%">&nbsp;</td>
              <td width="98%"><a class="support2" href='rpt_date.php' target='right'><?php echo $TEXT['support14']; ?></a></td>
           </tr>
        </table>
</td>
    </tr>
</table>
</body>
</html>