Ejemplo n.º 1
0
 /**
  * Display.
  * 
  */
 function display($tpl = null)
 {
     //loading resources
     $this->user =& eFactory::getUser();
     //initializing variables
     $this->is_owner = false;
     $this->isLoggedIn = false;
     //IS THE USER LOGGED IN?
     if ($this->user->id() != 0) {
         $this->isLoggedIn = true;
     }
     //IS THIS THE OWNER?
     if (isset($this->_record) && !$this->_record->isNew()) {
         if ($this->_record->author_id() == $this->user->id()) {
             $this->is_owner = true;
         }
     }
     parent::display($tpl);
 }
Ejemplo n.º 2
0
 /**
  * 
  * @param $tpl
  */
 function display($tpl = null)
 {
     parent::display($tpl);
 }
Ejemplo n.º 3
0
 /**
  * Display
  *
  */
 function display($tpl = null)
 {
     //$user =& eFactory::getUser();print_r($user);
     parent::display($tpl);
 }
Ejemplo n.º 4
0
 /**
  * Display
  *
  */
 function display($tpl = null)
 {
     //loading resources
     $this->user =& eFactory::getUser();
     $listings_id = JRequest::getVar('_listings_id', false);
     $comments_id = JRequest::getVar('_comments_id', false);
     //initializing variables
     $this->isRequest = false;
     $this->isAwarded = $this->_record->getWinner();
     $this->isClosed = $this->_record->isClosed();
     $this->is_owner = false;
     $this->isLoggedIn = false;
     //IS THE USER LOGGED IN?
     if ($this->user->id() != 0) {
         $this->isLoggedIn = true;
     }
     //DOES THIS REQUIRE REQUESTS?
     if ($this->_record->type() == 'donation' || $this->_record->type() == "need") {
         $this->isRequest = true;
     }
     //IS THIS THE OWNER?
     if (isset($this->_record) && !$this->_record->isNew()) {
         if ($this->_record->author_id() == $this->user->id()) {
             $this->is_owner = true;
         }
     }
     //LOAD THE LISTING?
     if ($listings_id) {
         //loading resources
         $this->_listings =& JTable::getInstance($this->_table, 'Table');
         $this->_listings->load($listings_id);
         //initializing variables
         $id = $this->_listings->author_id();
         //loading resources
         $this->_author =& eFactory::getUser($id);
     }
     //LOAD THE COMMENT IN THE LISTINGS SPOT?
     if ($comments_id) {
         //loading resources
         $this->_listings =& JTable::getInstance('byrdlist_comments', 'Table');
         $this->_listings->load($comments_id);
         //initializing variables
         $id = $this->_listings->author_id();
         $this->_listings->_notalisting = 1;
         //loading resources
         $this->_author =& eFactory::getUser($id);
     }
     //loading media
     JHTML::script('image_click.js', 'components/' . EBOOK_COMPONENT . '/media/js/');
     parent::display($tpl);
 }