<?
function panel_pass_error($error_data=array())
{
//    damp_array($error_data);
    include_once('panel_personal_info.php') ;
    if ($error_data['error']['text']) {
        ?>
        <div class="mo_status red"><?echo $error_data['error']['text']?></div>
        <?
    } elseif ($error_data['event']['error']) {
        if ($error_data['event']['error']=='mo') {
            ?>
            <table class="personal_info">
                <tr>
                   <td class="title" colspan="2">
                       <div class="mo_status red"><?echo "Медицинский осмотр не пройден"?></div>
                   </td>
                </tr>
                <tr>
                    <?panel_personal_info($error_data['data']['person']);?>
                </tr>
            </table>
            <?if ($GLOBALS['LS_lamp_enable_sound']) {
            ?>
            <script type="text/javascript">
                var sound_denited = new buzz.sound("/AddOns/sounds/WavLibraryNet_Sound16268.wav");
                sound_denited.play() ;
            </script>
            <?
            }
        } elseif ($error_data['event']['error']=='lamp_free') {
            ?>
            <table class="personal_info">
                <tr>
                    <td class="title" colspan="2">
                        <div class="mo_status green"><?echo 'Лампа "'.$error_data['data']['lamp']['obj_name'].'" свободна'?></div>
                    </td>
                </tr>
            </table>
            <?
        }
    }
    ?>
    <script type="text/javascript">
        $j(document).ready(function()
        {
            $j('body').stopTime('timer_clear');
            $j('body').oneTime(<?echo $GLOBALS['LS_view_lamp_pass_error_message_time']*1000?>,'timer_clear',function(){send_ajax_request({cmd:"aspmo_rml/clear_info_panel"}) ;})
        }) ;
    </script>
    <?
}

?>