<?
function panel_lamp_return($data,$options=array())
{
    include_once('panel_personal_info.php') ;
    ?>
    <table class="personal_info">
        <tr>
            <td>
                <div class="lamp_status green">
                    Лампа № <?echo $data['data']['lamp']['obj_name']?><br><br> выдана <?echo date('d.m.Y H:i',$data['data']['lamp_last_event']['c_data'])?>
                </div>
            </td>
            <td>
                <form class="sky-form">
                    <button class="button v2" id="accept_lamp" cmd="aspmo_rml/accept_lamp" personal_id="<?echo $data['data']['person']['pkey']?>">Принять лампу</button>
                </form>
            </td>
        </tr>
        <tr>
            <?panel_personal_info($data['data']['person']);?>
        </tr>
    </table>
    <script type="text/javascript">
        $j('button#accept_lamp').focus() ;
        $j(document).ready(function()
        {
            <?if ($GLOBALS['LS_lamp_auto_accept'] and $GLOBALS['LS_lamp_auto_accept_time']) {?>
            setTimeout(
                function () {
                    send_ajax_request({cmd:"aspmo_rml/accept_lamp",personal_id:<?echo $data['data']['person']['pkey']?>})
                },
                <?echo ($GLOBALS['LS_lamp_auto_accept_time']*1000)?>);
            <?}?>
            $j("body").stopTime('set_focus');
            $j("body").stopTime('check_pass_number');
        });
    </script>
    <?
}

?>