Ejemplo n.º 1
0
Archivo: index.php Proyecto: rjha/sc
$gSessionLogin = \com\indigloo\sc\auth\Login::getLoginInSession();
$loginId = $gSessionLogin->id;
$loginName = $gSessionLogin->name;
if (is_null($loginId)) {
    trigger_error("Error : NULL login_id on user dashboard", E_USER_ERROR);
}
$sticky = new Sticky($gWeb->find(Constants::STICKY_MAP, true));
$panelId = $sticky->get("panel_id");
$listDao = new \com\indigloo\sc\dao\Lists();
$analyticDao = new \com\indigloo\sc\dao\Analytic();
$counters = $analyticDao->getUserCounters($loginId);
$list_counter = $counters["list_count"];
$qparams = Url::getRequestQueryParams();
$pageSize = Config::getInstance()->get_value("user.page.items");
$paginator = new \com\indigloo\ui\Pagination($qparams, $pageSize);
$listDBRows = $listDao->getPagedOnLoginId($paginator, $loginId);
$baseURI = "/user/dashboard/list/index.php";
$fUrl = Url::current();
?>


<!DOCTYPE html>
<html>

    <head>
        <title> Lists - <?php 
echo $loginName;
?>
  </title>
        <?php 
include APP_WEB_DIR . '/inc/meta.inc';
Ejemplo n.º 2
0
Archivo: User.php Proyecto: rjha/sc
 private function processLists($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;
     $listDao = new \com\indigloo\sc\dao\Lists();
     $qparams = Url::getRequestQueryParams();
     $pageSize = Config::getInstance()->get_value("user.page.items");
     $paginator = new \com\indigloo\ui\Pagination($qparams, $pageSize);
     $listDBRows = $listDao->getPagedOnLoginId($paginator, $loginId);
     $template = APP_WEB_DIR . '/view/user/lists.php';
     //page variables
     $pageBaseUrl = "/pub/user/" . $pubUserId;
     $pageTitle = sprintf("page %d of lists by %s", $gpage, $userDBRow["name"]);
     $metaKeywords = SeoData::getHomeMetaKeywords();
     $metaDescription = SeoData::getHomeMetaDescription();
     include $template;
 }