コード例 #1
0
ファイル: BxDolBrowse.php プロジェクト: toxalot/dolphin.pro
 /**
  * @description : class constructor ;
  */
 function __construct($sPageName = null)
 {
     global $aPreValues;
     // read data from cache file ;
     $oCache = $GLOBALS['MySQL']->getDbCacheObject();
     $this->aMembersInfo = $oCache->getData($GLOBALS['MySQL']->genDbCacheKey('sys_browse_people'));
     if (null === $this->aMembersInfo) {
         $this->aMembersInfo = array();
     }
     // fill aDateBirthRange array ;
     $iStartDate = getParam('search_start_age');
     $iLastDate = getParam('search_end_age');
     // fill date of birth array
     while ($iStartDate <= $iLastDate) {
         $this->aDateBirthRange[$iStartDate . '-' . ($iStartDate + 2)] = 0;
         $iStartDate += 3;
     }
     // check permalink mode ;
     $this->bPermalinkMode = getParam('permalinks_browse') ? true : false;
     // check member on line time ;
     $this->iMemberOnlineTime = (int) getParam("member_online_time");
     // fill sex array ;
     ksort($aPreValues['Sex'], SORT_STRING);
     foreach ($aPreValues['Sex'] as $sKey => $aItems) {
         $this->aSexRange[$sKey] = 0;
     }
     // fill country array ;
     ksort($aPreValues['Country'], SORT_STRING);
     foreach ($aPreValues['Country'] as $sKey => $aItems) {
         $this->aCountryRange[$sKey] = 0;
     }
     if ($sPageName) {
         parent::__construct($sPageName);
     }
 }
コード例 #2
0
 function __construct(&$oMain)
 {
     parent::__construct('bx_pfw_cart');
     $this->_oMain = $oMain;
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oMain->getUserId());
     $GLOBALS['oTopMenu']->setCustomVar('sys_payment_module_uri', $this->_oMain->_oConfig->getUri());
 }
コード例 #3
0
ファイル: details.php プロジェクト: Prashank25/dolphin.pro
 function __construct(&$oPayments)
 {
     parent::__construct('bx_pmt_details');
     $this->_oPayments =& $oPayments;
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oPayments->_iUserId);
     $GLOBALS['oTopMenu']->setCustomVar('sys_payment_module_uri', $this->_oPayments->_oConfig->getUri());
 }
コード例 #4
0
ファイル: BxPollView.php プロジェクト: toxalot/dolphin.pro
 /**
  * Class constructor;
  *
  * @param : $sPageName   (string)  - builder's page name;
  * @param : $oPollModule (object)  - created poll's module object;
  * @param : $iPollId     (integer) - poll's Id;
  */
 function __construct($sPageName, &$aModule, &$oPollModule, $iPollId)
 {
     parent::__construct($sPageName);
     // define member's Id;
     $aProfileInfo = getProfileInfo();
     $this->iMemberId = isset($aProfileInfo['ID']) ? $aProfileInfo['ID'] : 0;
     $this->oModule = $oPollModule;
     $this->iPollId = $iPollId;
     if ($this->iPollId) {
         $this->aPollInfo = $this->oModule->_oDb->getPollInfo($this->iPollId);
         if (!$this->oModule->oPrivacy->check('view', $this->aPollInfo[0]['id_poll'], $this->iMemberId)) {
             echo $this->oModule->_oTemplate->defaultPage(_t('_bx_poll'), MsgBox(_t('_bx_poll_access_denied')), 2);
             exit;
         }
     }
     if ($this->aPollInfo) {
         $this->aPollInfo = array_shift($this->aPollInfo);
     }
     $this->oVotingView = new BxTemplVotingView('bx_poll', $this->iPollId);
     $this->oCmtsView = new BxPollCmts('bx_poll', $this->iPollId);
     $this->aModule = $aModule;
     if ($sPageName == 'show_poll_info') {
         $GLOBALS['oTopMenu']->setCustomSubHeaderUrl(BX_DOL_URL_ROOT . $this->oModule->_oConfig->getBaseUri() . '&action=show_poll_info&id=' . $this->iPollId);
     }
     $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array(_t('_bx_poll') => BX_DOL_URL_ROOT . $this->oModule->_oConfig->getBaseUri() . '&action=poll_home', $this->aPollInfo['poll_question'] => ''));
 }
コード例 #5
0
ファイル: pedit.php プロジェクト: toxalot/dolphin.pro
 function __construct()
 {
     global $logged;
     $this->aProfiles = array(0 => array(), 1 => array());
     // double arrays (for couples)
     $this->aValues = array(0 => array(), 1 => array());
     $this->aErrors = array(0 => array(), 1 => array());
     $iId = bx_get('ID');
     $this->iProfileID = (int) $iId;
     // basic checks
     if ($logged['member']) {
         $iMemberID = getLoggedId();
         if (!$this->iProfileID) {
             //if profile id is not set by request, edit own profile
             $this->iProfileID = $iMemberID;
             $this->iArea = 2;
         } else {
             // check if this member is owner
             if ($this->iProfileID == $iMemberID) {
                 $this->iArea = 2;
             }
         }
     } elseif ($logged['admin']) {
         $this->iArea = 3;
     } elseif ($logged['moderator']) {
         $this->iArea = 4;
     }
     $this->bAjaxMode = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest');
     $this->bForceAjaxSave = bx_get('force_ajax_save');
     parent::__construct('pedit');
 }
コード例 #6
0
 function __construct(&$oSites)
 {
     parent::__construct('bx_sites_hon');
     $this->_oSites =& $oSites;
     $this->_oTemplate = $oSites->_oTemplate;
     $this->_oDb = $oSites->_oDb;
 }
コード例 #7
0
 function __construct($aParam, $sTitle, $sUrl)
 {
     $this->_sPage = 'tags_module';
     $this->_sTitle = $sTitle ? $sTitle : _t('_all_tags');
     $this->_sUrl = $sUrl;
     $this->_aParam = $aParam;
     parent::__construct($this->_sPage);
 }
コード例 #8
0
 function __construct($aParam, $sTitle, $sUrl)
 {
     $this->_sPage = 'categ_module';
     $this->_sTitle = $sTitle ? $sTitle : _t('_categ_users');
     $this->_sUrl = $sUrl;
     $this->_aParam = $aParam;
     parent::__construct($this->_sPage);
 }
コード例 #9
0
 function __construct(&$oModule)
 {
     $this->_oMain =& $oModule;
     $this->_oTemplate = $oModule->_oTemplate;
     $this->_oConfig = $oModule->_oConfig;
     $this->_oDb = $oModule->_oDb;
     parent::__construct('bx_wmap');
 }
コード例 #10
0
 function __construct($iMember, &$aSite, &$aDir)
 {
     $this->iMember = (int) $iMember;
     $this->aMemberInfo = getProfileInfo($this->iMember);
     $this->aConfSite = $aSite;
     $this->aConfDir = $aDir;
     parent::__construct('member');
 }
コード例 #11
0
 function __construct($sType, &$oMain)
 {
     parent::__construct('bx_pfw_history');
     $this->_iVendorId = $sType == 'site' ? BX_PMT_ADMINISTRATOR_ID : BX_PMT_EMPTY_ID;
     $this->_oMain = $oMain;
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oMain->getUserId());
     $GLOBALS['oTopMenu']->setCustomVar('sys_payment_module_uri', $this->_oMain->_oConfig->getUri());
 }
コード例 #12
0
 function __construct(&$oMain, &$aProfile)
 {
     $this->_oMain =& $oMain;
     $this->_oTemplate = $oMain->_oTemplate;
     $this->_oConfig = $oMain->_oConfig;
     $this->_oDb = $oMain->_oDb;
     $this->_aProfile =& $aProfile;
     parent::__construct('bx_events_my');
 }
コード例 #13
0
 function __construct(&$oModule, $aLocation)
 {
     $this->_oMain =& $oModule;
     $this->_oTemplate = $oModule->_oTemplate;
     $this->_oConfig = $oModule->_oConfig;
     $this->_oDb = $oModule->_oDb;
     $this->_aLocation = $aLocation;
     parent::__construct('bx_wmap_edit');
 }
コード例 #14
0
 function __construct(&$oMain)
 {
     $this->_oMain =& $oMain;
     $this->_oTemplate = $oMain->_oTemplate;
     $this->_oConfig = $oMain->_oConfig;
     $this->_oDb = $oMain->_oDb;
     parent::__construct('bx_avatar_main');
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oMain->_iProfileId);
 }
コード例 #15
0
 function __construct($sName, &$oMain, &$aDataEntry)
 {
     parent::__construct($sName);
     $this->_oMain = $oMain;
     $this->_oTemplate = $oMain->_oTemplate;
     $this->_oDb = $oMain->_oDb;
     $this->_oConfig = $oMain->_oConfig;
     $this->aDataEntry =& $aDataEntry;
 }
コード例 #16
0
 function __construct($sName, &$oMain)
 {
     $this->oMain =& $oMain;
     $this->oTemplate = $oMain->_oTemplate;
     $this->oConfig = $oMain->_oConfig;
     $this->oDb = $oMain->_oDb;
     $this->sUrlStart = BX_DOL_URL_ROOT . $this->oMain->_oConfig->getBaseUri();
     $this->sUrlStart .= false === strpos($this->sUrlStart, '?') ? '?' : '&';
     parent::__construct($sName);
 }
コード例 #17
0
 function __construct(&$oSites, $aProfile, $sSubMenu)
 {
     parent::__construct('bx_sites_profile');
     $GLOBALS['oTopMenu']->setCurrentProfileNickName($aProfile['NickName']);
     $this->_oSites =& $oSites;
     $this->_oDb = $oSites->_oDb;
     $this->_oTemplate = $oSites->_oTemplate;
     $this->_oConfig = $oSites->_oConfig;
     $this->_aProfile = $aProfile;
     $this->_sSubMenu = $sSubMenu;
 }
コード例 #18
0
 /**
  * @description : class constructor ;
  * @param       : $sPageName          (string) - name of build page ;
  * @param       : $aDisplayParameters (array) ;
  * per_page (integer) - number of elements for per page ;
  * page (integer) - current page ;
  * mode (string)  - will swith member view mode ;
  * sort (string)        - sorting parameters ;
  * @param       : $iProfileID (integer) - member ID ;
  */
 function __construct($sPageName, &$aDisplayParameters, $iProfileID)
 {
     parent::__construct($sPageName);
     $this->aDisplayParameters =& $aDisplayParameters;
     $this->oSearchProfileTmpl = new BxTemplSearchProfile();
     $this->sCurrentPage = 'viewFriends.php';
     // check member on line time ;
     $this->iMemberOnlineTime = (int) getParam('member_online_time');
     $this->iProfileID = $iProfileID;
     $this->oProfile = new BxBaseProfileGenerator($iProfileID);
 }
コード例 #19
0
 function __construct($sPageName, &$oShared, $aParams = array())
 {
     parent::__construct($sPageName);
     $this->oModule = $oShared;
     $this->oTemplate = $oShared->_oTemplate;
     $this->oConfig = $oShared->_oConfig;
     $this->oDb = $oShared->_oDb;
     $this->aAddParams = $aParams;
     list($sParamName, $sParamValue, $sParamValue1, $sParamValue2, $sParamValue3) = $this->aAddParams;
     $this->iOwnerId = getID($sParamValue1);
     $this->oAlbum = new BxDolAlbums($this->oConfig->getMainPrefix(), $this->iOwnerId);
 }
コード例 #20
0
 function __construct(&$oShared, &$aFileInfo)
 {
     parent::__construct('bx_files_view');
     $this->aFileInfo = $aFileInfo;
     $this->iProfileId =& $oShared->_iProfileId;
     $this->oModule = $oShared;
     $this->oTemplate = $oShared->_oTemplate;
     $this->oConfig = $oShared->_oConfig;
     $this->oDb = $oShared->_oDb;
     $this->oSearch = new BxFilesSearch();
     $this->oTemplate->addCss('view.css');
     new BxDolViews('bx_files', $this->aFileInfo['medID']);
 }
コード例 #21
0
 function __construct(&$oPr, &$aSite, &$aDir)
 {
     $this->oProfileGen =& $oPr;
     $this->aConfSite = $aSite;
     $this->aConfDir = $aDir;
     parent::__construct('profile');
     bx_import('BxDolMemberInfo');
     $o = BxDolMemberInfo::getObjectInstance(getParam('sys_member_info_thumb'));
     $sThumbUrl = $o ? $o->get($oPr->_aProfile) : '';
     $GLOBALS['oSysTemplate']->setOpenGraphInfo(array('title' => getNickName($oPr->_aProfile['ID']), 'type' => 'profile'));
     if ($sThumbUrl) {
         $GLOBALS['oSysTemplate']->setOpenGraphInfo(array('image' => $sThumbUrl));
     }
 }
コード例 #22
0
 function __construct($oModule, $aInfo, $sBrowseCode = '')
 {
     parent::__construct('bx_sounds_album_view');
     $this->aInfo = $aInfo;
     $this->iProfileId = $oModule->_iProfileId;
     $this->oModule = $oModule;
     $this->oConfig = $oModule->_oConfig;
     $this->oDb = $oModule->_oDb;
     $this->oTemplate = $oModule->_oTemplate;
     $this->sBrowseCode = $sBrowseCode;
     if (!empty($aInfo['Caption'])) {
         $GLOBALS['oTopMenu']->setCustomSubHeader(_t('_sys_album_x', $aInfo['Caption']));
     }
 }
コード例 #23
0
 function __construct(&$oShared, &$aFileInfo)
 {
     parent::__construct('bx_sounds_view');
     $this->aFileInfo = $aFileInfo;
     $this->iProfileId =& $oShared->_iProfileId;
     $this->oModule = $oShared;
     $this->oTemplate = $oShared->_oTemplate;
     $this->oConfig = $oShared->_oConfig;
     $this->oDb = $oShared->_oDb;
     $this->oSearch = new BxSoundsSearch();
     $this->oTemplate->addCss(array('view.css', 'search.css'));
     bx_import('BxDolViews');
     new BxDolViews('bx_' . $this->oConfig->getUri(), $this->aFileInfo['medID']);
 }
コード例 #24
0
 function __construct(&$oShared, &$aFileInfo, $sPage = 'bx_photos_view')
 {
     parent::__construct($sPage);
     $this->aFileInfo = $aFileInfo;
     $this->iProfileId =& $oShared->_iProfileId;
     $this->oModule = $oShared;
     $this->oTemplate = $oShared->_oTemplate;
     $this->oConfig = $oShared->_oConfig;
     $this->oDb = $oShared->_oDb;
     $this->oSearch = new BxPhotosSearch();
     $this->oTemplate->addCss('view.css');
     bx_import('BxDolViews');
     new BxDolViews($this->oConfig->getMainPrefix(), $this->aFileInfo['medID']);
 }
コード例 #25
0
 function __construct($oModule, $aInfo, $sBrowseCode = '')
 {
     parent::__construct('bx_files_album_view');
     $this->aInfo = $aInfo;
     $this->iProfileId = $oModule->_iProfileId;
     $this->oModule = $oModule;
     $this->oConfig = $oModule->_oConfig;
     $this->oDb = $oModule->_oDb;
     $this->oTemplate = $oModule->_oTemplate;
     $this->sBrowseCode = $sBrowseCode;
     if (!empty($aInfo['Caption'])) {
         $GLOBALS['oTopMenu']->setCustomSubHeader(_t('_sys_album_x', $aInfo['Caption']));
         $GLOBALS['oTopMenu']->setCustomSubHeaderUrl(BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'browse/album/' . $aInfo['Uri'] . '/owner/' . getUsername($aInfo['Owner']));
     }
 }
コード例 #26
0
 function __construct(&$oShared)
 {
     parent::__construct($oShared->_oConfig->getMainPrefix() . '_home');
     $this->oModule = $oShared;
     $this->oDb = $oShared->_oDb;
     $this->oConfig = $oShared->_oConfig;
     $this->oTemplate = $oShared->_oTemplate;
     bx_import('Search', $this->oModule->_aModule);
     $sClassSearch = $this->oConfig->getClassPrefix() . 'Search';
     $this->oSearch = new $sClassSearch();
     $this->aVisible[] = BX_DOL_PG_ALL;
     if ($this->iMemberID) {
         $this->aVisible[] = BX_DOL_PG_MEMBERS;
     }
     $this->oSearch->aCurrent['restriction']['allow_view']['value'] = $this->aVisible;
     $this->oSearch->aCurrent['restriction']['activeStatus']['value'] = 'approved';
     $this->oSearch->aCurrent['restriction']['album_status']['value'] = 'active';
 }
コード例 #27
0
ファイル: search.php プロジェクト: Prashank25/dolphin.pro
 function __construct()
 {
     parent::__construct('search');
     // get search mode
     switch ($_REQUEST['search_mode']) {
         case 'quick':
             $iPFArea = 10;
             break;
         case 'adv':
             $iPFArea = 11;
             break;
         default:
             $iPFArea = 9;
             // simple search (default)
     }
     $this->oPF = new BxDolProfileFields($iPFArea);
     $this->aFilterSortSettings = array();
 }
コード例 #28
0
 function __construct(&$oShared, $iOwnerId, $aParams = array())
 {
     parent::__construct('bx_files_albums_my');
     $this->oTemplate = $oShared->_oTemplate;
     $this->oConfig = $oShared->_oConfig;
     $this->oDb = $oShared->_oDb;
     $this->iOwnerId = $iOwnerId;
     $this->aAddParams = $aParams;
     $this->oSearch = new BxFilesSearch('album', $this->aAddParams[1], 'owner', getUsername($this->iOwnerId));
     $this->oAlbum = new BxDolAlbums('bx_files', $this->iOwnerId);
     $this->oAlbumPrivacy = $oShared->oAlbumPrivacy;
     if (isset($this->aSystemBlocks[$this->aAddParams[0]])) {
         $this->aCurrentBlocks = $this->aSystemBlocks[$this->aAddParams[0]];
     } else {
         $this->aCurrentBlocks = $this->aSystemBlocks['main'];
     }
     $this->oTemplate->addCss('my.css');
     $this->oSearch->aCurrent['restriction']['ownerId'] = array('value' => $this->iOwnerId, 'field' => 'Owner', 'operator' => '=', 'paramName' => 'ownerId');
     $oShared->checkDefaultAlbums($this->iOwnerId);
 }
コード例 #29
0
 /**
  * Class constructor ;
  *
  * @param	: $aCommunicatorSettings (array)  - contain some necessary data ;
  * 					[ member_id	] (integer) - logged member's ID;
  * 					[ communicator_mode ] (string) - page mode ;
  * 					[ person_switcher ] (string) - switch the person mode - from me or to me ;
  * 					[ sorting ] (string) - type of message's sort ;
  * 					[ page ] (integer) - contain number of current page ;
  * 					[ per_page ] (integer) - contain per page number for current page ;
  * 					[ alert_page ] (integer) - contain number of current alert's page
  */
 function __construct($aCommunicatorSettings)
 {
     $aCommunicatorSettings['member_id'] = (int) $aCommunicatorSettings['member_id'];
     $aCommunicatorSettings['page'] = (int) $aCommunicatorSettings['page'];
     $aCommunicatorSettings['per_page'] = (int) $aCommunicatorSettings['per_page'];
     $aCommunicatorSettings['alert_page'] = (int) $aCommunicatorSettings['alert_page'];
     $aCommunicatorSettings['communicator_mode'] = process_db_input($aCommunicatorSettings['communicator_mode'], BX_TAGS_STRIP);
     $aCommunicatorSettings['person_switcher'] = process_db_input($aCommunicatorSettings['person_switcher'], BX_TAGS_STRIP);
     $aCommunicatorSettings['sorting'] = process_db_input($aCommunicatorSettings['sorting'], BX_TAGS_STRIP);
     // call the parent constructor ;
     parent::__construct('communicator_page');
     $this->aCommunicatorSettings =& $aCommunicatorSettings;
     // init some pagination parameters ;
     if ($this->aCommunicatorSettings['per_page'] < 1) {
         $this->aCommunicatorSettings['per_page'] = 10;
     }
     if ($this->aCommunicatorSettings['per_page'] > 100) {
         $this->aCommunicatorSettings['per_page'] = 100;
     }
     if ($aCommunicatorSettings['member_id'] != 0) {
         $GLOBALS['oTopMenu']->setCurrentProfileID($aCommunicatorSettings['member_id']);
     }
 }
コード例 #30
0
 function __construct($sPageName)
 {
     parent::__construct($sPageName);
 }