set_overview('

'.$fav_main[$lang].'

'.$fav_desc[$lang].''); // add to favorites if ($init == "1") { if ($enc->decrypt_url($_POST[a]) === true) { $tslice = $enc->tslice; $peer_name_id = $enc->peer_name_id; $peer_server_id = $enc->peer_server_id; $db->get_user_name($peer_name_id); $user_name = $db->result->username; $db->get_server_name($peer_server_id); $server_name = $db->result->server_name; $nick_name = query_nick_name($ejabberd_roster,$user_name, $server_name); if (!$nick_name) { $nick_name = $not_in_r[$lang]; unset($malpa); } else{ $malpa = "@"; } $html->set_body('
'.$fav_add[$lang].':
'.$fav_chat[$lang].''.cut_nick($nick_name).' ('.$user_name.$malpa.$server_name.')

'); } } // process request if ($_POST[favorite]) { if ($enc->decrypt_url($_POST[favorite]) === true) { if ($db->set_favorites($enc->peer_name_id,$enc->peer_server_id,$peer_resource_id,$enc->tslice,$_POST[desc]) === true) { $html->status_message($fav_success[$lang]); } else{ $html->alert_message($fav_error[$lang]); } } } // delete favorites if ($_GET[del] == "t") { if ($db->delete_favorites_id($_GET[link_id]) === true) { $html->status_message($fav_removed[$lang]); } else{ $html->alert_message($oper_fail[$lang]); } } // get favorites $db->get_favorites(); if (count($db->result)>0) { $html->set_body('
'); $fav_list = $db->result; foreach ($fav_list as $row) { $db->get_user_name($row[peer_name_id]); $user_name = $db->result->username; $db->get_server_name($row[peer_server_id]); $server_name = $db->result->server_name; $nickname = query_nick_name($ejabberd_roster,$user_name,$server_name); $to_base = $enc->crypt_url("tslice=$row[tslice]&peer_name_id=$row[peer_name_id]&peer_server_id=$row[peer_server_id]"); if (!$row[comment] OR $row[comment] == $my_links_optional[$lang]) { $comment = $fav_nocomm[$lang]; } else{ $comment = htmlspecialchars($row[comment]); $comment = str_replace("\n","
",$comment); $comment = wordwrap($comment,30,"
",true); } if (!$nickname) { $nickname = $not_in_r[$lang]; unset($malpa); } else { $malpa = "@"; } $html->set_body(' '); } $html->set_body('
'.$fav_when[$lang].''.$fav_contact[$lang].''.$fav_comment[$lang].'
'.verbose_date($row[tslice],$months_names,$weekdays).' '.htmlspecialchars(cut_nick($nickname)).' ('.htmlspecialchars($user_name).$malpa.htmlspecialchars($server_name).') '.$comment.'  '.$fav_remove[$lang].' 
'); } else { $html->status_message('
'.$fav_empty[$lang].'
'); } require_once("footer.php"); ?>