本文整理汇总了PHP中BxDolModuleDb::getModuleByUri方法的典型用法代码示例。如果您正苦于以下问题:PHP BxDolModuleDb::getModuleByUri方法的具体用法?PHP BxDolModuleDb::getModuleByUri怎么用?PHP BxDolModuleDb::getModuleByUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxDolModuleDb
的用法示例。
在下文中一共展示了BxDolModuleDb::getModuleByUri方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MlClonetwoPageFields
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: BxDolModuleDb
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: call
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: BxDolFormMedia
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: BxDolModuleDb
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>';
}
示例6: getMemberMenuAdsList
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: actionCheckPayment
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: BxDolModuleDb
* 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: serviceGetActionsChecklist
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: BxDolModuleDb
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);
}
示例11: PageCompPages
* 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');
示例12: savePage
//.........这里部分代码省略.........
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: array
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']);
}
//.........这里部分代码省略.........
示例14: explode
<?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: isset
<?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);