Ejemplo n.º 1
0
 private function commonTemplateTags($user)
 {
     //Get a sample of 5 friends
     require_once 'relation.php';
     $rel = new RelationsGet($this->registry);
     $cache = $rel->getByUser($user, true, 5);
     //var_dump($this->registry->getObject('db')->dataFromCache($cache));
     $this->registry->getObject('template')->getPage()->addTag('profile_friends_sample', array('SQL', $cache));
     $profile = new ProfileModel($this->registry, $user);
     $profile->toTags('p_');
     $name = $profile->getName();
     $username = $profile->getUsername();
     $uid = $profile->getID();
     $photo = $profile->getPhoto();
     $this->registry->getObject('template')->getPage()->addTag('profile_name', $name);
     $this->registry->getObject('template')->getPage()->addTag('profile_username', $username);
     $this->registry->getObject('template')->getPage()->addTag('profile_pic', $photo);
     $this->registry->getObject('template')->getPage()->addTag('profile_id', $uid);
     $profie = '';
 }
Ejemplo n.º 2
0
 private function viewAll($user)
 {
     if ($this->registry->getObject('authenticate')->isLoggedIn() == true) {
         $rel = new RelationsGet($this->registry);
         $all = $rel->getByUser($user, false, 0);
         $this->registry->getObject('template')->buildFromTemplate('header.php', 'relations_all.php', 'footer.php');
         //echo $all;
         $this->registry->getObject('template')->getPage()->addTag('all', array('SQL', $all));
         $profile = new Profile($this->registry, $user);
         $name = $profile->getName();
         $this->registry->getObject('template')->getPage()->addTag('connecting_name', $name);
     } else {
         $this->registry->errorPage('Error', 'Please Login to view connections');
     }
 }