function __construct($ID)
{
global $site;
$this->aMutualFriends = array();
parent::__construct($ID, 0);
$this->oVotingView = new BxTemplVotingView('profile', (int) $ID);
$this->oCmtsView = new BxDolCmtsProfile('profile', (int) $ID);
//$this->ID = $this->_iProfileID;
$this->oTemplConfig = new BxTemplConfig($site);
//$this->sColumnsOrder = getParam( 'profile_view_cols' );
//INSERT INTO `sys_options` VALUES('profile_view_cols', 'thin,thick', 0, 'Profile view columns order', 'digit', '', '', NULL, '');
if ($this->_iProfileID) {
$this->getProfileData();
if ($this->_aProfile) {
if (isMember()) {
$iMemberId = getLoggedId();
if ($iMemberId == $this->_iProfileID) {
$this->owner = true;
if ($_REQUEST['editable']) {
$this->bPFEditable = true;
$iPFArea = 2;
// Edit Owner
} else {
$iPFArea = isAdmin() ? 5 : 6;
}
// View Owner
} else {
$iPFArea = isAdmin() ? 5 : 6;
}
} elseif (isModerator()) {
$iPFArea = 7;
} else {
$iPFArea = 8;
}
$this->oPF = new BxDolProfileFields($iPFArea);
if (!$this->oPF->aBlocks) {
return false;
}
$this->aPFBlocks = $this->oPF->aBlocks;
if ($this->bCouple) {
$this->aCoupleMutualItems = $this->oPF->getCoupleMutualFields();
}
$this->iFriendsPerPage = (int) getParam('friends_per_page');
$this->FindMutualFriends($iMemberId, $_GET['page'], $_GET['per_page']);
} else {
return false;
}
} else {
return false;
}
}