set_overview('

'.$chat_map[$lang].'

'.''.$chat_select[$lang].''); if ($_POST['chat_map']) { $con_map = $enc->decrypt_url($_POST['chat_map']); } elseif ($_GET['chat_map']) { $con_map = $enc->decrypt_url($_GET['chat_map']); } if($con_map === true) { $con_map = $enc->jid; } else{ unset($con_map); } // prepare roster object $ejabberd_roster->sort_by_nick("az"); $roster_chat = $ejabberd_roster->get_roster(); $html->set_body('


'.$filter_tip[$lang].'

'.$chat_m_select[$lang].'
'); if ($con_map AND $_POST['chat_map'] != "null") { // split username and server name list($name_peer,$server_peer) = split("@",$con_map); // get the id's of user and server $db->get_user_id($name_peer); $peer_name_id = $db->result->user_id; $db->get_server_id($server_peer); $peer_server_id = $db->result->server_id; if ($peer_name_id !== null AND $peer_server_id !== null) { //first get the months $db->get_chat_map($peer_name_id,$peer_server_id); $result1 = $db->result; $cc_cmp = count($result1); foreach ($result1 as $row_m) { // hack for proper date parsing list($y,$m) = split("-",$row_m[at]); $mo="$y-$m"; // now get the days in with user was talking $db->get_chat_map_specyfic($peer_name_id,$peer_server_id,$mo); $result2 = $db->result; foreach($result2 as $row_day) { // now scan day for chats, yep thats weak, but as long as we dont have right stats table this will work... $i++; list($y,$m,$d) = split("-",$row_day[at]); $days[$i] = $d; } if (count($days)>=1) { $html->set_body('
'); $html->set_body(calendar($db,$user_id,$xmpp_host,$y,$m,$days,TOKEN,$url_key,$left,$right,$selected,$lang,$view_type,2,$peer_name_id,$peer_server_id,$cal_days,$enc,$months_names,$weekdays)); $html->set_body('
'); unset($days); } else { $score++; } $i=0; } } else { $cc_cmp = $score; } if ($score==$cc_cmp) { $html->set_body('

'.$chat_no_chats[$lang].'

'); } } $html->set_body('
*-'.$ff_notice[$lang].''); require_once("footer.php"); ?>