本文整理汇总了PHP中bx_process_input函数的典型用法代码示例。如果您正苦于以下问题:PHP bx_process_input函数的具体用法?PHP bx_process_input怎么用?PHP bx_process_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bx_process_input函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getForm
public function getForm($iDesignBoxTemplate = BX_DB_PADDING_DEF, $sTitle = false)
{
if ($this->_sMetaType) {
return '';
}
if (false === $sTitle) {
$sTitle = _t("_Search");
}
$aValues = $this->getKeyTitlesPairs();
$aValue = isset($_GET['type']) ? bx_process_input($_GET['type']) : array_keys($aValues);
$sIdForm = $this->_sIdForm . ($this->_bLiveSearch ? $this->_sSuffixLiveSearch : '');
$sIdResults = $this->_sIdResults . ($this->_bLiveSearch ? $this->_sSuffixLiveSearch : '');
$sIdLoadingContainer = $this->_bLiveSearch ? $sIdResults : $sIdForm;
$sJsParams = "5, '#{$sIdForm}', '#{$sIdResults}', '#{$sIdLoadingContainer}', '{$this->_bLiveSearch}'";
$aForm = array('form_attrs' => array('id' => $sIdForm, 'action' => BX_DOL_URL_ROOT . 'searchKeyword.php', 'method' => 'post'), 'csrf' => array('disable' => true), 'inputs' => array('live_search' => array('type' => 'hidden', 'name' => 'live_search', 'value' => $this->_bLiveSearch ? 1 : 0), 'section' => array('type' => 'checkbox_set', 'name' => 'section', 'caption' => _t('_Section'), 'values' => $aValues, 'value' => $aValue), 'keyword' => array('type' => 'text', 'name' => 'keyword', 'caption' => _t('_Keyword'), 'value' => bx_get('keyword') ? bx_process_input(bx_get('keyword')) : ''), 'search' => array('type' => 'submit', 'name' => 'search', 'value' => _t('_Search'))));
if ($this->_bLiveSearch) {
unset($aForm['inputs']['section']);
unset($aForm['inputs']['search']);
unset($aForm['inputs']['keyword']['caption']);
$aForm['inputs']['keyword']['attrs']['placeholder'] = _t('_sys_search_placeholder');
$aForm['inputs']['keyword']['attrs']['onkeypress'] = "return bx_search_on_type(event, {$sJsParams});";
$aForm['inputs']['keyword']['attrs']['onpaste'] = $aForm['inputs']['keyword']['attrs']['onkeypress'];
}
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView($aForm);
$sForm = $oForm->getCode();
if (!$this->_bLiveSearch) {
bx_import('BxTemplPaginate');
$o = new BxTemplPaginate(array());
$o->addCssJs();
}
return DesignBoxContent($sTitle, $sForm, $iDesignBoxTemplate);
}
示例2: getSplash
public function getSplash()
{
if ($this->_oConfig->getUri() != $this->getCode()) {
return '';
}
$sDownloadUrl = 'http://ci.boonex.com/';
$sVersion = '8.0';
$sVersionFull = '8.0.0';
$sBuild = '';
$mixedResponse = bx_file_get_contents($sDownloadUrl . "builds/latest-release-file.txt");
if ($mixedResponse !== false) {
$sFile = trim(bx_process_input($mixedResponse));
$aMatches = array();
if ((int) preg_match("/([0-9]\\.[0-9])\\.([0-9])-?([A-Z]*[a-z]*[0-9]{1,3})/", $sFile, $aMatches) > 0 && !empty($aMatches[1]) && !empty($aMatches[3])) {
$sDownloadUrl .= 'builds/' . $sFile;
$sVersion = $aMatches[1];
$sBuild = $aMatches[3];
}
if ((int) preg_match("/Trident-v\\.([0-9A-Za-z\\.-]+)\\.zip/", $sFile, $aMatches) > 0) {
$sVersionFull = $aMatches[1];
}
}
$this->addCss(array('splash-phone.css', 'splash-tablet.css', 'splash-desktop.css'));
return $this->parseHtmlByName('splash.html', array('download_url' => $sDownloadUrl, 'version_full' => $sVersionFull, 'version' => $sVersion, 'build' => $sBuild));
}
示例3: __construct
function __construct($sPage = "")
{
parent::__construct('builder_permissions');
$this->oDb = new BxDolStudioPermissionsQuery();
$this->sPage = BX_DOL_STUDIO_PRM_TYPE_DEFAULT;
if (is_string($sPage) && !empty($sPage)) {
$this->sPage = $sPage;
}
//--- Check actions ---//
if (($sAction = bx_get('pgt_action')) !== false) {
$sAction = bx_process_input($sAction);
$aResult = array('code' => 1, 'message' => _t('_adm_pgt_err_cannot_process_action'));
switch ($sAction) {
case 'get-page-by-type':
$sValue = bx_process_input(bx_get('pgt_value'));
if (empty($sValue)) {
break;
}
$this->sPage = $sValue;
$aResult = array('code' => 0, 'content' => $this->getPageCode());
break;
}
echo json_encode($aResult);
exit;
}
}
示例4: __construct
function __construct($sType = '', $sCategory = '')
{
parent::__construct('settings');
$this->oDb = new BxDolStudioSettingsQuery();
$this->sType = BX_DOL_STUDIO_STG_TYPE_DEFAULT;
if (is_string($sType) && !empty($sType)) {
$this->sType = $sType;
}
$this->sCategory = '';
if (is_string($sCategory) && !empty($sCategory)) {
$this->sCategory = $sCategory;
}
//--- Check actions ---//
if (($sAction = bx_get('stg_action')) !== false && ($sValue = bx_get('stg_value')) !== false) {
$sAction = bx_process_input($sAction);
$sValue = bx_process_input($sValue);
$aResult = array('code' => 0, 'message' => '');
if (!empty($sAction) && !empty($sValue)) {
switch ($sAction) {
case 'get-page-by-type':
$this->sType = $sValue;
$aResult['content'] = $this->getPageCode();
break;
}
echo json_encode($aResult);
}
exit;
}
}
示例5: __construct
function __construct()
{
parent::__construct(BX_DOL_STUDIO_PAGE_HOME);
$aClasses = array('BxTemplStudioModules', 'BxTemplStudioDesigns', 'BxTemplStudioLanguages');
//--- Check actions ---//
if (($sAction = bx_get('action')) !== false) {
$sAction = bx_process_input($sAction);
$aResult = array('code' => 1, 'message' => _t('_adm_err_operation_failed'));
switch ($sAction) {
case 'launcher-update-cache':
$aResult = $this->updateCache();
break;
case 'launcher-reorder':
$sPage = bx_process_input(bx_get('page'));
$aItems = bx_process_input(bx_get('items'));
BxDolStudioWidgetsQuery::getInstance()->reorder($sPage, $aItems);
$aResult = array('code' => 0, 'message' => _t('_adm_scs_operation_done'));
break;
}
echo json_encode($aResult);
exit;
}
$this->aIncludes = array();
foreach ($aClasses as $sClass) {
$this->aIncludes[] = new $sClass();
}
}
示例6: performActionRecheckItem
/**
* 'recheck' action handler
*/
public function performActionRecheckItem()
{
bx_import('BxDolModule');
$oModule = BxDolModule::getInstance('bx_antispam');
$o = bx_instance('BxAntispamDNSBlacklists', array(), $oModule->_aModule);
$aChain = $o->getRule((int) bx_get('id'));
$iRet = BX_DOL_DNSBL_FAILURE;
if ($aChain) {
if (bx_get('chain') == 'dnsbl') {
$iRet = $o->dnsbl_lookup_ip($aChain, bx_process_input(bx_get('test')));
} elseif (bx_get('chain') == 'uridnsbl') {
$sUrl = preg_replace('/^\\w+:\\/\\//', '', bx_process_input(bx_get('test')));
$sUrl = preg_replace('/^www\\./', '', $sUrl);
$oBxDolDNSURIBlacklists = bx_instance('BxAntispamDNSURIBlacklists', array(), $oModule->_aModule);
$aUrls = $oBxDolDNSURIBlacklists->validateUrls(array($sUrl));
if ($aUrls) {
$iRet = $o->dnsbl_lookup_uri($aUrls[0], $aChain);
}
}
}
$s = '';
switch ($iRet) {
case BX_DOL_DNSBL_POSITIVE:
$s = 'LISTED';
break;
case BX_DOL_DNSBL_NEGATIVE:
$s = 'NOT LISTED';
break;
default:
case BX_DOL_DNSBL_FAILURE:
$s = 'FAIL';
}
echo $s;
exit;
}
示例7: serviceGetBlockFormInvite
public function serviceGetBlockFormInvite()
{
$iProfileId = $this->getProfileId();
$iAccountId = $this->getAccountId($iProfileId);
$mixedAllowed = $this->isAllowedInvite($iProfileId);
if ($mixedAllowed !== true) {
return array('content' => MsgBox($mixedAllowed));
}
$iInvited = (int) $this->_oDb->getInvites(array('type' => 'count_by_account', 'value' => $iAccountId));
$iInvites = $this->_oConfig->getCountPerUser() - $iInvited;
if ($iInvites <= 0) {
return array('content' => MsgBox(_t('_bx_invites_err_limit_reached')));
}
$oForm = $this->getFormObjectInvite();
$oForm->aInputs['text']['value'] = _t('_bx_invites_msg_invitation');
$sResult = '';
$oForm->initChecker();
if ($oForm->isSubmittedAndValid()) {
$sEmails = bx_process_input($oForm->getCleanValue('emails'));
$sText = bx_process_pass($oForm->getCleanValue('text'));
$mixedResult = $this->invite(BX_INV_TYPE_FROM_MEMBER, $sEmails, $sText, $iInvites, $oForm);
if ($mixedResult !== false) {
$sResult = _t('_bx_invites_msg_invitation_sent', (int) $mixedResult);
} else {
$sResult = _t('_bx_invites_err_not_available');
}
$sResult = MsgBox($sResult);
}
return array('content' => $sResult . $oForm->getCode());
}
示例8: processActions
function processActions()
{
if (($sAction = bx_get($this->sParamPrefix . '_action')) !== false) {
$sAction = bx_process_input($sAction);
$aResult = array('code' => 1, 'message' => _t('_adm_' . $this->sLangPrefix . '_err_cannot_process_action'));
switch ($sAction) {
case 'uninstall':
$sPageName = bx_process_input(bx_get($this->sParamPrefix . '_page_name'));
if (empty($sPageName)) {
break;
}
bx_import('BxDolModuleQuery');
$aModule = BxDolModuleQuery::getInstance()->getModuleByName($sPageName);
if (empty($aModule) || !is_array($aModule)) {
break;
}
if (($iWidgetId = (int) bx_get($this->sParamPrefix . '_widget_id')) != 0 && (int) bx_get($this->sParamPrefix . '_confirmed') != 1) {
$aResult['message'] = $this->getPopupConfirm($iWidgetId, $aModule);
break;
}
bx_import('BxDolStudioInstallerUtils');
$aResult = BxDolStudioInstallerUtils::getInstance()->perform($aModule['path'], 'uninstall');
if (!empty($aResult['message'])) {
$aResult['message'] = $this->getPopupResult($aResult['message']);
}
break;
}
if (!empty($aResult['message'])) {
bx_import('BxTemplStudioFunctions');
$aResult['message'] = BxTemplStudioFunctions::getInstance()->transBox('', $aResult['message']);
}
echo json_encode($aResult);
exit;
}
}
示例9: init
public function init()
{
if (($sAction = bx_get('pgt_action')) === false) {
return;
}
$sAction = bx_process_input($sAction);
$oLanguages = BxDolStudioLanguagesUtils::getInstance();
$aResult = array('code' => 1, 'message' => _t('_adm_pgt_err_cannot_process_action'));
switch ($sAction) {
case 'get-page-by-type':
$sValue = bx_process_input(bx_get('pgt_value'));
if (empty($sValue)) {
break;
}
$this->sPage = $sValue;
$aResult = array('code' => 0, 'content' => $this->getPageCode());
break;
/*
* Available URL params:
* pgt_action = recompile - action name
* pgt_language - ID or name(en, ru, etc) of language.
*/
/*
* Available URL params:
* pgt_action = recompile - action name
* pgt_language - ID or name(en, ru, etc) of language.
*/
case 'recompile':
$sLanguage = bx_process_input(bx_get('pgt_language'));
if ($oLanguages->compileLanguage($sLanguage)) {
$aResult = array('code' => 0, 'content' => _t('_adm_pgt_scs_recompiled'));
} else {
$aResult = array('code' => 2, 'content' => _t('_adm_pgt_err_cannot_recompile_lang'));
}
break;
/*
* Available URL params:
* pgt_action = restore - action name
* pgt_language - ID or name(en, ru, etc) of language.
* pgt_module - ID or Module Uri (@see sys_modules table). Leave empty for 'System' language file.
*/
/*
* Available URL params:
* pgt_action = restore - action name
* pgt_language - ID or name(en, ru, etc) of language.
* pgt_module - ID or Module Uri (@see sys_modules table). Leave empty for 'System' language file.
*/
case 'restore':
$sLanguage = bx_process_input(bx_get('pgt_language'));
$sModule = bx_process_input(bx_get('pgt_module'));
if ($oLanguages->restoreLanguage($sLanguage, $sModule)) {
$aResult = array('code' => 0, 'content' => _t('_adm_pgt_scs_restored'));
} else {
$aResult = array('code' => 2, 'content' => _t('_adm_pgt_err_cannot_restore_lang'));
}
break;
}
echo json_encode($aResult);
exit;
}
示例10: init
public function init()
{
if (($sAction = bx_get('nav_action')) === false) {
return;
}
$sAction = bx_process_input($sAction);
$aResult = array('code' => 1, 'message' => _t('_adm_nav_err_cannot_process_action'));
switch ($sAction) {
case 'get-page-by-type':
$sValue = bx_process_input(bx_get('nav_value'));
if (empty($sValue)) {
break;
}
$this->sPage = $sValue;
$aResult = array('code' => 0, 'content' => $this->getPageCode());
break;
default:
$sMethod = 'action' . $this->getClassName($sAction);
if (method_exists($this, $sMethod)) {
$aResult = $this->{$sMethod}();
}
}
echo json_encode($aResult);
exit;
}
示例11: __construct
public function __construct($aObject, $oTemplate = false)
{
parent::__construct($aObject, $oTemplate);
$CNF = $this->_oModule->_oConfig->CNF;
$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
$iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
if ($iProfileId) {
$this->_oProfile = BxDolProfile::getInstance($iProfileId);
}
if (!$this->_oProfile && $iContentId) {
$this->_oProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->MODULE);
}
if ($this->_oProfile) {
$this->_aProfileInfo = $this->_oProfile->getInfo();
$this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($this->_aProfileInfo['content_id']);
$this->addMarkers($this->_aProfileInfo);
$this->addMarkers(array('profile_id' => $this->_oProfile->id()));
if (isLogged()) {
$oConn = BxDolConnection::getObjectInstance('sys_profiles_friends');
if ($oConn->isConnectedNotMutual(bx_get_logged_profile_id(), $this->_oProfile->id())) {
$this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend_sent']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend_cancel_request'])));
} elseif ($oConn->isConnectedNotMutual($this->_oProfile->id(), bx_get_logged_profile_id())) {
$this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend_confirm']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend_reject_request'])));
} else {
$this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend'])));
}
}
}
}
示例12: getPost
public function getPost(&$aEvent, $aBrowseParams = array())
{
$aResult = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? $this->_getSystemData($aEvent) : $this->_getCommonData($aEvent);
if (empty($aResult) || empty($aResult['owner_id']) || empty($aResult['content'])) {
return '';
}
list($sUserName) = $this->getModule()->getUserInfo($aResult['owner_id']);
if (empty($aEvent['title']) || empty($aEvent['description'])) {
$sTitle = !empty($aResult['title']) ? $aResult['title'] : '';
if ($sTitle == '') {
$sSample = !empty($aResult['content']['sample']) ? $aResult['content']['sample'] : '_bx_timeline_txt_sample';
$sTitle = _t('_bx_timeline_txt_user_added_sample', $sUserName, _t($sSample));
}
$sDescription = !empty($aResult['description']) ? $aResult['description'] : '';
if ($sDescription == '' && !empty($aResult['content']['text'])) {
$sDescription = $aResult['content']['text'];
}
$this->_oDb->updateEvent(array('title' => bx_process_input(strip_tags($sTitle)), 'description' => bx_process_input(strip_tags($sDescription))), array('id' => $aEvent['id']));
}
$aEvent['object_owner_id'] = $aResult['owner_id'];
$aEvent['content'] = $aResult['content'];
$aEvent['votes'] = $aResult['votes'];
$aEvent['comments'] = $aResult['comments'];
$sType = !empty($aResult['content_type']) ? $aResult['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;
return $this->_getPost($sType, $aEvent, $aBrowseParams);
}
示例13: __construct
public function __construct($aObject, $oTemplate = false)
{
parent::__construct($aObject, $oTemplate);
// get profile info
$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
if ($iProfileId) {
$this->_oProfile = BxDolProfile::getInstance($iProfileId);
$this->_aProfileInfo = $this->_oProfile ? $this->_oProfile->getInfo() : false;
}
if (!$this->_aProfileInfo || !$this->_oProfile) {
return;
}
// select view profile submenu
$oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
if ($oMenuSubmenu) {
$oMenuSubmenu->setObjectSubmenu('bx_persons_view_submenu', array('title' => $this->_oProfile->getDisplayName(), 'link' => $this->_oProfile->getUrl(), 'icon' => $this->_oProfile->getIcon()));
}
// add replaceable markers
$this->addMarkers($this->_aProfileInfo);
// every profile field can be used as marker
$this->addMarkers(array('profile_id' => $this->_oProfile->id()));
// profile id field is also suported
$this->addMarkers(array('display_name' => $this->_oProfile->getDisplayName()));
// profile display name is also suported
}
示例14: init
public function init()
{
//--- Check Actions ---//
if (($sAction = bx_get('mod_action')) !== false) {
$sAction = bx_process_input($sAction);
$aResult = array('code' => 1, 'message' => _t('_adm_mod_err_cannot_process_action'));
switch ($sAction) {
case 'activate':
$sValue = bx_process_input(bx_get('mod_value'));
if (empty($sValue)) {
break;
}
$aResult = $this->activate($sValue);
break;
}
echo json_encode($aResult);
exit;
}
$this->aModule = $this->oDb->getModuleByName($this->sModule);
if (empty($this->aModule) || !is_array($this->aModule)) {
BxDolStudioTemplate::getInstance()->displayPageNotFound();
}
$this->sPageRssHelpUrl = $this->aModule['help_url'];
$this->sPageRssHelpId = $this->aModule['name'];
$this->addMarkers(array('module_name' => $this->aModule['name'], 'module_uri' => $this->aModule['uri'], 'module_title' => $this->aModule['title']));
$this->addAction(array('type' => 'switcher', 'name' => 'activate', 'caption' => '_adm_txt_pca_active', 'checked' => (int) $this->aModule['enabled'] == 1, 'onchange' => "javascript:" . $this->getPageJsObject() . ".activate('" . $this->sModule . "', this)"), false);
}
示例15: init
function init()
{
if (($sAction = bx_get('bp_action')) === false) {
return;
}
$sAction = bx_process_input($sAction);
$aResult = array('code' => 1, 'message' => _t('_adm_bp_err_cannot_process_action'));
switch ($sAction) {
case 'reorder':
if (empty($this->aPageRebuild) || !is_array($this->aPageRebuild)) {
break;
}
$bResult = false;
for ($i = 1; $i <= $this->aPageRebuild['layout_cells_number']; $i++) {
$aItems = bx_get('bp_items_' . $i);
$iItems = count($aItems);
for ($j = 0; $j < $iItems; $j++) {
$bResult |= $this->oDb->updateBlock((int) $aItems[$j], array('cell_id' => $i, 'order' => $j));
}
}
$aResult = $bResult ? array('code' => 0, 'message' => _t('_adm_bp_scs_save')) : array('code' => 1, 'message' => _t('_adm_bp_err_nothing_changed'));
break;
default:
$sMethod = 'action' . $this->getClassName($sAction);
if (method_exists($this, $sMethod)) {
$aResult = $this->{$sMethod}();
}
}
echo json_encode($aResult);
exit;
}