function MlClonetwoPageFields($iAreaID)
 {
     global $site;
     $this->sCacheFile = BX_DIRECTORY_PATH_DBCACHE . 'db_' . 'ml_clonetwo_fields' . '_' . md5($site['ver'] . $site['build'] . $site['url']) . '.php';
     $this->iAreaID = $iAreaID;
     switch ($this->iAreaID) {
         case 1:
             $this->areaPageName = 'Join';
             break;
         case 2:
             $this->areaPageName = 'Edit';
             break;
         case 5:
             $this->areaPageName = 'View';
             break;
     }
     if (!$this->loadCache()) {
         return false;
     }
     $oModuleDb = new BxDolModuleDb();
     $this->_aModule = $oModuleDb->getModuleByUri('clonetwo');
     $this->_oMain = new MlClonetwoModule($this->_aModule);
     $sDelimeter = getParam('ml_clonetwo_multi_divider');
     $this->_sDelimeter = $sDelimeter ? $sDelimeter : ';';
     $this->_iProfileId = getLoggedId();
     $this->_aMedia = array('photos' => array('post' => 'ready_images', 'upload_func' => 'uploadPhotos', 'tag' => BX_WELLS_PHOTOS_TAG, 'cat' => BX_WELLS_PHOTOS_CAT, 'thumb' => 'thumb', 'module' => 'photos', 'title_upload_post' => 'images_titles', 'title_upload' => _t('_ml_clonetwo_form_caption_file_title'), 'service_method' => 'get_photo_array'), 'videos' => array('post' => 'ready_videos', 'upload_func' => 'uploadVideos', 'tag' => BX_WELLS_VIDEOS_TAG, 'cat' => BX_WELLS_VIDEOS_CAT, 'thumb' => false, 'module' => 'videos', 'title_upload_post' => 'videos_titles', 'title_upload' => _t('_ml_clonetwo_form_caption_file_title'), 'service_method' => 'get_video_array'), 'sounds' => array('post' => 'ready_sounds', 'upload_func' => 'uploadSounds', 'tag' => BX_WELLS_SOUNDS_TAG, 'cat' => BX_WELLS_SOUNDS_CAT, 'thumb' => false, 'module' => 'sounds', 'title_upload_post' => 'sounds_titles', 'title_upload' => _t('_ml_clonetwo_form_caption_file_title'), 'service_method' => 'get_music_array'), 'files' => array('post' => 'ready_files', 'upload_func' => 'uploadFiles', 'tag' => BX_WELLS_FILES_TAG, 'cat' => BX_WELLS_FILES_CAT, 'thumb' => false, 'module' => 'files', 'title_upload_post' => 'files_titles', 'title_upload' => _t('_ml_clonetwo_form_caption_file_title'), 'service_method' => 'get_file_array'));
 }
예제 #2
0
 function __construct($aCustomForm)
 {
     if (isset($aCustomForm['inputs']['allow_post_in_forum_to']['type'])) {
         $oModuleDb = new BxDolModuleDb();
         if (!$oModuleDb->getModuleByUri('forum')) {
             $aCustomForm['inputs']['allow_post_in_forum_to']['type'] = 'hidden';
         }
     }
     parent::__construct($aCustomForm);
 }
예제 #3
0
 public static function call($mixed, $sMethod, $aParams = array(), $sClass = 'Module')
 {
     $oDb = new BxDolModuleDb();
     if (is_string($mixed)) {
         $aModule = $oDb->getModuleByUri($mixed);
     } else {
         $aModule = $oDb->getModuleById($mixed);
     }
     return empty($aModule) ? '' : BxDolRequest::processAsService($aModule, $sMethod, $aParams, $sClass);
 }
예제 #4
0
 function BxDolFormMedia($aCustomForm)
 {
     if (isset($aCustomForm['inputs']['allow_post_in_forum_to']['type'])) {
         $oModuleDb = new BxDolModuleDb();
         if (!$oModuleDb->getModuleByUri('forum')) {
             $aCustomForm['inputs']['allow_post_in_forum_to']['type'] = 'hidden';
         }
     }
     parent::BxTemplFormView($aCustomForm);
 }
예제 #5
0
 function getBlockCode_ForumFeed()
 {
     if (!$this->_oMain->isAllowedReadForum($this->aDataEntry)) {
         return '';
     }
     $oModuleDb = new BxDolModuleDb();
     if (!$oModuleDb->getModuleByUri('forum')) {
         return '';
     }
     $sRssId = 'forum|' . $this->_oConfig->getUri() . '|' . rawurlencode($this->aDataEntry[$this->_oDb->_sFieldUri]);
     return '<div class="RSSAggrCont" rssid="' . $sRssId . '" rssnum="8" member="' . getLoggedId() . '">' . $GLOBALS['oFunctions']->loadingBoxInline() . '</div>';
 }
function getMemberMenuAdsList($iID)
{
    $oMemberMenu = bx_instance('BxDolMemberMenu');
    $oModuleDb = new BxDolModuleDb();
    $aModule = $oModuleDb->getModuleByUri('ads');
    $oAds = new BxAdsModule($aModule);
    $sAdsMainLink = $oAds->bUseFriendlyLinks ? BX_DOL_URL_ROOT . 'ads/my_page/' : "{$oAds->sCurrBrowsedFile}?action=my_page";
    $iMyAdsCnt = $oAds->_oDb->getMemberAdsCnt($iID);
    // language keys;
    $aLanguageKeys = array('ads' => _t('_bx_ads_Ads'));
    // fill all necessary data;
    $aLinkInfo = array('item_img_src' => $oAds->_oTemplate->getIconUrl('ads.png'), 'item_img_alt' => $aLanguageKeys['ads'], 'item_link' => $sAdsMainLink, 'item_onclick' => null, 'item_title' => $aLanguageKeys['ads'], 'extra_info' => $iMyAdsCnt);
    return $oMemberMenu->getGetExtraMenuLink($aLinkInfo);
}
예제 #7
0
 function actionCheckPayment($bInstall = true)
 {
     if (!$bInstall) {
         return BX_DOL_INSTALLER_SUCCESS;
     }
     $aError = array('code' => BX_DOL_INSTALLER_FAILED, 'content' => _t('_adm_txt_modules_wrong_dependency_install_payment'));
     $sPayment = getParam('sys_default_payment');
     if (empty($sPayment)) {
         return $aError;
     }
     $oModuleDb = new BxDolModuleDb();
     $aPayment = $oModuleDb->getModuleByUri($sPayment);
     if (empty($aPayment) || !is_array($aPayment)) {
         return $aError;
     }
     return BX_DOL_INSTALLER_SUCCESS;
 }
예제 #8
0
*     copyright            : (C) 2006 BoonEx Group
*     website              : http://www.boonex.com/
* This file is part of Dolphin - Smart Community Builder
*
* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once '../../../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
//require_once( BX_DIRECTORY_PATH_MODULES . $aModule['path'] . '/classes/' . $aModule['class_prefix'] . 'Module.php');
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolModuleDb.php';
require_once BX_DIRECTORY_PATH_MODULES . 'boonex/custom_rss/classes/BxCRSSModule.php';
check_logged();
$oModuleDb = new BxDolModuleDb();
$aModule = $oModuleDb->getModuleByUri('custom_rss');
$oBxCRSSModule = new BxCRSSModule($aModule);
$sAction = bx_get('action');
$sCodeResult = '';
switch ($sAction) {
    case 'a':
    default:
        $sCodeResult = $oBxCRSSModule->GenCustomRssBlock((int) bx_get('ID'));
        break;
}
echo $sCodeResult;
예제 #9
0
 function serviceGetActionsChecklist($sType)
 {
     bx_instance('BxDolModuleDb');
     $oModuleDb = new BxDolModuleDb();
     $aHandlers = $this->_oDb->getHandlers(array('type' => $sType));
     $aResults = array();
     foreach ($aHandlers as $aHandler) {
         $aModule = $oModuleDb->getModuleByUri($aHandler['module_uri']);
         if (empty($aModule)) {
             $aModule['title'] = _t('_wall_alert_module_' . $aHandler['alert_unit']);
         }
         $aResults[$aHandler['id']] = $aModule['title'] . ' (' . _t('_wall_alert_action_' . $aHandler['alert_action']) . ')';
     }
     asort($aResults);
     return $aResults;
 }
예제 #10
0
 function _methodExists($mixedModule, $sMethodType, $sMethodName, $sClass = "Module")
 {
     $aModule = $mixedModule;
     if (is_string($mixedModule)) {
         $oModuleDb = new BxDolModuleDb();
         $aModule = $oModuleDb->getModuleByUri($mixedModule);
     }
     $sClass = $aModule['class_prefix'] . $sClass;
     if (($oModule = BxDolRequest::_require($aModule, $sClass)) === false) {
         return false;
     }
     $sMethod = $sMethodType . str_replace(' ', '', ucwords(str_replace('_', ' ', $sMethodName)));
     return method_exists($oModule, $sMethod);
 }
* License, or  any later version.
*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with Dolphin,
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once '../../../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin.inc.php';
require_once BX_DIRECTORY_PATH_MODULES . 'modloaded/clonetwo/classes/MlClonetwoModule.php';
bx_import('BxDolModuleDb');
$_page['name_index'] = 151;
check_logged();
$oModuleDb = new BxDolModuleDb();
$aModule = $oModuleDb->getModuleByUri('clonetwo');
$_page['header'] = _t('_ml_clonetwo_create_page');
$_page['header_text'] = _t('_ml_clonetwo_create_page');
$oMlClonetwo = new MlClonetwoModule($aModule);
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompPages($oMlClonetwo);
$oMlClonetwo->_oTemplate->addCss('forms_extra.css');
function PageCompPages($oMlClonetwo)
{
    if (!$oMlClonetwo->isAllowedAdd()) {
        return DesignBoxContent(_t('_ml_clonetwo_create_page'), MsgBox(_t('_Access denied')), 1);
    }
    require_once BX_DIRECTORY_PATH_MODULES . 'modloaded/clonetwo/classes/MlClonetwoCreatePageProcessor.php';
    $oCreatePageProc = new MlClonetwoCreatePageProcessor();
    $aVars = array('form' => $oCreatePageProc->process(), 'create_url' => BX_DOL_URL_ROOT . 'modules/modloaded/clonetwo/create.php');
    $GLOBALS['oSysTemplate']->addJsTranslation('_Errors in join form');
 function savePage()
 {
     $aDiff = $this->getDiffValues(0);
     list($aUpd, $aMedia) = $this->oPF->getPageFromValues($aDiff);
     $sDelimeter = getParam('ml_clonetwo_multi_divider');
     $sDelimeter = $sDelimeter ? $sDelimeter : ';';
     if ($aDiff['title']) {
         $aUpd['uri'] = uriGenerate($aDiff['title'], 'ml_clonetwo_main', 'title');
     }
     $sTitle = $aDiff['title'] ? $aDiff['title'] : db_value("SELECT `title` FROM `ml_clonetwo_main` WHERE `id` = {$this->iPageID} LIMIT 1");
     if (!empty($aMedia)) {
         foreach ($aMedia as $sKey => $sValue) {
             $aMediaData = explode($sDelimeter, $aUpd[$sValue]);
             switch ($sKey) {
                 case 'photo':
                     $sTable = 'ml_clonetwo_images';
                     $iIdField = 'entry_id';
                     $iMedIdField = 'media_id';
                     if ($_POST['thumb_radio']) {
                         db_res("UPDATE `ml_clonetwo_main` SET `thumb` = {$_POST['thumb_radio']} WHERE `id` = {$this->iPageID} LIMIT 1");
                     }
                     if (!empty($_POST[$sValue . '_check_photos'])) {
                         foreach ($_POST[$sValue . '_check_photos'] as $sValue) {
                             if ($sValue) {
                                 db_res("DELETE FROM `{$sTable}` WHERE `{$iIdField}` = {$this->iPageID} AND `{$iMedIdField}` = {$sValue} LIMIT 1");
                             }
                         }
                     }
                     if (BxDolRequest::serviceExists("photos", "perform_photo_upload", 'Uploader')) {
                         $i = 0;
                         foreach ($aMediaData as $sData) {
                             $aInfo = array('medTitle' => $_POST[$sValue . '_title_photos'][$i] ? $_POST[$sValue . '_title_photos'][$i] : $_FILES[$sValue]['name'][$i], 'Categories' => array($aUpd['title'] . ' ' . _t("_bx_{$sKey}s")), 'album' => _t('_ml_clonetwo_photo_album', $aUpd['title']));
                             if ($sData) {
                                 $this->looper();
                                 $iMediaId = BxDolService::call("photos", "perform_photo_upload", array($GLOBALS['dir']['tmp'] . $sData, $aInfo, false), 'Uploader');
                                 if ($iMediaId) {
                                     @unlink($GLOBALS['dir']['tmp'] . $sData);
                                     if (db_value("SHOW TABLES LIKE '{$sTable}'")) {
                                         db_res("INSERT INTO `{$sTable}` SET `{$iIdField}` = {$this->iPageID}, `{$iMedIdField}` = {$iMediaId}");
                                     }
                                     if (!db_value("SELECT `thumb` FROM `ml_clonetwo_main` WHERE `id` = {$this->iPageID} LIMIT 1") && $i == 0) {
                                         db_res("UPDATE `ml_clonetwo_main` SET `thumb` = {$iMediaId} WHERE `id` = {$this->iPageID} LIMIT 1");
                                     }
                                 }
                             }
                             $i++;
                         }
                     }
                     break;
                 case 'video':
                     $sTable = 'ml_clonetwo_videos';
                     $iIdField = 'entry_id';
                     $iMedIdField = 'media_id';
                     if (!empty($_POST[$sValue . '_check_videos'])) {
                         foreach ($_POST[$sValue . '_check_videos'] as $sValue) {
                             if ($sValue) {
                                 db_res("DELETE FROM `{$sTable}` WHERE `{$iIdField}` = {$this->iPageID} AND `{$iMedIdField}` = {$sValue} LIMIT 1");
                             }
                         }
                     }
                     if (BxDolRequest::serviceExists("videos", "perform_video_upload", 'Uploader')) {
                         $i = 0;
                         if ($sData) {
                             foreach ($aMediaData as $sData) {
                                 $aInfo = array('medTitle' => $_POST[$sValue . '_title_videos'][$i] ? $_POST[$sValue . '_title_videos'][$i] : $_FILES[$sValue]['name'][$i], 'Categories' => array($aUpd['title'] . ' ' . _t("_bx_{$sKey}s")), 'album' => _t('_ml_clonetwo_photo_album', $aUpd['title']));
                                 $this->looper();
                                 $iMediaId = BxDolService::call("videos", "perform_video_upload", array($GLOBALS['dir']['tmp'] . $sData, $aInfo, false), 'Uploader');
                                 if ($iMediaId) {
                                     @unlink($GLOBALS['dir']['tmp'] . $sData);
                                     if (db_value("SHOW TABLES LIKE '{$sTable}'")) {
                                         db_res("INSERT INTO `{$sTable}` SET `{$iIdField}` = {$this->iPageID}, `{$iMedIdField}` = {$iMediaId}");
                                     }
                                 }
                             }
                             $i++;
                         }
                     }
                     break;
                 case 'sound':
                     $sTable = 'ml_clonetwo_sounds';
                     $iIdField = 'entry_id';
                     $iMedIdField = 'media_id';
                     if (!empty($_POST[$sValue . '_check_sounds'])) {
                         foreach ($_POST[$sValue . '_check_sounds'] as $sValue) {
                             if ($sValue) {
                                 db_res("DELETE FROM `{$sTable}` WHERE `{$iIdField}` = {$this->iPageID} AND `{$iMedIdField}` = {$sValue} LIMIT 1");
                             }
                         }
                     }
                     if (BxDolRequest::serviceExists("sounds", "perform_music_upload", 'Uploader')) {
                         $i = 0;
                         if ($sData) {
                             foreach ($aMediaData as $sData) {
                                 $aInfo = array('medTitle' => $_POST[$sValue . '_title_sounds'][$i] ? $_POST[$sValue . '_title_sounds'][$i] : $_FILES[$sValue]['name'][$i], 'Categories' => array($aUpd['title'] . ' ' . _t("_bx_{$sKey}s")), 'album' => _t('_ml_clonetwo_photo_album', $aUpd['title']));
                                 $this->looper();
                                 $iMediaId = BxDolService::call("sounds", "perform_music_upload", array($GLOBALS['dir']['tmp'] . $sData, $aInfo, false), 'Uploader');
                                 if ($iMediaId) {
                                     @unlink($GLOBALS['dir']['tmp'] . $sData);
                                     if (db_value("SHOW TABLES LIKE '{$sTable}'")) {
                                         db_res("INSERT INTO `{$sTable}` SET `{$iIdField}` = {$this->iPageID}, `{$iMedIdField}` = {$iMediaId}");
                                     }
                                 }
                             }
                             $i++;
                         }
                     }
                     break;
                 case 'file':
                     $sTable = 'ml_clonetwo_files';
                     $iIdField = 'entry_id';
                     $iMedIdField = 'media_id';
                     if (!empty($_POST[$sValue . '_check_files'])) {
                         foreach ($_POST[$sValue . '_check_files'] as $sValue) {
                             if ($sValue) {
                                 db_res("DELETE FROM `{$sTable}` WHERE `{$iIdField}` = {$this->iPageID} AND `{$iMedIdField}` = {$sValue} LIMIT 1");
                             }
                         }
                     }
                     if (BxDolRequest::serviceExists("files", "perform_file_upload", 'Uploader')) {
                         $i = 0;
                         if ($sData) {
                             foreach ($aMediaData as $sData) {
                                 $aInfo = array('medTitle' => $_POST[$sValue . '_title_files'][$i] ? $_POST[$sValue . '_title_files'][$i] : $_FILES[$sValue]['name'][$i], 'Categories' => array($aUpd['title'] . ' ' . _t("_bx_{$sKey}s")), 'album' => _t('_ml_clonetwo_photo_album', $aUpd['title']));
                                 $this->looper();
                                 $iMediaId = BxDolService::call("files", "perform_file_upload", array($GLOBALS['dir']['tmp'] . $sData, $aInfo, false), 'Uploader');
                                 if ($iMediaId) {
                                     @unlink($GLOBALS['dir']['tmp'] . $sData);
                                     if (db_value("SHOW TABLES LIKE '{$sTable}'")) {
                                         db_res("INSERT INTO `{$sTable}` SET `{$iIdField}` = {$this->iPageID}, `{$iMedIdField}` = {$iMediaId}");
                                     }
                                 }
                             }
                             $i++;
                         }
                     }
                     break;
                 case 'youtube':
                     $i = 0;
                     $sTable = 'ml_clonetwo_youtube';
                     $iUIdField = 'id';
                     $iIdField = 'id_entry';
                     $sUrlField = 'url';
                     $sTitleField = 'title';
                     if (!empty($_POST[$sValue . '_check_youtube'])) {
                         foreach ($_POST[$sValue . '_check_youtube'] as $sValue) {
                             if ($sValue) {
                                 db_res("DELETE FROM `{$sTable}` WHERE `{$iIdField}` = {$this->iPageID} AND `{$iUIdField}` = {$sValue} LIMIT 1");
                             }
                         }
                     }
                     foreach ($aMediaData as $sData) {
                         if ($sData) {
                             $sTitle = $_POST[$sValue . '_title_youtube'][$i];
                             if (db_value("SHOW TABLES LIKE '{$sTable}'") && $sData) {
                                 db_res("INSERT INTO `{$sTable}` SET `{$iIdField}` = {$this->iPageID}, `{$sUrlField}` = '{$sData}', `{$sTitleField}` = '{$sTitle}'");
                             }
                         }
                         $i++;
                     }
                     break;
                 case 'rss':
                     $i = 0;
                     $sTable = 'ml_clonetwo_rss';
                     $iUIdField = 'id';
                     $iIdField = 'id_entry';
                     $sUrlField = 'url';
                     $sTitleField = 'name';
                     if (!empty($_POST[$sValue . '_check_rss'])) {
                         foreach ($_POST[$sValue . '_check_rss'] as $sValue) {
                             if ($sValue) {
                                 db_res("DELETE FROM `{$sTable}` WHERE `{$iIdField}` = {$this->iPageID} AND `{$iUIdField}` = {$sValue} LIMIT 1");
                             }
                         }
                     }
                     foreach ($aMediaData as $sData) {
                         if ($sData) {
                             $sTitle = $_POST[$sValue . '_title_rss'][$i];
                             if (db_value("SHOW TABLES LIKE '{$sTable}'") && $sData) {
                                 db_res("INSERT INTO `{$sTable}` SET `{$iIdField}` = {$this->iPageID}, `{$sUrlField}` = '{$sData}', `{$sTitleField}` = '{$sTitle}'");
                             }
                         }
                         $i++;
                     }
                     break;
             }
         }
     }
     $oModuleDb = new BxDolModuleDb();
     $aModule = $oModuleDb->getModuleByUri('clonetwo');
     $iProfileId = getLoggedId();
     bx_import('BxDolTags');
     $o = new BxDolTags();
     $o->reparseObjTags('ml_clonetwo', $this->iPageID);
     bx_import('BxDolCategories');
     $o = new BxDolCategories();
     $o->reparseObjTags('ml_clonetwo', $this->iPageID);
     $this->oPC->updatePage($this->iPageID, $aUpd);
 }
예제 #13
0
 function __construct($oMain, $iProfileId, $iEntryId = 0, $iThumb = 0)
 {
     $this->_oMain = $oMain;
     $this->_oDb = $oMain->_oDb;
     $this->_aMedia = array();
     if (BxDolRequest::serviceExists('photos', 'perform_photo_upload', 'Uploader')) {
         $this->_aMedia['images'] = array('post' => 'ready_images', 'upload_func' => 'uploadPhotos', 'tag' => BX_EVENTS_PHOTOS_TAG, 'cat' => BX_EVENTS_PHOTOS_CAT, 'thumb' => 'PrimPhoto', 'module' => 'photos', 'title_upload_post' => 'images_titles', 'title_upload' => _t('_bx_events_form_caption_file_title'), 'service_method' => 'get_photo_array');
     }
     if (BxDolRequest::serviceExists('videos', 'perform_video_upload', 'Uploader')) {
         $this->_aMedia['videos'] = array('post' => 'ready_videos', 'upload_func' => 'uploadVideos', 'tag' => BX_EVENTS_VIDEOS_TAG, 'cat' => BX_EVENTS_VIDEOS_CAT, 'thumb' => false, 'module' => 'videos', 'title_upload_post' => 'videos_titles', 'title_upload' => _t('_bx_events_form_caption_file_title'), 'service_method' => 'get_video_array');
     }
     if (BxDolRequest::serviceExists('sounds', 'perform_music_upload', 'Uploader')) {
         $this->_aMedia['sounds'] = array('post' => 'ready_sounds', 'upload_func' => 'uploadSounds', 'tag' => BX_EVENTS_SOUNDS_TAG, 'cat' => BX_EVENTS_SOUNDS_CAT, 'thumb' => false, 'module' => 'sounds', 'title_upload_post' => 'sounds_titles', 'title_upload' => _t('_bx_events_form_caption_file_title'), 'service_method' => 'get_music_array');
     }
     if (BxDolRequest::serviceExists('files', 'perform_file_upload', 'Uploader')) {
         $this->_aMedia['files'] = array('post' => 'ready_files', 'upload_func' => 'uploadFiles', 'tag' => BX_EVENTS_FILES_TAG, 'cat' => BX_EVENTS_FILES_CAT, 'thumb' => false, 'module' => 'files', 'title_upload_post' => 'files_titles', 'title_upload' => _t('_bx_events_form_caption_file_title'), 'service_method' => 'get_file_array');
     }
     bx_import('BxDolCategories');
     $oCategories = new BxDolCategories();
     $oCategories->getTagObjectConfig();
     $oProfileFields = new BxDolProfileFields(0);
     $aCountries = $oProfileFields->convertValues4Input('#!Country');
     // generate templates for form custom elements
     $aCustomMediaTemplates = $this->generateCustomMediaTemplates($this->_oMain->_iProfileId, $iEntryId, $iThumb);
     // privacy
     $aInputPrivacyCustom = array();
     $aInputPrivacyCustom[] = array('key' => '', 'value' => '----');
     $aInputPrivacyCustom[] = array('key' => 'p', 'value' => _t('_bx_events_privacy_participants_only'));
     $aInputPrivacyCustomPass = array('pass' => 'Preg', 'params' => array('/^([0-9p]+)$/'));
     $aInputPrivacyCustom2 = array(array('key' => 'p', 'value' => _t('_bx_events_privacy_participants')), array('key' => 'a', 'value' => _t('_bx_events_privacy_admins_only')));
     $aInputPrivacyCustom2Pass = array('pass' => 'Preg', 'params' => array('/^([pa]+)$/'));
     $aInputPrivacyViewParticipants = $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'view_participants');
     $aInputPrivacyViewParticipants['values'] = array_merge($aInputPrivacyViewParticipants['values'], $aInputPrivacyCustom);
     $aInputPrivacyComment = $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'comment');
     $aInputPrivacyComment['values'] = array_merge($aInputPrivacyComment['values'], $aInputPrivacyCustom);
     $aInputPrivacyComment['db'] = $aInputPrivacyCustomPass;
     $aInputPrivacyRate = $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'rate');
     $aInputPrivacyRate['values'] = array_merge($aInputPrivacyRate['values'], $aInputPrivacyCustom);
     $aInputPrivacyRate['db'] = $aInputPrivacyCustomPass;
     $aInputPrivacyForum = $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'post_in_forum');
     $aInputPrivacyForum['values'] = array_merge($aInputPrivacyForum['values'], $aInputPrivacyCustom);
     $aInputPrivacyForum['db'] = $aInputPrivacyCustomPass;
     $aInputPrivacyForumView = $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'view_forum');
     $aInputPrivacyForumView['values'] = array_merge($aInputPrivacyForumView['values'], $aInputPrivacyCustom);
     $aInputPrivacyForumView['db'] = $aInputPrivacyCustomPass;
     $aInputPrivacyUploadPhotos = $this->_oMain->_oPrivacy->getGroupChooser($iProfileId, 'events', 'upload_photos');
     $aInputPrivacyUploadPhotos['values'] = $aInputPrivacyCustom2;
     $aInputPrivacyUploadPhotos['db'] = $aInputPrivacyCustom2Pass;
     $aInputPrivacyUploadVideos = $this->_oMain->_oPrivacy->getGroupChooser($iProfileId, 'events', 'upload_videos');
     $aInputPrivacyUploadVideos['values'] = $aInputPrivacyCustom2;
     $aInputPrivacyUploadVideos['db'] = $aInputPrivacyCustom2Pass;
     $aInputPrivacyUploadSounds = $this->_oMain->_oPrivacy->getGroupChooser($iProfileId, 'events', 'upload_sounds');
     $aInputPrivacyUploadSounds['values'] = $aInputPrivacyCustom2;
     $aInputPrivacyUploadSounds['db'] = $aInputPrivacyCustom2Pass;
     $aInputPrivacyUploadFiles = $this->_oMain->_oPrivacy->getGroupChooser($iProfileId, 'events', 'upload_files');
     $aInputPrivacyUploadFiles['values'] = $aInputPrivacyCustom2;
     $aInputPrivacyUploadFiles['db'] = $aInputPrivacyCustom2Pass;
     $aCustomForm = array('form_attrs' => array('name' => 'form_events', 'action' => '', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array('db' => array('table' => 'bx_events_main', 'key' => 'ID', 'uri' => 'EntryUri', 'uri_title' => 'Title', 'submit_name' => 'submit_form')), 'inputs' => array('header_info' => array('type' => 'block_header', 'caption' => _t('_bx_events_form_header_info')), 'Title' => array('type' => 'text', 'name' => 'Title', 'caption' => _t('_bx_events_caption_title'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => _t('_bx_events_err_title')), 'db' => array('pass' => 'Xss')), 'Description' => array('type' => 'textarea', 'name' => 'Description', 'caption' => _t('_bx_events_caption_desc'), 'required' => true, 'html' => 2, 'checker' => array('func' => 'length', 'params' => array(20, 64000), 'error' => _t('_bx_events_err_desc')), 'db' => array('pass' => 'XssHtml')), 'Country' => array('type' => 'select', 'name' => 'Country', 'caption' => _t('_bx_events_caption_country'), 'values' => $aCountries, 'required' => true, 'checker' => array('func' => 'preg', 'params' => array('/^[a-zA-Z]{2}$/'), 'error' => _t('_bx_events_err_country')), 'db' => array('pass' => 'Preg', 'params' => array('/([a-zA-Z]{2})/'))), 'City' => array('type' => 'text', 'name' => 'City', 'caption' => _t('_bx_events_caption_city'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 50), 'error' => _t('_bx_events_err_city')), 'db' => array('pass' => 'Xss')), 'Place' => array('type' => 'text', 'name' => 'Place', 'caption' => _t('_bx_events_caption_place'), 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_bx_events_err_place')), 'db' => array('pass' => 'Xss')), 'EventStart' => array('type' => 'datetime', 'name' => 'EventStart', 'caption' => _t('_bx_events_caption_event_start'), 'required' => true, 'checker' => array('func' => 'DateTime', 'error' => _t('_bx_events_err_event_start')), 'db' => array('pass' => 'DateTimeUTC'), 'display' => 'filterDateUTC'), 'EventEnd' => array('type' => 'datetime', 'name' => 'EventEnd', 'caption' => _t('_bx_events_caption_event_end'), 'required' => true, 'checker' => array('func' => 'DateTime', 'error' => _t('_bx_events_err_event_end')), 'db' => array('pass' => 'DateTimeUTC'), 'display' => 'filterDateUTC'), 'Tags' => array('type' => 'text', 'name' => 'Tags', 'caption' => _t('_Tags'), 'info' => _t('_sys_tags_note'), 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_bx_events_err_tags')), 'db' => array('pass' => 'Tags')), 'Categories' => $oCategories->getGroupChooser('bx_events', (int) $iProfileId, true), 'header_images' => array('type' => 'block_header', 'caption' => _t('_bx_events_form_header_images'), 'collapsable' => true, 'collapsed' => false), 'PrimPhoto' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['images']['thumb_choice'], 'name' => 'PrimPhoto', 'caption' => _t('_bx_events_form_caption_thumb_choice'), 'info' => _t('_bx_events_form_info_thumb_choice'), 'required' => false, 'db' => array('pass' => 'Int')), 'images_choice' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['images']['choice'], 'name' => 'images_choice[]', 'caption' => _t('_bx_events_form_caption_images_choice'), 'info' => _t('_bx_events_form_info_images_choice'), 'required' => false), 'images_upload' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['images']['upload'], 'name' => 'images_upload[]', 'caption' => _t('_bx_events_form_caption_images_upload'), 'info' => _t('_bx_events_form_info_images_upload'), 'required' => false), 'header_videos' => array('type' => 'block_header', 'caption' => _t('_bx_events_form_header_videos'), 'collapsable' => true, 'collapsed' => false), 'videos_choice' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['videos']['choice'], 'name' => 'videos_choice[]', 'caption' => _t('_bx_events_form_caption_videos_choice'), 'info' => _t('_bx_events_form_info_videos_choice'), 'required' => false), 'videos_upload' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['videos']['upload'], 'name' => 'videos_upload[]', 'caption' => _t('_bx_events_form_caption_videos_upload'), 'info' => _t('_bx_events_form_info_videos_upload'), 'required' => false), 'header_sounds' => array('type' => 'block_header', 'caption' => _t('_bx_events_form_header_sounds'), 'collapsable' => true, 'collapsed' => false), 'sounds_choice' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['sounds']['choice'], 'name' => 'sounds_choice[]', 'caption' => _t('_bx_events_form_caption_sounds_choice'), 'info' => _t('_bx_events_form_info_sounds_choice'), 'required' => false), 'sounds_upload' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['sounds']['upload'], 'name' => 'sounds_upload[]', 'caption' => _t('_bx_events_form_caption_sounds_upload'), 'info' => _t('_bx_events_form_info_sounds_upload'), 'required' => false), 'header_files' => array('type' => 'block_header', 'caption' => _t('_bx_events_form_header_files'), 'collapsable' => true, 'collapsed' => false), 'files_choice' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['files']['choice'], 'name' => 'files_choice[]', 'caption' => _t('_bx_events_form_caption_files_choice'), 'info' => _t('_bx_events_form_info_files_choice'), 'required' => false), 'files_upload' => array('type' => 'custom', 'content' => $aCustomMediaTemplates['files']['upload'], 'name' => 'files_upload[]', 'caption' => _t('_bx_events_form_caption_files_upload'), 'info' => _t('_bx_events_form_info_files_upload'), 'required' => false), 'header_privacy' => array('type' => 'block_header', 'caption' => _t('_bx_events_form_header_privacy')), 'allow_view_event_to' => $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'view_event'), 'allow_view_participants_to' => $aInputPrivacyViewParticipants, 'allow_comment_to' => $aInputPrivacyComment, 'allow_rate_to' => $aInputPrivacyRate, 'allow_post_in_forum_to' => $aInputPrivacyForum, 'allow_view_forum_to' => $aInputPrivacyForumView, 'allow_join_to' => $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'join'), 'JoinConfirmation' => array('type' => 'select', 'name' => 'JoinConfirmation', 'caption' => _t('_bx_events_form_caption_join_confirmation'), 'info' => _t('_bx_events_form_info_join_confirmation'), 'values' => array(0 => _t('_bx_events_form_join_confirmation_disabled'), 1 => _t('_bx_events_form_join_confirmation_enabled')), 'checker' => array('func' => 'int', 'error' => _t('_bx_events_form_err_join_confirmation')), 'db' => array('pass' => 'Int')), 'allow_upload_photos_to' => $aInputPrivacyUploadPhotos, 'allow_upload_videos_to' => $aInputPrivacyUploadVideos, 'allow_upload_sounds_to' => $aInputPrivacyUploadSounds, 'allow_upload_files_to' => $aInputPrivacyUploadFiles));
     if (!$aCustomForm['inputs']['images_choice']['content']) {
         unset($aCustomForm['inputs']['PrimPhoto']);
         unset($aCustomForm['inputs']['images_choice']);
     }
     if (!$aCustomForm['inputs']['videos_choice']['content']) {
         unset($aCustomForm['inputs']['videos_choice']);
     }
     if (!$aCustomForm['inputs']['sounds_choice']['content']) {
         unset($aCustomForm['inputs']['sounds_choice']);
     }
     if (!$aCustomForm['inputs']['files_choice']['content']) {
         unset($aCustomForm['inputs']['files_choice']);
     }
     if (!isset($this->_aMedia['images'])) {
         unset($aCustomForm['inputs']['header_images']);
         unset($aCustomForm['inputs']['PrimPhoto']);
         unset($aCustomForm['inputs']['images_choice']);
         unset($aCustomForm['inputs']['images_upload']);
         unset($aCustomForm['inputs']['allow_upload_photos_to']);
     }
     if (!isset($this->_aMedia['videos'])) {
         unset($aCustomForm['inputs']['header_videos']);
         unset($aCustomForm['inputs']['videos_choice']);
         unset($aCustomForm['inputs']['videos_upload']);
         unset($aCustomForm['inputs']['allow_upload_videos_to']);
     }
     if (!isset($this->_aMedia['sounds'])) {
         unset($aCustomForm['inputs']['header_sounds']);
         unset($aCustomForm['inputs']['sounds_choice']);
         unset($aCustomForm['inputs']['sounds_upload']);
         unset($aCustomForm['inputs']['allow_upload_sounds_to']);
     }
     if (!isset($this->_aMedia['files'])) {
         unset($aCustomForm['inputs']['header_files']);
         unset($aCustomForm['inputs']['files_choice']);
         unset($aCustomForm['inputs']['files_upload']);
         unset($aCustomForm['inputs']['allow_upload_files_to']);
     }
     $oModuleDb = new BxDolModuleDb();
     if (!$oModuleDb->getModuleByUri('forum')) {
         unset($aCustomForm['inputs']['allow_post_in_forum_to']);
     }
     $aFormInputsAdminPart = array();
     if ($GLOBALS['oBxEventsModule']->isAdmin()) {
         require_once BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php';
         $aMemberships = getMemberships();
         unset($aMemberships[MEMBERSHIP_ID_NON_MEMBER]);
         // unset Non-member
         $aMemberships = array('' => _t('_bx_events_membership_filter_none')) + $aMemberships;
         $aFormInputsAdminPart = array('EventMembershipFilter' => array('type' => 'select', 'name' => 'EventMembershipFilter', 'caption' => _t('_bx_events_caption_membership_filter'), 'info' => _t('_bx_events_info_membership_filter'), 'values' => $aMemberships, 'value' => '', 'checker' => array('func' => 'preg', 'params' => array('/^[0-9a-zA-Z]*$/'), 'error' => _t('_bx_events_err_membership_filter')), 'db' => array('pass' => 'Preg', 'params' => array('/([0-9a-zA-Z]*)/'))));
     }
     $aFormInputsSubmit = array('Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit')));
     $aCustomForm['inputs'] = array_merge($aCustomForm['inputs'], $aFormInputsAdminPart, $aFormInputsSubmit);
     $this->processMembershipChecksForMediaUploads($aCustomForm['inputs']);
     parent::__construct($aCustomForm);
 }
예제 #14
0
<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once "../inc/header.inc.php";
$GLOBALS['aRequest'] = explode('/', $_GET['r']);
if ($GLOBALS['aRequest'][1] == 'admin' || $GLOBALS['aRequest'][1] == 'administration') {
    $GLOBALS['iAdminPage'] = 1;
}
require_once BX_DIRECTORY_PATH_INC . "design.inc.php";
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolModuleDb.php';
$sName = process_db_input(array_shift($GLOBALS['aRequest']), BX_TAGS_STRIP);
$oDb = new BxDolModuleDb();
$GLOBALS['aModule'] = $oDb->getModuleByUri($sName);
if (empty($GLOBALS['aModule'])) {
    BxDolRequest::moduleNotFound($sName);
}
include BX_DIRECTORY_PATH_MODULES . $GLOBALS['aModule']['path'] . 'request.php';
예제 #15
0
<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once '../../../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin.inc.php';
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolModuleDb.php';
require_once BX_DIRECTORY_PATH_MODULES . 'boonex/messenger/classes/BxMsgModule.php';
$iSndId = isset($_COOKIE['memberID']) ? (int) $_COOKIE['memberID'] : 0;
$sSndPassword = isset($_COOKIE['memberPassword']) ? $_COOKIE['memberPassword'] : '';
$iRspId = isset($_GET['rspId']) ? (int) $_GET['rspId'] : 0;
$oModuleDb = new BxDolModuleDb();
$aModule = $oModuleDb->getModuleByUri('messenger');
$oMessenger = new BxMsgModule($aModule);
echo $oMessenger->getMessenger($iSndId, $sSndPassword, $iRspId);
예제 #16
0
<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once '../../../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin.inc.php';
bx_import('BxDolModuleDb');
require_once BX_DIRECTORY_PATH_MODULES . 'boonex/ads/classes/BxAdsModule.php';
// --------------- page variables and login
$_page['name_index'] = 151;
check_logged();
$oModuleDb = new BxDolModuleDb();
$aModule = $oModuleDb->getModuleByUri('ads');
$oAds = new BxAdsModule($aModule);
$oAds->sCurrBrowsedFile = bx_html_attribute($_SERVER['PHP_SELF']);
$_page['header'] = $oAds->GetHeaderString();
$_page['header_text'] = $oAds->GetHeaderString();
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompAds($oAds);
$oAds->_oTemplate->addCss(array('ads.css', 'categories.css', 'entry_view.css'));
function PageCompAds($oAds)
{
    $sRetHtml = '';
    $sRetHtml .= $oAds->PrintCommandForms();
    if ($_REQUEST) {
        if (false !== bx_get('action')) {
            switch (bx_get('action')) {
                case '3':
                    echo $oAds->actionSearch();
예제 #17
0
function PageCompAds()
{
    $oModuleDb = new BxDolModuleDb();
    $aModule = $oModuleDb->getModuleByUri('ads');
    $oAds = new BxAdsModule($aModule);
    $oAds->sCurrBrowsedFile = 'post_mod_ads.php';
    $oAds->bAdminMode = true;
    $sCss = $oAds->_oTemplate->addCss(array('ads.css'), true);
    $sResult = $sCss . $oAds->PrintCommandForms();
    if ($_REQUEST) {
        if (false !== bx_get('action')) {
            if ((int) bx_get('action') == 3) {
                $sResult .= $oAds->PrintFilterForm();
                $sResult .= $oAds->actionSearch();
                return $sResult;
            } elseif ((int) bx_get('action') == 2) {
                $iClassifiedSubID = (int) bx_get('FilterSubCat');
                $sResult .= $oAds->PrintSubRecords($iClassifiedSubID);
                return $sResult;
            } elseif ((int) bx_get('action') == 1) {
                $iClassifiedID = (int) bx_get('FilterCat');
                $sResult .= $oAds->PrintAllSubRecords($iClassifiedID);
                return $sResult;
            } elseif (bx_get('action') == 'add_sub_category') {
                $sCatID = (int) bx_get('id');
                $iCatID = $sCatID ? $sCatID : 0;
                header('Content-Type: text/html; charset=utf-8');
                echo $oAds->getAddSubcatForm($iCatID);
                exit;
            } elseif (bx_get('action') == 'category_manager') {
                header('Content-Type: text/html; charset=utf-8');
                echo $oAds->getCategoryManager();
                exit;
            }
        } elseif (false !== bx_get('bClassifiedID')) {
            $iClassifiedID = (int) bx_get('bClassifiedID');
            if ($iClassifiedID > 0) {
                $sResult .= $oAds->PrintAllSubRecords($iClassifiedID);
                $sResult .= $oAds->PrintBackLink();
                return $sResult;
            }
        } elseif (false !== bx_get('bSubClassifiedID')) {
            $iSubClassifiedID = (int) bx_get('bSubClassifiedID');
            if ($iSubClassifiedID > 0) {
                $sResult .= $oAds->PrintSubRecords($iSubClassifiedID);
                $sResult .= $oAds->PrintBackLink();
                return $sResult;
            }
        } elseif (false !== bx_get('DeleteAdvertisementID')) {
            $id = (int) bx_get('DeleteAdvertisementID');
            if ($id > 0) {
                $sResult .= $oAds->ActionDeleteAdvertisement($id);
            }
        } elseif (false !== bx_get('ActivateAdvertisementID')) {
            $iAdID = (int) bx_get('ActivateAdvertisementID');
            if ($iAdID > 0) {
                $oAds->_oDb->setPostStatus($iAdID, 'active');
            }
        }
        if (false !== bx_get('UpdatedAdvertisementID')) {
            $id = (int) bx_get('UpdatedAdvertisementID');
            if ($id > 0) {
                if (false !== bx_get('DeletedPictureID') && (int) bx_get('DeletedPictureID') > 0) {
                    //delete a pic
                    $sResult .= $oAds->ActionDeletePicture();
                    $sResult .= $oAds->PrintEditForm($id);
                } else {
                    $sResult .= $oAds->ActionUpdateAdvertisementID($id);
                }
            }
            return;
        } elseif (false !== bx_get('EditAdvertisementID')) {
            if ((int) bx_get('EditAdvertisementID') > 0) {
                $sResult .= $oAds->PrintEditForm((int) bx_get('EditAdvertisementID'));
                $sResult .= $oAds->PrintBackLink();
                return $sResult;
            }
        } elseif (false !== bx_get('ShowAdvertisementID')) {
            if (bx_get('ShowAdvertisementID') > 0) {
                $sResult .= $oAds->ActionPrintAdvertisement((int) bx_get('ShowAdvertisementID'));
                $sResult .= $oAds->PrintBackLink();
                return $sResult;
            }
        } elseif (false !== bx_get('BuyNow')) {
            $iAdID = (int) bx_get('IDAdv');
            if ($iAdID > 0) {
                $sResult .= $oAds->ActionBuyAdvertisement($iAdID);
                return $sResult;
            }
        } elseif (false !== bx_get('BuySendNow')) {
            $iAdID = (int) bx_get('IDAdv');
            if ($iAdID > 0) {
                $sResult .= $oAds->ActionBuySendMailAdvertisement($iAdID);
                return $sResult;
            }
        } elseif (false !== bx_get('UsersOtherListing')) {
            $iProfileID = (int) bx_get('IDProfile');
            if ($iProfileID > -1) {
                $sResult .= $oAds->PrintMyAds($iProfileID);
                return $sResult;
            }
        }
    }
    $sResult .= $oAds->GenAdminTabbedPage();
    return $sResult;
}
예제 #18
0
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
define('BX_SECURITY_EXCEPTIONS', true);
define('BX_OS_ADMIN', 1);
$aBxSecurityExceptions = array('POST.request', 'GET.request', 'REQUEST.request');
require_once '../../../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
bx_import('BxDolPaginate');
bx_import('BxDolModuleDb');
require_once BX_DIRECTORY_PATH_MODULES . 'boonex/open_social/classes/BxOSiModule.php';
$oModuleDb = new BxDolModuleDb();
$aModule = $oModuleDb->getModuleByUri('open_social');
$oBxOSiModule = new BxOSiModule($aModule);
$logged['admin'] = member_auth(1, true, true);
$iAdminID = isAdmin() ? (int) $_COOKIE['memberID'] : 0;
if ($_REQUEST['action'] == 'get_preview') {
    // preview
    $iApplID = (int) $_REQUEST['appl_id'];
    $sApplicationSrc = $oBxOSiModule->serviceGenApplication($iApplID);
    $sRes = PopupBox('preview_box', _t('_Preview'), $sApplicationSrc);
    require_once BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php';
    $oJson = new Services_JSON();
    echo $oJson->encode(array('code' => $sRes));
    exit;
}
if (isset($_POST['os_appls']) && is_array($_POST['os_appls'])) {
    // manage subactions
예제 #19
0
파일: blogs.php 프로젝트: noormcs/studoro
/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once '../../../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
//require_once( BX_DIRECTORY_PATH_MODULES . $aModule['path'] . '/classes/' . $aModule['class_prefix'] . 'Module.php');
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolModuleDb.php';
require_once BX_DIRECTORY_PATH_MODULES . 'boonex/blogs/classes/BxBlogsModule.php';
// --------------- page variables and login
$_page['name_index'] = 49;
check_logged();
$oModuleDb = new BxDolModuleDb();
$aModule = $oModuleDb->getModuleByUri('blogs');
$oBlogs = new BxBlogsModule($aModule);
$sHeaderValue = $oBlogs->GetHeaderString();
if ('mobile' == bx_get('action')) {
    $oBlogs->GenPostListMobile((int) bx_get('author'), bx_get('mode'));
    exit;
}
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompBlogs($oBlogs);
$oBlogs->_oTemplate->setPageTitle($sHeaderValue);
$oBlogs->_oTemplate->setPageMainBoxTitle($sHeaderValue);
$oBlogs->_oTemplate->addCss(array('blogs.css', 'blogs_common.css'));
function PageCompBlogs($oBlogs)
{
    $sRetHtml = '';
    $sRetHtml .= $oBlogs->GenCommandForms();