Esempio n. 1
0
include 'sc-app.inc';
include APP_WEB_DIR . '/inc/header.inc';
include APP_WEB_DIR . '/inc/role/user.inc';
use com\indigloo\Util;
use com\indigloo\Url;
use com\indigloo\Configuration as Config;
use com\indigloo\sc\auth\Login;
use com\indigloo\ui\Filter;
$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);
}
$socialGraphDao = new \com\indigloo\sc\dao\SocialGraph();
$followings = $socialGraphDao->getFollowing($loginId, 50);
$total = sizeof($followings);
?>


<!DOCTYPE html>
<html>

    <head>
        <title> Following - <?php 
echo $loginName;
?>
  </title>
        <?php 
include APP_WEB_DIR . '/inc/meta.inc';
?>
Esempio n. 2
0
File: User.php Progetto: rjha/sc
 private function processGraph($params, $options, $source)
 {
     $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);
     $socialGraphDao = new \com\indigloo\sc\dao\SocialGraph();
     settype($source, "integer");
     $graphDBRows = array();
     $graphName = NULL;
     switch ($source) {
         case 1:
             $graphDBRows = $socialGraphDao->getFollowers($loginId, 50);
             $graphName = "followers";
             break;
         case 2:
             $graphDBRows = $socialGraphDao->getFollowing($loginId, 50);
             $graphName = "followings";
             break;
         default:
             trigger_error("unknown source for social graph", E_USER_ERROR);
     }
     $template = APP_WEB_DIR . '/view/user/graph.php';
     //page variables
     $pageBaseUrl = "/pub/user/" . $pubUserId;
     $pageTitle = sprintf("%s of %s", $graphName, $userDBRow["name"]);
     $metaKeywords = SeoData::getHomeMetaKeywords();
     $metaDescription = SeoData::getHomeMetaDescription();
     include $template;
 }