Ejemplo n.º 1
0
Archivo: bookmark.php Proyecto: rjha/sc
$sticky = new Sticky($gWeb->find(Constants::STICKY_MAP, true));
$bookmarkDao = new \com\indigloo\sc\dao\Bookmark();
//add login_id and code filters
$model = new \com\indigloo\sc\model\Bookmark();
$filters = array();
//filter-1
$filter = new Filter($model);
$filter->add($model::SUBJECT_ID_COLUMN, Filter::EQ, $loginId);
array_push($filters, $filter);
//filter-2
$filter = new Filter($model);
$filter->add($model::VERB_COLUMN, Filter::EQ, AppConstants::LIKE_VERB);
array_push($filters, $filter);
$pageSize = Config::getInstance()->get_value("user.page.items");
$paginator = new \com\indigloo\ui\Pagination($qparams, $pageSize);
$postDBRows = $bookmarkDao->getPaged($paginator, $filters);
$baseURI = "/user/dashboard/bookmark.php";
?>
<!DOCTYPE html>
<html>

    <head>
        <title> Likes of <?php 
echo $gSessionLogin->name;
?>
 </title>
        <?php 
include APP_WEB_DIR . '/inc/meta.inc';
?>
        <?php 
echo \com\indigloo\sc\util\Asset::version("/css/bundle.css");
Ejemplo n.º 2
0
Archivo: User.php Proyecto: rjha/sc
 private function processLikes($params, $options)
 {
     $pubUserId = Util::getArrayKey($params, "login_id");
     $loginId = PseudoId::decode($pubUserId);
     $qparams = Url::getRequestQueryParams();
     $userDao = new \com\indigloo\sc\dao\User();
     $userDBRow = $userDao->getOnLoginId($loginId);
     $this->isValidUser($userDBRow);
     $gpage = Url::tryQueryParam("gpage");
     $gpage = empty($gpage) ? "1" : $gpage;
     $bookmarkDao = new \com\indigloo\sc\dao\Bookmark();
     //add login_id and code filters
     $model = new \com\indigloo\sc\model\Bookmark();
     $filters = array();
     //filter-1
     $filter = new Filter($model);
     $filter->add($model::SUBJECT_ID_COLUMN, Filter::EQ, $loginId);
     array_push($filters, $filter);
     //filter-2
     $filter = new Filter($model);
     $filter->add($model::VERB_COLUMN, Filter::EQ, AppConstants::LIKE_VERB);
     array_push($filters, $filter);
     $pageSize = Config::getInstance()->get_value("user.page.items");
     $paginator = new \com\indigloo\ui\Pagination($qparams, $pageSize);
     $postDBRows = $bookmarkDao->getPaged($paginator, $filters);
     $template = APP_WEB_DIR . '/view/user/items.php';
     //page variables
     $pageBaseUrl = "/pub/user/" . $pubUserId;
     $pageTitle = sprintf("page %d of likes by %s", $gpage, $userDBRow["name"]);
     $metaKeywords = SeoData::getHomeMetaKeywords();
     $metaDescription = SeoData::getHomeMetaDescription();
     include $template;
 }