Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 2
0
 function __construct(&$oSites)
 {
     parent::__construct('bx_sites_hon');
     $this->_oSites =& $oSites;
     $this->_oTemplate = $oSites->_oTemplate;
     $this->_oDb = $oSites->_oDb;
 }
Ejemplo n.º 3
0
 function BxPfwPageCart(&$oMain)
 {
     parent::BxDolPageView('bx_pfw_cart');
     $this->_oMain = $oMain;
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oMain->getUserId());
     $GLOBALS['oTopMenu']->setCustomVar('sys_payment_module_uri', $this->_oMain->_oConfig->getUri());
 }
Ejemplo n.º 4
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());
 }
Ejemplo n.º 5
0
 function BxPmtOrdersPage($sType, &$oPayments)
 {
     parent::BxDolPageView('bx_pmt_orders');
     $this->_sType = $sType;
     $this->_oPayments =& $oPayments;
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oPayments->_iUserId);
 }
Ejemplo n.º 6
0
 /**
  * @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);
     }
 }
Ejemplo n.º 7
0
 function profileCustomizeBlock($aTopMenu, $sPage, $aTargets, $sTarget, $aVars)
 {
     $sContent = '';
     $aMenuItems = array();
     $sBaseUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
     $aItems = array();
     foreach ($aTopMenu as $sName => $aItem) {
         $aItems[] = array('title' => $sName, 'active' => $aItem['active'], 'href' => $aItem['href'], 'onclick' => 'oBxSctrMain.reloadCustomizeBlock(this.href, false); return false;');
     }
     $sTopMenu = BxDolPageView::getBlockCaptionMenu('site_customize', $aItems);
     // content for box
     if ($sPage != 'themes') {
         $sTopControls = $this->parsePageByName('designbox_top_controls.html', array('top_controls' => $this->parseHtmlByName('content_box_top_controls.html', array('name_box' => _t('_bx_sctr_select_target'), 'name_targets_box' => 'background_box', 'bx_repeat:targets' => $aTargets))));
         $sBoxContent = $this->parseHtmlByName('content_box.html', array('bx_if:select_target' => array('condition' => !empty($aTargets), 'content' => array('top_controls' => $sTopControls)), 'content' => call_user_func_array(array($this, '_customPage' . ucfirst($sPage)), array($sPage, $sTarget, $aVars)), 'bx_repeat:buttons' => array(array('btn_type' => 'button', 'btn_name' => 'preview', 'btn_value' => _t('_bx_sctr_btn_preview'), 'btn_action' => "oBxSctrMain.reloadCustom('" . $sPage . "', '" . $sTarget . "', 'preview');"), array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset'), 'btn_action' => "oBxSctrMain.resetCustom('" . $sPage . "', '" . $sTarget . "', 'reset');"), array('btn_type' => 'button', 'btn_name' => 'save', 'btn_value' => _t('_bx_sctr_btn_save'), 'btn_action' => "oBxSctrMain.reloadCustom('" . $sPage . "', '" . $sTarget . "', 'save');"), array('btn_type' => 'button', 'btn_name' => 'publish', 'btn_value' => _t('_bx_sctr_btn_publish'), 'btn_action' => "oBxSctrMain.showPublish('{$sBaseUrl}publish');"))));
     } else {
         $iUserId = $sTarget == 'my' ? $this->_oModule->iUserId : 0;
         $sPageThemes = $this->_customPageThemes($iUserId, true);
         if ($sPageThemes) {
             $aButtons = array(array('btn_type' => 'button', 'btn_name' => 'preview', 'btn_value' => _t('_bx_sctr_btn_preview'), 'btn_action' => "oBxSctrMain.previewTheme();"), array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset'), 'btn_action' => "oBxSctrMain.resetCustom('', '', 'reset');"), array('btn_type' => 'button', 'btn_name' => 'save', 'btn_value' => _t('_bx_sctr_btn_save'), 'btn_action' => "oBxSctrMain.saveTheme();"));
         } else {
             $aButtons = array();
         }
         if ($sPageThemes && $sTarget != 'shared') {
             $aButtons[] = array('btn_type' => 'button', 'btn_name' => 'delete', 'btn_value' => _t('_bx_sctr_btn_delete'), 'btn_action' => "oBxSctrMain.deleteTheme('" . $sBaseUrl . "deletetheme/');");
         }
         $aButtons[] = array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset_all'), 'btn_action' => "oBxSctrMain.resetAll('{$sBaseUrl}resetall');");
         $sTopControls = $this->parsePageByName('designbox_top_controls.html', array('top_controls' => $this->parseHtmlByName('content_box_top_controls.html', array('name_box' => _t('_bx_sctr_select_target'), 'name_targets_box' => 'background_box', 'bx_repeat:targets' => $aTargets))));
         $sBoxContent = $this->parseHtmlByName('content_box.html', array('bx_if:select_target' => array('condition' => !empty($aTargets), 'content' => array('top_controls' => $sTopControls)), 'content' => $sPageThemes ? $sPageThemes : MsgBox(_t('_Empty')), 'bx_repeat:buttons' => $aButtons));
     }
     // customize box
     $sContent = $this->parseHtmlByName('customize_block.html', array('js_code' => $this->getJsCode(true), 'content' => $GLOBALS['oFunctions']->transBox(DesignBoxContent(_t('_bx_sctr'), $sBoxContent, 1, $sTopMenu), false)));
     $this->addCss(array('main.css'));
     $this->addJs(array('colorinput.js', 'main.js'));
     return $sContent;
 }
 function BxDolProfilePageView(&$oPr, &$aSite, &$aDir)
 {
     $this->oProfileV =& $oPr;
     $this->aConfSite = $aSite;
     $this->aConfDir = $aDir;
     parent::BxDolPageView('profile');
 }
Ejemplo n.º 9
0
 function BxPmtDetailsPage(&$oPayments)
 {
     parent::BxDolPageView('bx_pmt_details');
     $this->_oPayments =& $oPayments;
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oPayments->_iUserId);
     $GLOBALS['oTopMenu']->setCustomVar('sys_payment_module_uri', $this->_oPayments->_oConfig->getUri());
 }
Ejemplo n.º 10
0
 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());
 }
Ejemplo n.º 11
0
 function BxSitesPageHon(&$oSites)
 {
     parent::BxDolPageView('bx_sites_hon');
     $this->_oSites =& $oSites;
     $this->_oTemplate = $oSites->_oTemplate;
     $this->_oDb = $oSites->_oDb;
 }
Ejemplo n.º 12
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());
 }
Ejemplo n.º 13
0
 function BxSitesPageMain(&$oSites)
 {
     parent::BxDolPageView('bx_sites_main');
     $this->_oSites =& $oSites;
     $this->_oTemplate = $oSites->_oTemplate;
     $this->_oConfig = $oSites->_oConfig;
     $this->_oDb = $oSites->_oDb;
 }
Ejemplo n.º 14
0
 function __construct(&$oModule)
 {
     $this->_oMain =& $oModule;
     $this->_oTemplate = $oModule->_oTemplate;
     $this->_oConfig = $oModule->_oConfig;
     $this->_oDb = $oModule->_oDb;
     parent::__construct('bx_wmap');
 }
Ejemplo n.º 15
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);
 }
Ejemplo n.º 16
0
 function BxBaseCategoriesModule($aParam, $sTitle, $sUrl)
 {
     $this->_sPage = 'categ_module';
     $this->_sTitle = $sTitle ? $sTitle : _t('_categ_users');
     $this->_sUrl = $sUrl;
     $this->_aParam = $aParam;
     parent::BxDolPageView($this->_sPage);
 }
Ejemplo n.º 17
0
 function BxPmtHistoryPage($sType, &$oPayments)
 {
     parent::BxDolPageView('bx_pmt_history');
     $this->_iVendorId = $sType == 'site' ? BX_PMT_ADMINISTRATOR_ID : BX_PMT_EMPTY_ID;
     $this->_oPayments =& $oPayments;
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_oPayments->_iUserId);
     $GLOBALS['oTopMenu']->setCustomVar('sys_payment_module_uri', $this->_oPayments->_oConfig->getUri());
 }
Ejemplo n.º 18
0
 function BxDolMember($iMember, &$aSite, &$aDir)
 {
     $this->iMember = (int) $iMember;
     $this->aMemberInfo = getProfileInfo($this->iMember);
     $this->aConfSite = $aSite;
     $this->aConfDir = $aDir;
     parent::BxDolPageView('member');
 }
Ejemplo n.º 19
0
 function BxAvaPageMain(&$oMain)
 {
     $this->_oMain =& $oMain;
     $this->_oTemplate = $oMain->_oTemplate;
     $this->_oConfig = $oMain->_oConfig;
     $this->_oDb = $oMain->_oDb;
     parent::BxDolPageView('bx_avatar_main');
 }
Ejemplo n.º 20
0
 function __construct($iMember, &$aSite, &$aDir)
 {
     $this->iMember = (int) $iMember;
     $this->aMemberInfo = getProfileInfo($this->iMember);
     $this->aConfSite = $aSite;
     $this->aConfDir = $aDir;
     parent::__construct('member');
 }
Ejemplo n.º 21
0
 function BxMapPageMain(&$oModule)
 {
     $this->oMain =& $oModule;
     $this->oTemplate = $oModule->_oTemplate;
     $this->oConfig = $oModule->_oConfig;
     $this->oDb = $oModule->_oDb;
     parent::BxDolPageView('bx_map');
 }
Ejemplo n.º 22
0
 function BxSitesPageView(&$oSites, $aSite)
 {
     parent::BxDolPageView('bx_sites_view');
     $this->_oSites =& $oSites;
     $this->_aSite = $aSite;
     $this->_oTemplate = $oSites->_oTemplate;
     $this->_oConfig = $oSites->_oConfig;
 }
Ejemplo n.º 23
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);
 }
Ejemplo n.º 24
0
 function BxBaseTagsModule($aParam, $sTitle, $sUrl)
 {
     $this->_sPage = 'tags_module';
     $this->_sTitle = $sTitle ? $sTitle : _t('_all_tags');
     $this->_sUrl = $sUrl;
     $this->_aParam = $aParam;
     parent::BxDolPageView($this->_sPage);
 }
Ejemplo n.º 25
0
 function getCategTopMenuHtml($aParam, $iBoxId, $sAction = '')
 {
     $aItems = array();
     $aTopMenu = $this->getCategTopMenu($aParam, $sAction);
     foreach ($aTopMenu as $sName => $aItem) {
         $aItems[$sName] = array('dynamic' => true, 'active' => $aItem['active'], 'href' => $aItem['href']);
     }
     return BxDolPageView::getBlockCaptionItemCode($iBoxId, $aItems);
 }
Ejemplo n.º 26
0
 function BxEventsPageMy(&$oMain, &$aProfile)
 {
     $this->_oMain =& $oMain;
     $this->_oTemplate = $oMain->_oTemplate;
     $this->_oConfig = $oMain->_oConfig;
     $this->_oDb = $oMain->_oDb;
     $this->_aProfile =& $aProfile;
     parent::BxDolPageView('bx_events_my');
 }
Ejemplo n.º 27
0
 function BxDolTwigPageView($sName, &$oMain, &$aDataEntry)
 {
     parent::BxDolPageView($sName);
     $this->_oMain = $oMain;
     $this->_oTemplate = $oMain->_oTemplate;
     $this->_oDb = $oMain->_oDb;
     $this->_oConfig = $oMain->_oConfig;
     $this->aDataEntry =& $aDataEntry;
 }
Ejemplo n.º 28
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');
 }
Ejemplo n.º 29
0
 function BxMapPageEdit(&$oModule, &$aLocation)
 {
     $this->oMain =& $oModule;
     $this->oTemplate = $oModule->_oTemplate;
     $this->oConfig = $oModule->_oConfig;
     $this->oDb = $oModule->_oDb;
     $this->aLocation = $aLocation;
     parent::BxDolPageView('bx_map_edit');
 }
Ejemplo n.º 30
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');
 }