if ($arrus[$j]['id'] == $mytable['id_user']) {
         $user = $arrus[$j]['name'];
         break;
     }
 }
 $tran = $mytable['tranzit'];
 $restr = mysql_query("SELECT * FROM tranzit WHERE id='{$tran}'");
 if ($mytr = mysql_fetch_array($restr)) {
     $trnzit = $mytr['name'] . ' , ';
 } else {
     $trnzit = $mytable['tranzit'];
 }
 $k = $mytable['k'] * 100;
 echo '<tr>';
 $rasxod = $mytable['rasxod'] * 100;
 echo '<td><p align="center">' . date("d.m.Y", strtotime($mytable['data_kp'])) . '</td><td><p align="center">' . $mytable['predm_zakup'] . '</td><td><p align="center">' . $data->GetVidDiyalFoID($mytable['vid_diyaln']) . '</td><td><p align="center">' . $trnzit . ' ' . $mytable['postach'] . '</td>';
 if ($idviewolltable) {
     echo '<td><p align="center">' . $pokypets . '</td><td><p align="center">' . number_format($mytable['summ_zakup'], 3, ',', ' ') . '</td>';
 }
 echo '<td><p align="center">' . number_format($mytable['summ_prod'], 3, ',', ' ') . '</td>';
 if ($idviewolltable) {
     echo '<td><p align="center">' . $k . '%</td><td><p align="center">' . $rasxod . '%</td><td><p align="center">' . $user . '</td><td><p align="center">' . $mytable['predoplata'] . '%' . '</td><td><p align="center">' . $mytable['povn_opl_pis_pos'] . '</td><td><p align="center">' . $mytable['strok_postv'] . '</td><td><p align="center">' . $mytable['prim_shared'] . '</td>';
 }
 echo '<td><p align="center">' . $mytable['primit'] . '</td><td><a href="?action=material_table&idsp=' . $mytable['id'] . '">RS</a></td><td><p align="center">' . $mytable['file'] . '</td>';
 $idsp = $mytable[id];
 $rezup = mysql_query("SELECT * FROM `spesifikats` WHERE `id_zvit`='{$idsp}'");
 if (!($myupl = mysql_fetch_array($rezup))) {
     echo '<td><a href="work.php?action=load_manager_specif&idsp=' . $mytable['id'] . '&loadful=1"><img src="images/gwget.png" width="32px" height="32px"></a></td>';
 } else {
     echo '<td><img src="images/success.png" width="32px" height="32px"></td>';
 }