<div class='box'> <?php $msg = ''; require_once 'functions/MsgMgr.php'; $mess = new MsgMgr(); if (!empty($_POST['to']) && !empty($_POST['text'])) { $msg = $mess->msg_send($config, $player->usr_id, $_POST['to'], $_POST['text']); } if (!empty($_GET['m_id']) && !empty($_GET['del']) && !empty($_GET['type'])) { $mess->msg_del($config, $player->usr_id, $_GET['type'], $_GET['m_id']); } if (!empty($_GET['del_all']) && !empty($_GET['type'])) { $mess->msg_del_all($config, $player->usr_id, $_GET['type']); } if (!empty($_GET['type'])) { switch ($_GET['type']) { case 1: $messages = get_all("select m_id, m_text, m_type, login, avatar, usr_id,m_date, m_status from messages inner join users on m_from = usr_id where m_to = " . $player->usr_id . " and m_type = 1 order by m_status asc, m_id desc"); $from = "od "; break; case 2: $messages = get_all("select m_id, m_text, m_type, login, avatar, usr_id, m_date from messages inner join users on m_to = usr_id where m_from = " . $player->usr_id . " and m_type = 2 order by m_id desc"); $from = "do "; break; case 3: $messages = get_all("select m_id, m_text, m_type, login, avatar, usr_id, m_date, m_status from messages inner join users on m_from = usr_id where m_to = " . $player->usr_id . " and m_type = 3 order by m_status asc, m_id desc"); $from = "Raport "; break;