예제 #1
0
            $u_info->set_id_user($session_info['id_user']);
            $u_info->get_user_by_id();
            $tip = '<b>UID:</b> ' . $session_info['id_user'] . '<br /><b>' . txt('logs_sessions_fulltime') . '</b> ' . date('d.m.Y H:i:s', intval($session_info['start_time'])) . ' - ' . date('d.m.Y H:i:s', intval($session_info['end_time']));
            $usr_link = '<b>' . $u_info->get_user_login() . '</b> (UID: ' . $session_info['id_user'] . ')';
            $action = helper_reload(array('section' => 'sessions', 'action' => 'delete_session', 'id_session' => $session_info['id_session']));
            echo $layout->row(array($session_info['id_session'], date('d.m.Y H:i:s', intval($session_info['start_time'])), date('d.m.Y H:i:s', intval($session_info['end_time'])), $usr_link, $session_info['user_ip'], $session_info['user_browser'], $session_info['php_sessid'], $layout->button(txt('btn_delete'), $action, 'cancel')), $tip);
        }
        echo $layout->tbl_end();
    }
} else {
    // log session
    $sessions = new phpos_users();
    if ($sessions->is_session_id($id_session)) {
        echo $layout->subtitle($txt['logs_section_sessions_view_title'], ICONS . 'logs/section_sessions.png');
        echo $layout->txtdesc($txt['logs_section_sessions_view_desc']);
        echo $layout->tbl_start();
        $layout->td_classes(array(''));
        echo $layout->head(array(txt('logs_section_sessions_tbl_id') => '5%', txt('logs_section_sessions_tbl_starttime') => '10%', txt('logs_section_sessions_tbl_endtime') => '10%', txt('logs_section_sessions_tbl_user') => '25%', txt('logs_section_sessions_tbl_ip') => '15%', txt('logs_section_sessions_tbl_browser') => '20%', txt('logs_section_sessions_tbl_sid') => '5%', txt('logs_section_sessions_tbl_action') => '10%'));
        $session_info = $sessions->get_session_id_data($id_session);
        $tip = '<b>UID:</b> ' . $session_info['id_user'] . '<br /><b>' . txt('logs_sessions_fulltime') . '</b> ' . date('d.m.Y H:i:s', intval($session_info['start_time'])) . ' - ' . date('d.m.Y H:i:s', intval($session_info['end_time']));
        $u_info = new phpos_users();
        $u_info->set_id_user($session_info['id_user']);
        $u_info->get_user_by_id();
        $usr_link = '<b>' . $u_info->get_user_login() . '</b> (UID: ' . $session_info['id_user'] . ')';
        $action = helper_reload(array('section' => 'sessions', 'action' => 'delete_session', 'id_session' => $session_info['id_session']));
        echo $layout->row(array($session_info['id_session'], date('d.m.Y H:i:s', intval($session_info['start_time'])), date('d.m.Y H:i:s', intval($session_info['end_time'])), $usr_link, $session_info['user_ip'], $session_info['user_browser'], $session_info['php_sessid'], $layout->button(txt('btn_delete'), $action, 'cancel')), $tip);
        echo $layout->tbl_end();
    } else {
        echo 'Session not exists in DB.';
    }
}