コード例 #1
0
ファイル: guestbook.php プロジェクト: ngxuanmui/hanhphuc.vn
 function display()
 {
     $juser =& JFactory::getUser();
     $username = JRequest::getString('user', $juser->username);
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'general.php';
     $profile_id = generalHelpers::getUserId($username);
     if (is_null($profile_id)) {
         $profile_id = $juser->id;
     }
     $rows = new stdClass();
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'user.php';
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'wedding.php';
     $rows->cuser = userHelpers::getUserInfo($profile_id);
     $tmpl = userHelpers::getCurrentTemplate($profile_id);
     $css = weddingHelper::getTemplateFolder('css', $tmpl->code);
     $images = weddingHelper::getTemplateFolder('images', $tmpl->code);
     $rows->images = $images;
     $rows->css = $css;
     $rows->menu = userHelpers::getUserMenu($profile_id);
     $this->_view->addTemplatePath(JPATH_COMPONENT . DS . 'templates' . DS . $tmpl->code . DS);
     $rows->guestbooks = $this->_model->getGuestbooks($profile_id, 1);
     $rows->pagination = $this->_model->getPagination($profile_id, 1);
     $rows->userdata = userHelpers::getUserData($profile_id);
     $this->_view->setLayout('index');
     $this->_view->display($rows);
 }
コード例 #2
0
ファイル: profile.php プロジェクト: ngxuanmui/hanhphuc.vn
 function display()
 {
     $juser =& JFactory::getUser();
     $cuser = null;
     if ($juser->id > 0) {
         require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'user.php';
         $cuser = userHelpers::getUserInfo($juser->id);
     }
     $this->_view->setLayout('profile.default');
     $this->_view->display($juser, $cuser);
 }