Esempio n. 1
0
/**
 * Сортируем закладки
 *
 */
function Lenta_SortFav($sort = "date", $om)
{
    global $session;
    session_start();
    setcookie("lenta_fav_order", $sort, time() + 60 * 60 * 24 * 365, "/");
    $user_id = get_uid(false);
    $objResponse = new xajaxResponse();
    $favs = lenta::GetFavorites($user_id, $sort);
    $objResponse->assign('lenta_fav_list', 'innerHTML', '' . __lentaPrntFavs($favs, $user_id));
    return $objResponse;
}
Esempio n. 2
0
<?php

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/lenta.common.php";
$xajax->printJavascript('/xajax/');
if (!($groups = professions::GetAllGroupsLite())) {
    return;
}
if (!($lenta = lenta::GetUserLenta($uid))) {
}
$sort = $_COOKIE['lenta_fav_order'] != "" ? $_COOKIE['lenta_fav_order'] : "date";
$favs = lenta::GetFavorites($uid, $sort);
if (!($myComms = commune::GetCommunes(NULL, $uid, NULL, commune::OM_CM_MY))) {
    $myComms = array();
}
if (!($joinedComms = commune::GetCommunes(NULL, NULL, $uid, commune::OM_CM_JOINED))) {
    $joinedComms = array();
}
// Все сообщества, доступные пользователю.
$communes = array();
foreach ($myComms as $comm) {
    $communes[] = $comm;
}
foreach ($joinedComms as $comm) {
    $communes[] = $comm;
}
// Блоги