| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/components/com_jlexreview/views/profile/ |
Upload File : |
<?php
/**
* @package JLex Review
* @version 4.2.3
* @copyright Copyright (c) 2013-2018 JLexArt. All rights reserved
* @license GNU General Public License version 2 or later;
* @author www.jlexart.com
*/
defined ( "_JEXEC" ) or die;
class JLexReviewViewProfile extends JViewLegacy
{
protected $user;
protected $userOnline;
protected $config;
protected $others;
protected $render = false;
protected $uid = 0;
protected $authorHeader = false;
public function display($tpl = null)
{
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$model = $this->getModel( "profile" );
$uid = $this->render ? $this->uid : $app->getInput()->getInt("id", 0);
//if($this->uid>0) $uid=$this->uid;
$this->config = JLexReviewHelperAdmin::getConfig();
$profileClass = JLexReviewHelperSite::getProfile();
$this->userOnline = JFactory::getUser();
if($uid>0)
{
$this->user = $profileClass->getUser($uid);
} else {
$this->user = $profileClass->getUser();
}
if ($this->user->id<1 || $this->config->def("profile_page",1)==0)
{
throw new Exception(JText::_("JR_PAGE_NOT_FOUND"), 404);
return false;
}
if ($this->userOnline->id==$this->user->id)
{
$this->user->set("owner", true);
}
$model->set( "uid", $this->user->id );
$this->others = $model->others();
// doc markup
JHtml::_('jquery.framework');
$doc->addStyleSheet(JUri::base(true) . "/media/jlexreview/assets/profile/style.css");
if($this->render)
{
if($this->authorHeader)
$this->render = false; // show full user info
return parent::loadTemplate($tpl);
} else {
// set title
$titles = array($this->user->get("jname"));
switch($app->getCfg('sitename_pagetitles'))
{
case 1:
array_unshift($titles, $app->getCfg('sitename'));
break;
case 2:
array_push($titles, $app->getCfg('sitename'));
break;
}
$doc->setTitle(implode(" - ", $titles));
parent::display($tpl);
}
}
public function render($author=true)
{
$this->authorHeader = $author;
$this->render = true;
return $this->display();
}
}