Esempio n. 1
0
 function makeView()
 {
     if (!$this->isEnabled()) {
         return false;
     }
     $iMemberId = getLoggedId() ? getLoggedId() : 0;
     $sIp = $_SERVER['REMOTE_ADDR'];
     $iTime = time();
     if ($iMemberId) {
         $sWhere = " AND `viewer` = '{$iMemberId}' ";
     } else {
         $sWhere = " AND `viewer` = '0' AND `ip` = INET_ATON('{$sIp}') ";
     }
     $iTs = (int) $GLOBALS['MySQL']->getOne("SELECT `ts` FROM `{$this->_aSystem['table_track']}` WHERE `id` = '" . $this->getId() . "' {$sWhere}");
     $iRet = 0;
     if (!$iTs) {
         $iRet = $GLOBALS['MySQL']->query("INSERT IGNORE INTO `{$this->_aSystem['table_track']}` SET `id` = '" . $this->getId() . "', `viewer` = '{$iMemberId}', `ip` = INET_ATON('{$sIp}'), `ts` = {$iTime}");
     } elseif ($iTime - $iTs > $this->_aSystem['period']) {
         $iRet = $GLOBALS['MySQL']->query("UPDATE `{$this->_aSystem['table_track']}` SET `ts` = {$iTime} WHERE `id` = '" . $this->getId() . "' AND `viewer` = '{$iMemberId}' AND `ip` = INET_ATON('{$sIp}')");
     }
     if ($iRet) {
         $this->_triggerView();
         $oZ = new BxDolAlerts($this->_sSystem, 'view', $this->getId(), $iMemberId);
         $oZ->alert();
         return true;
     }
     return false;
 }
Esempio n. 2
0
/**
 * send "tell a friend" email
 */
function SendTellFriend($iSenderID = 0)
{
    global $profileID;
    $sRecipient = clear_xss($_POST['friends_emails']);
    $sSenderName = clear_xss($_POST['name']);
    $sSenderEmail = clear_xss($_POST['email']);
    if (strlen(trim($sRecipient)) <= 0) {
        return 0;
    }
    if (strlen(trim($sSenderEmail)) <= 0) {
        return 0;
    }
    $sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : '';
    $rEmailTemplate = new BxDolEmailTemplates();
    if ($profileID) {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriendProfile', getLoggedId());
        $Link = getProfileLink($profileID, $sLinkAdd);
    } else {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriend', getLoggedId());
        $Link = BX_DOL_URL_ROOT;
        if (strlen($sLinkAdd) > 0) {
            $Link .= '?' . $sLinkAdd;
        }
    }
    $aPlus = array('Link' => $Link, 'FromName' => $sSenderName);
    return sendMail($sRecipient, $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus);
}
Esempio n. 3
0
/**
 * send "tell a friend" email
 */
function SendTellFriend($iSenderID = 0)
{
    global $profileID;
    $sSenderEmail = clear_xss(bx_get('sender_email'));
    if (strlen(trim($sSenderEmail)) <= 0) {
        return 0;
    }
    $sSenderName = clear_xss(bx_get('sender_name'));
    $sSenderLink = $iSenderID != 0 ? getProfileLink($iSenderID) : BX_DOL_URL_ROOT;
    $sRecipientEmail = clear_xss(bx_get('recipient_email'));
    if (strlen(trim($sRecipientEmail)) <= 0) {
        return 0;
    }
    $sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : '';
    $rEmailTemplate = new BxDolEmailTemplates();
    if ($profileID) {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriendProfile', getLoggedId());
        $Link = getProfileLink($profileID, $sLinkAdd);
    } else {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriend', getLoggedId());
        $Link = BX_DOL_URL_ROOT;
        if (strlen($sLinkAdd) > 0) {
            $Link .= '?' . $sLinkAdd;
        }
    }
    return sendMail($sRecipientEmail, $aTemplate['Subject'], $aTemplate['Body'], '', array('Link' => $Link, 'SenderName' => $sSenderName, 'SenderLink' => $sSenderLink));
}
Esempio n. 4
0
 function BxGSearchModule(&$aModule)
 {
     parent::BxDolModule($aModule);
     $GLOBALS['aModule'] = $aModule;
     $this->_iProfileId = getLoggedId();
     $GLOBALS['oBxGSearchModule'] =& $this;
 }
Esempio n. 5
0
function getCalendar()
{
    $oProfile = new BxBaseProfileGenerator(getLoggedId());
    $mSearchRes = $oProfile->GenProfilesCalendarBlock();
    list($sResults, $aDBTopMenu, $sPagination, $sTopFilter) = $mSearchRes;
    return DesignBoxContent(_t('_People_Calendar'), $sResults, 1);
}
Esempio n. 6
0
 public function serviceAccountSettingsDelAccount($iAccountId = false)
 {
     if (false === $iAccountId) {
         $iAccountId = getLoggedId();
     }
     return $this->_oAccountForms->deleteAccountForm($iAccountId);
 }
Esempio n. 7
0
 function __construct($sType, $iAlbum = 0)
 {
     $this->iOwnerId = getLoggedId();
     if ($this->iOwnerId == 0) {
         return;
     }
     $this->iAlbumId = (int) $iAlbum;
     $this->sType = strip_tags($sType);
     $oPrivacy = new BxDolPrivacy('sys_albums', 'ID', 'Owner');
     $aPrivField = $oPrivacy->getGroupChooser($this->iOwnerId, 'sys_albums', 'view');
     $this->aForm = array('form_attrs' => array('name' => 'form_album', 'action' => '', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array('db' => array('table' => 'sys_albums', 'key' => 'ID', 'uri' => 'Uri', 'uri_title' => 'Caption', 'submit_name' => 'save')), 'inputs' => array('Caption' => array('type' => 'text', 'name' => 'Caption', 'caption' => _t('_sys_album_caption_capt'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 128), 'error' => _t('_sys_album_err_capt')), 'db' => array('pass' => 'Xss'), 'display' => true), 'Location' => array('type' => 'text', 'name' => 'Location', 'caption' => _t('_sys_album_caption_loc'), 'db' => array('pass' => 'Xss'), 'display' => true), 'Description' => array('type' => 'textarea', 'name' => 'Description', 'caption' => _t('_sys_album_caption_desc'), 'required' => true, 'html' => false, 'checker' => array('func' => 'length', 'params' => array(3, 255), 'error' => _t('_sys_album_err_desc')), 'db' => array('pass' => 'Xss')), 'allow_view_to' => $aPrivField, 'Type' => array('type' => 'hidden', 'name' => 'Type', 'db' => array('pass' => 'Xss'), 'value' => $this->sType), 'Control' => array('type' => 'input_set', 0 => array('type' => 'submit', 'name' => 'save', 'value' => _t("_sys_album_create")), 1 => array('type' => 'reset', 'name' => 'cancel', 'value' => _t("_sys_album_cancel")))));
     $iAlbum = (int) $iAlbum;
     if ($this->iAlbumId > 0) {
         $oAlbum = new BxDolAlbums($this->sType);
         $this->aInfo = $oAlbum->getAlbumInfo(array('fileId' => $iAlbum));
         if ($this->iOwnerId != $this->aInfo['Owner']) {
             return;
         }
         $this->aForm['inputs']['Control'] = array('type' => 'input_set', 'colspan' => true, 0 => array('type' => 'submit', 'name' => 'save', 'value' => _t("_sys_album_save_changes")), 1 => array('type' => 'submit', 'name' => 'delete', 'value' => _t("_sys_album_delete")), 2 => array('type' => 'submit', 'name' => 'launch', 'value' => _t("_sys_album_add")), 3 => array('type' => 'submit', 'name' => 'launch', 'value' => _t("_sys_album_edit_items")), 4 => array('type' => 'submit', 'name' => 'launch', 'value' => _t("_sys_album_organize")), 5 => array('type' => 'reset', 'name' => 'cancel', 'value' => _t("_sys_album_cancel")));
         foreach ($this->aForm['inputs'] as $sKey => $aValue) {
             if ($sKey != 'Control') {
                 $this->aForm['inputs'][$sKey]['value'] = $this->aInfo[$sKey];
             }
         }
     }
 }
function post($sSystem, $iId, $iCmtAuthorId, $iCmtParentId, $iMood, $sFileId)
{
    global $sIncPath;
    global $sModule;
    global $sHomeUrl;
    $iId = (int) $iId;
    $iCmtParentId = (int) $iCmtParentId;
    $iMood = (int) $iMood;
    bx_import('BxDolCmts');
    $oCmts = BxDolCmts::getObjectInstance($sSystem, $iId);
    if (!$oCmts) {
        return 0;
    }
    $sText = '<iframe width="100%" height="240" src="[ray_url]modules/video_comments/embed.php?id=' . $sFileId . '" frameborder="0" allowfullscreen></iframe>';
    $mixedOverrideResult = null;
    $oAlert = new BxDolAlerts('bx_video_comments', 'post', $sFileId, getLoggedId(), array('override' => &$mixedOverrideResult, 'text' => &$sText, 'file_id' => &$sFileId, 'object_id' => &$iId, 'author' => &$iCmtAuthorId, 'parent_id' => &$iCmtParentId, 'mood' => &$iMood));
    $oAlert->alert();
    if (null !== $mixedOverrideResult) {
        return $mixedOverrideResult;
    }
    $iCmtNewId = $oCmts->_oQuery->addComment($iId, $iCmtParentId, $iCmtAuthorId, $sText, $iMood);
    if (false === $iCmtNewId) {
        return 0;
    }
    bx_import('BxDolAlerts');
    $oZ = new BxDolAlerts($sSystem, 'commentPost', $oCmts->getId(), $oCmts->_getAuthorId(), array('comment_id' => $iCmtNewId, 'comment_author_id' => $iCmtAuthorId));
    $oZ->alert();
    $oCmts->_triggerComment();
    return $iCmtNewId;
}
Esempio n. 9
0
 public function onPositiveDetection($sIP, $sExtraData = '', $sType = 'dnsbl')
 {
     $iIP = sprintf("%u", ip2long($sIP));
     $iMemberId = getLoggedId();
     $sExtraData = process_db_input($sExtraData);
     return $GLOBALS['MySQL']->query("INSERT INTO `sys_antispam_block_log` SET `ip` = '{$iIP}', `member_id` = '{$iMemberId}', `type` = '{$sType}', `extra` = '{$sExtraData}', `added` = " . time());
 }
Esempio n. 10
0
 function __construct(&$aModule)
 {
     parent::__construct($aModule);
     $GLOBALS['aModule'] = $aModule;
     $this->_iProfileId = getLoggedId();
     $this->_sProto = bx_proto();
 }
Esempio n. 11
0
 /**
  * @description : function will generate profile block (used the profile template );
  * @return : Html presentation data ;
  */
 function PrintSearhResult($aProfileInfo, $aCoupleInfo = '', $aExtendedKey = null, $sTemplateName = '', $oCustomTemplate = null)
 {
     global $site;
     global $aPreValues;
     $iVisitorID = getLoggedId();
     $bExtMode = !empty($_GET['mode']) && $_GET['mode'] == 'extended' || !empty($_GET['search_result_mode']) && $_GET['search_result_mode'] == 'ext';
     $isShowMatchPercent = $bExtMode && $iVisitorID && $iVisitorID != $aProfileInfo['ID'] && getParam('view_match_percent') && getParam('enable_match');
     $sProfileThumb = get_member_thumbnail($aProfileInfo['ID'], 'none', !$bExtMode, 'visitor');
     $sProfileMatch = $isShowMatchPercent ? $GLOBALS['oFunctions']->getProfileMatch($iVisitorID, $aProfileInfo['ID']) : '';
     $sProfileNickname = '<a href="' . getProfileLink($aProfileInfo['ID']) . '">' . getNickName($aProfileInfo['ID']) . '</a>';
     $sProfileInfo = $GLOBALS['oFunctions']->getUserInfo($aProfileInfo['ID']);
     $sProfileDesc = strmaxtextlen($aProfileInfo['DescriptionMe'], 130);
     $sProfileZodiac = $bExtMode && getParam('zodiac') ? $GLOBALS['oFunctions']->getProfileZodiac($aProfileInfo['DateOfBirth']) : '';
     $sProfile2ASc1 = $sProfile2ASc2 = $sProfile2Nick = $sProfile2Desc = $sProfile2Info = $sProfile2Zodiac = '';
     if ($aCoupleInfo) {
         $sProfile2Nick = '<a href="' . getProfileLink($aCoupleInfo['ID']) . '">' . getNickName($aCoupleInfo['ID']) . '</a>';
         $sProfile2Info = $GLOBALS['oFunctions']->getUserInfo($aCoupleInfo['ID']);
         $sProfile2Desc = strmaxtextlen($aCoupleInfo['DescriptionMe'], 130);
         $sProfile2Zodiac = $bExtMode && getParam('zodiac') ? $GLOBALS['oFunctions']->getProfileZodiac($aCoupleInfo['DateOfBirth']) : '';
         $sProfile2ASc1 = 'float:left;width:31%;margin-right:10px;';
         $sProfile2ASc2 = 'float:left;width:31%;display:block;';
     } else {
         $sProfile2ASc2 = 'display:none;';
     }
     $aKeys = array('thumbnail' => $sProfileThumb, 'match' => $sProfileMatch, 'nick' => $sProfileNickname, 'info' => $sProfileInfo, 'i_am_desc' => $sProfileDesc, 'zodiac_sign' => $sProfileZodiac, 'nick2' => $sProfile2Nick, 'info2' => $sProfile2Info, 'i_am_desc2' => $sProfile2Desc, 'zodiac_sign2' => $sProfile2Zodiac, 'add_style_c1' => $sProfile2ASc1, 'add_style_c2' => $sProfile2ASc2);
     if ($aExtendedKey and is_array($aExtendedKey) and !empty($aExtendedKey)) {
         foreach ($aExtendedKey as $sKey => $sValue) {
             $aKeys[$sKey] = $sValue;
         }
     } else {
         $aKeys['ext_css_class'] = '';
     }
     return $oCustomTemplate ? $oCustomTemplate->parseHtmlByName($sTemplateName, $aKeys) : $GLOBALS['oSysTemplate']->parseHtmlByName($sTemplateName, $aKeys);
 }
Esempio n. 12
0
 /**
  * Class constructor ;
  *
  * @param   : $aModule (array) - contain some information about this module;
  *                  [ id ]           - (integer) module's  id ;
  *                  [ title ]        - (string)  module's  title ;
  *                  [ vendor ]       - (string)  module's  vendor ;
  *                  [ path ]         - (string)  path to this module ;
  *                  [ uri ]          - (string)  this module's URI ;
  *                  [ class_prefix ] - (string)  this module's php classes file prefix ;
  *                  [ db_prefix ]    - (string)  this module's Db tables prefix ;
  *                  [ date ]         - (string)  this module's date installation ;
  */
 function BxShoutBoxModule(&$aModule)
 {
     parent::BxDolModule($aModule);
     // prepare the location link ;
     $this->sPathToModule = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
     $this->aModuleInfo = $aModule;
     $this->iMemberId = getLoggedId();
 }
 /**
  * Constructor
  */
 function BxProfileCustomizeModule($aModule)
 {
     parent::BxDolModule($aModule);
     $this->iUserId = getLoggedId();
     $this->_oConfig->init($this->_oDb);
     $this->_oTemplate->init($this, $this->_oDb);
     $this->_aCssMatch = $this->_oDb->getUnits();
 }
Esempio n. 14
0
 function insert($aValsToAdd = array())
 {
     $aValsToAdd['client_id'] = strtolower(genRndPwd(self::$LENGTH_ID, false));
     $aValsToAdd['client_secret'] = strtolower(genRndPwd(self::$LENGTH_SECRET, false));
     $aValsToAdd['scope'] = 'basic';
     $aValsToAdd['user_id'] = getLoggedId();
     return parent::insert($aValsToAdd);
 }
Esempio n. 15
0
 /**
  * Constructor
  */
 function __construct($aModule)
 {
     parent::__construct($aModule);
     $this->iUserId = isLogged() && isAdmin() ? getLoggedId() : 0;
     $this->_oConfig->init($this->_oDb);
     $this->_oTemplate->init($this, $this->_oDb);
     $this->_aCssMatch = $this->_oDb->getUnits();
 }
Esempio n. 16
0
 function BxDolFilesDb(&$oConfig)
 {
     parent::BxDolModuleDb($oConfig);
     $this->_oConfig =& $oConfig;
     $this->iViewer = getLoggedId();
     $this->aFileFields = array('medID' => 'ID', 'Categories' => 'Categories', 'medProfId' => 'Owner', 'medTitle' => 'Title', 'medUri' => 'Uri', 'medDesc' => 'Description', 'medTags' => 'Tags', 'medDate' => 'Date', 'medViews' => 'Views', 'Approved' => 'Status', 'Featured' => 'Featured', 'Rate' => 'Rate', 'RateCount' => 'RateCount');
     $this->aFavoriteFields = array('fileId' => 'ID', 'ownerId' => 'Profile', 'favDate' => 'Date');
 }
Esempio n. 17
0
 public function serviceGetMenuAddonManageToolsProfileStats()
 {
     bx_import('SearchResult', $this->_aModule);
     $sClass = $this->_aModule['class_prefix'] . 'SearchResult';
     $o = new $sClass();
     $o->fillFilters(array('account_id' => getLoggedId(), 'perofileStatus' => ''));
     $o->unsetPaginate();
     return $o->getNum();
 }
Esempio n. 18
0
 /**
  * News Letters block
  */
 function getBlockCode_Subscribe()
 {
     global $site;
     $iUserId = isLogged() ? getLoggedId() : 0;
     $oSubscription = BxDolSubscription::getInstance();
     $aButton = $oSubscription->getButton($iUserId, 'system', '');
     $sContent = $oSubscription->getData() . $GLOBALS['oSysTemplate']->parseHtmlByName('home_page_subscribe.html', array('message' => _t('_SUBSCRIBE_TEXT', $site['title']), 'button_title' => $aButton['title'], 'button_script' => $aButton['script']));
     return array($sContent, array(), array(), false);
 }
Esempio n. 19
0
 public function serviceAccountSettingsDelAccount($iAccountId = false)
 {
     if (!$iAccountId) {
         $iAccountId = bx_process_input(bx_get('id'), BX_DATA_INT);
     }
     if (!$iAccountId) {
         $iAccountId = getLoggedId();
     }
     return $this->_oAccountForms->deleteAccountForm($iAccountId);
 }
 /**
  * Class constructor ;
  *
  * @param   : $aModule (array) - contain some information about this module;
  *                  [ id ]           - (integer) module's  id ;
  *                  [ title ]        - (string)  module's  title ;
  *                  [ vendor ]       - (string)  module's  vendor ;
  *                  [ path ]         - (string)  path to this module ;
  *                  [ uri ]          - (string)  this module's URI ;
  *                  [ class_prefix ] - (string)  this module's php classes file prefix ;
  *                  [ db_prefix ]    - (string)  this module's Db tables prefix ;
  *                  [ date ]         - (string)  this module's date installation ;
  */
 function BxSimpleMessengerModule($aModule)
 {
     parent::BxDolModule($aModule);
     $this->sHomeUrl = $this->_oConfig->_sHomeUrl;
     $this->aModuleInfo = $aModule;
     $this->iLoggedMemberId = getLoggedId();
     $this->aCoreSettings = array('update_time' => $this->_oConfig->iUpdateTime, 'number_visible_messages' => $this->_oConfig->iVisibleMessages, 'limit_returning_messages' => $this->_oConfig->iCountRetMessages, 'number_of_allowed_chat_boxes' => $this->_oConfig->iCountAllowedChatBoxes, 'output_block' => $this->_oConfig->sOutputBlock, 'page_receiver' => BX_DOL_URL_ROOT . 'modules/?r=' . $this->aModuleInfo['uri'] . '/get_operation', 'history_block_prefix' => $this->_oConfig->sOutputBlockPrefix, 'save_chat_history' => $this->_oConfig->bSaveChatHistory, 'language_keys' => array('empty_message' => _t('_simple_messenger_empty_message')), 'blink_counter' => $this->_oConfig->iBlinkCounter, 'message_date_format' => $this->_oConfig->sMessageDateFormat);
     $this->sMemberMenuPosition = isset($_COOKIE['menu_position']) ? $_COOKIE['menu_position'] : getParam('ext_nav_menu_top_position');
     $this->oPrivacy = new BxSimpleMessengerPrivacy($this);
 }
Esempio n. 21
0
 function BxDolTags()
 {
     $this->iViewer = getLoggedId();
     $this->sCacheFile = 'sys_objects_tag';
     $this->sNonParseParams = 'tags_non_parsable';
     $this->sCacheTable = 'sys_objects_tag';
     $this->sTagTable = 'sys_tags';
     $this->aTagFields = array('id' => 'ObjID', 'type' => 'Type', 'tag' => 'Tag', 'date' => 'Date');
     $this->aObjFields = array('id' => 'ID', 'name' => 'ObjectName', 'query' => 'Query', 'perm_param' => 'PermalinkParam', 'perm_enable' => 'EnabledPermalink', 'perm_disable' => 'DisabledPermalink', 'lang_key' => 'LangKey');
 }
 /**
  * Class constructor ;
  */
 function BxDolProfileInfoPageView($sPageName, &$aMemberInfo)
 {
     global $site, $dir;
     $this->oProfileGen = new BxBaseProfileGenerator($aMemberInfo['ID']);
     $this->aConfSite = $site;
     $this->aConfDir = $dir;
     parent::BxDolPageView($sPageName);
     $this->iMemberID = getLoggedId();
     $this->aMemberInfo =& $aMemberInfo;
 }
Esempio n. 23
0
 function BxGSearchModule(&$aModule)
 {
     parent::BxDolModule($aModule);
     $GLOBALS['aModule'] = $aModule;
     $this->_iProfileId = getLoggedId();
     $GLOBALS['oBxGSearchModule'] =& $this;
     if (0 == strncmp('https', BX_DOL_URL_ROOT, 5)) {
         $this->_sProto = 'https';
     }
 }
Esempio n. 24
0
 /**
  * Class constructor ;
  *
  * @param   : $aModule (array) - contain some information about this module;
  *                  [ id ]           - (integer) module's  id ;
  *                  [ title ]        - (string)  module's  title ;
  *                  [ vendor ]       - (string)  module's  vendor ;
  *                  [ path ]         - (string)  path to this module ;
  *                  [ uri ]          - (string)  this module's URI ;
  *                  [ class_prefix ] - (string)  this module's php classes file prefix ;
  *                  [ db_prefix ]    - (string)  this module's Db tables prefix ;
  *                  [ date ]         - (string)  this module's date installation ;
  */
 function __construct(&$aModule)
 {
     parent::__construct($aModule);
     // prepare the location link ;
     $this->sPathToModule = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
     $this->sModuleName = 'bx_' . $aModule['uri'];
     $this->aModuleInfo = $aModule;
     $this->iMemberId = getLoggedId();
     $this->_aObjects = $this->_oDb->getShoutboxObjects();
 }
Esempio n. 25
0
 function getBlockCode_People()
 {
     $iMemberId = getLoggedId();
     $aProfile = $iMemberId ? getProfileInfo($iMemberId) : array();
     // default params for search form
     $aDefaultParams = array('LookingFor' => $aProfile['Sex'] ? $aProfile['Sex'] : 'male', 'Sex' => $aProfile['LookingFor'] ? $aProfile['LookingFor'] : 'female', 'Country' => $aProfile['Country'] ? $aProfile['Country'] : getParam('default_country'), 'DateOfBirth' => getParam('search_start_age') . '-' . getParam('search_end_age'));
     bx_import('BxDolProfileFields');
     $oPF = new BxDolProfileFields(9);
     $a = array('default_params' => $aDefaultParams);
     return array($oPF->getFormCode($a), array(), array(), false);
 }
Esempio n. 26
0
/**
 * page code function
 */
function PageCompPageMainCode()
{
    $memberID = getLoggedId();
    $p_arr = getProfileInfo($memberID);
    //db_assoc_arr( "SELECT `Status` FROM `Profiles` WHERE `ID` = '$memberID'" );
    if ($p_arr['Status'] != 'Unconfirmed') {
        return _t("_NO_NEED_TO_CONFIRM_EMAIL");
    } else {
        return activation_mail($memberID);
    }
}
Esempio n. 27
0
/**
 * page code function
 */
function PageCompPageMainCode()
{
    if ($_POST['DELETE']) {
        profile_delete(getLoggedId());
        bx_logout();
        return MsgBox(_t("_DELETE_SUCCESS"));
    }
    $aForm = array('form_attrs' => array('action' => BX_DOL_URL_ROOT . 'unregister.php', 'method' => 'post', 'name' => 'form_unregister'), 'inputs' => array('delete' => array('type' => 'hidden', 'name' => 'DELETE', 'value' => '1'), 'info' => array('type' => 'custom', 'content' => _t("_DELETE_TEXT"), 'colspan' => true), 'submit' => array('type' => 'submit', 'name' => 'submit', 'value' => _t("_Delete account"))));
    $oForm = new BxTemplFormView($aForm);
    return $oForm->getCode();
}
Esempio n. 28
0
 function getEmbedCode($iFileId)
 {
     $sOverride = false;
     $oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'embed_code', $iFileId, getLoggedId(), array('override' => &$sOverride));
     $oAlert->alert();
     if ($sOverride) {
         return $sOverride;
     }
     $iFileId = (int) $iFileId;
     return getEmbedCode('mp3', 'player', array('id' => $iFileId));
 }
Esempio n. 29
0
 public function checkAllowedDelete(&$aDataEntry, $isPerformAction = false)
 {
     if (isAdmin() && (int) $aDataEntry['id'] == getLoggedId()) {
         return _t('_sys_txt_access_denied');
     }
     // check ACL
     $aCheck = checkActionModule($this->_iProfileId, 'delete account', 'system', $isPerformAction);
     if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
         return $aCheck[CHECK_ACTION_MESSAGE];
     }
     return CHECK_ACTION_RESULT_ALLOWED;
 }
Esempio n. 30
0
 function serviceSetAvatar($iPhotoID, $iAuthorId = 0)
 {
     if (!$iAuthorId) {
         $iAuthorId = getLoggedId();
     }
     $aFileInfo = $this->_oDb->getFileInfo(array('fileId' => $iPhotoID));
     $sProfileAlbumUri = uriFilter(str_replace('{nickname}', getUsername($iAuthorId), $this->_oConfig->getGlParam('profile_album_name')));
     if ($sProfileAlbumUri != $aFileInfo['albumUri']) {
         return false;
     }
     return $this->_oDb->setAvatar($iPhotoID, $aFileInfo['albumId']);
 }