<?
function panel_list_rec_popilumetr($recs_personal)
{
?>
    <form>
        <div id="panel_list_rec_popilumetr">
            <table><tr><th><input type="checkbox" onclick="javascript:$j('.personal_id').prop('checked', $j(this).prop('checked'));" /></th><th>Сотрудник</th><th>Возраст</th><th>Пол</th><th>Кол-во<br>измерений</th><th>Норма</th><th>Комментарий</th></tr>
             <? foreach ($recs_personal as $personal_id=>$cnt)
             { $rec_personal=PERSONAL()->get_personal_by_id($personal_id) ;
               $rec_norm=execSQL_van('select * from obj_site_narko_data_out_303 where user_id='.$personal_id) ;
               ?><tr>
                    <td><input type="checkbox" value="<?echo $personal_id?>" class="personal_id" name="personal_id[]" /></td>
                 <td><a href="/cab/personal/person/<?echo $personal_id?>/pp/" class="new_window"><?echo $rec_personal['obj_name'];?></a></td>
                 <td><?echo $rec_personal['age']?></td>
                 <td><?echo $rec_personal['_pol'];?></td>
                 <td><?echo $cnt;?></td>
                 <td><?if($rec_norm['pkey']){?><div class="green">ДА</div><?} if ($rec_norm['auto']) {?><div class="red">(АВТОМАТИЧЕСКИ)</div><?}?></td>
                 <td><textarea class="v2" cmd="aspmo_pp/save_comment" event="change" no_send_form="1" personal_id="<?echo $personal_id?>"><?echo $rec['comment']?></textarea></td>
             </tr>
         <?}?>
            </table>
        </div>
        <div class="buttons">
            <button class="v2" cmd=aspmo_pp/calculate_norm_auto>Посчитать норму автоматически</button>
        </div>
    </form>
<?
}


?>