function getBlockCode_DeleteMembers()
 {
     //--- Get Control ---//
     $aButtons = array('ps-del-members-delete' => _t('_ps_btncpt_delete'));
     $sControl = BxDolPrivacySearch::showAdminActionsPanel('ps-del-member-form', $aButtons, 'ps-del-member-ids');
     return PopupBox('ps-del-members', _t('_ps_bcpt_delete_members'), $this->parseHtmlByName('ps_group_members.html', array('wnd_action' => 'del', 'bx_if:search_form' => array('condition' => false, 'content' => array()), 'js_site_url' => BX_DOL_URL_ROOT, 'results' => '', 'control' => $sControl, 'loading' => LoadingBox('ps-add-members-loading'))));
 }
 function getPublishForm($sComplete = '')
 {
     $sName = 'site_customize_popup';
     $sContent = '';
     if ($sComplete) {
         $sContent = $this->parseHtmlByName('confirm_box.html', array('text' => MsgBox($sComplete), 'btn_value' => _t('_bx_sctr_btn_close'), 'box_name' => $sName));
     } else {
         $oForm = new BxTemplFormView(array('form_attrs' => array('name' => 'publish_form', 'action' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'publish/1', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array(), 'inputs' => array('name_theme' => array('type' => 'text', 'name' => 'name_theme', 'value' => '', 'caption' => _t('_bx_sctr_name_theme'), 'display' => true), 'thumbnail' => array('type' => 'file', 'name' => 'thumbnail', 'value' => '', 'caption' => _t('_bx_sctr_thumbnail'), 'display' => true), 'submit' => array('type' => 'button', 'name' => 'submit_form', 'value' => _t('_bx_sctr_btn_save'), 'colspan' => true, 'attrs' => array('onclick' => "oBxSctrMain.savePublish();")))));
         $sContent = $this->parseHtmlByName('default_margin.html', array('content' => $oForm->getCode()));
     }
     return PopupBox($sName, _t('_bx_sctr_publish'), $sContent);
 }
 function getRepostedBy($iId)
 {
     $sStylePrefix = $this->_oConfig->getPrefix('style');
     $aUserIds = $this->_oDb->getRepostedBy($iId);
     $aTmplUsers = array();
     foreach ($aUserIds as $iUserId) {
         $aTmplUsers[] = array('style_prefix' => $sStylePrefix, 'thumbnail' => get_member_thumbnail($iUserId, 'none', true));
     }
     if (empty($aTmplUsers)) {
         $aTmplUsers = MsgBox(_t('_Empty'));
     }
     $sName = $this->_oConfig->getHtmlIds('repost', 'by_popup') . $iId;
     $sContent = $this->parseHtmlByName('repost_by_list.html', array('style_prefix' => $sStylePrefix, 'bx_repeat:list' => $aTmplUsers));
     return PopupBox($sName, _t('_wall_txt_reposted_by'), $sContent);
 }
Example #4
0
 function displayManualOrderWindow($aForm)
 {
     $oForm = new BxTemplFormView($aForm);
     $sContent = $this->parseHtmlByName('manual_order_form.html', array('form' => $oForm->getCode(), 'loading' => LoadingBox('pmt-order-manual-loading')));
     return PopupBox('pmt-manual-order', _t($this->_sLangsPrefix . 'wcpt_manual_order'), $sContent);
 }
 function getPublishForm($sComplete = '')
 {
     $sName = 'dynamicPopup';
     $sContent = '';
     if ($sComplete) {
         $sContent = $this->parseHtmlByName('confirm_box.html', array('text' => MsgBox($sComplete), 'btn_value' => _t('_bx_profile_customize_btn_close'), 'box_name' => $sName));
     } else {
         $aForm = array('form_attrs' => array('name' => 'publish_form', 'action' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'publish/1', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array(), 'inputs' => array('name_theme' => array('type' => 'text', 'name' => 'name_theme', 'value' => '', 'caption' => _t('_bx_profile_customize_name_theme'), 'display' => true), 'thumbnail' => array('type' => 'file', 'name' => 'thumbnail', 'value' => '', 'caption' => _t('_bx_profile_customize_thumbnail'), 'display' => true), 'destination' => array('type' => 'radio_set', 'name' => 'destination', 'caption' => _t('_bx_profile_customize_destination'), 'value' => $this->_oModule->iUserId, 'values' => array($this->_oModule->iUserId => _t('_bx_profile_customize_page_themes_my'), 0 => _t('_bx_profile_customize_page_themes_shared'))), 'submit' => array('type' => 'button', 'name' => 'submit_form', 'value' => _t('_bx_profile_customize_btn_save'), 'colspan' => true, 'attrs' => array('onclick' => "oCustomizer.savePublish();"))));
         if (!$this->_oModule->isAdmin()) {
             unset($aForm['inputs']['destination']);
         }
         $oForm = new BxTemplFormView($aForm);
         $sContent = $this->parseHtmlByName('default_margin.html', array('content' => $oForm->getCode()));
     }
     return PopupBox($sName, _t('_bx_profile_customize_publish'), $sContent);
 }
Example #6
0
function showEditForm($aItem, $sMenuSection)
{
    $aForm = array('form_attrs' => array('id' => 'formItemEdit', 'name' => 'formItemEdit', 'action' => $GLOBALS['site']['url_admin'] . 'member_menu_compose.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'inputs' => array('Name' => array('type' => 'text', 'name' => 'Name', 'caption' => _t('_adm_mbuilder_System_Name'), 'value' => $aItem['Name'], 'attrs' => array()), 'Caption' => array('type' => 'text', 'name' => 'Caption', 'caption' => _t('_adm_mbuilder_Language_Key'), 'value' => $aItem['Caption'], 'attrs' => array()), 'LangCaption' => array('type' => 'text', 'name' => 'LangCaption', 'caption' => _t('_adm_mbuilder_Default_Name'), 'value' => _t($aItem['Caption']), 'attrs' => array()), 'Link' => array('type' => 'text', 'name' => 'Link', 'caption' => _t('_URL'), 'value' => htmlspecialchars_adv($aItem['Link']), 'attrs' => array()), 'Script' => array('type' => 'text', 'name' => 'Script', 'caption' => _t('_adm_mbuilder_script'), 'value' => htmlspecialchars_adv($aItem['Script']), 'attrs' => array()), 'Icon' => array('type' => 'text', 'name' => 'Icon', 'caption' => _t('_adm_mbuilder_icon'), 'value' => htmlspecialchars_adv($aItem['Icon']), 'attrs' => array()), 'Target' => array('type' => 'radio_set', 'name' => 'Target', 'caption' => _t('_adm_mbuilder_Target_Window'), 'value' => $aItem['Target'] == '_blank' ? '_blank' : '_self', 'values' => array('_self' => _t('_adm_mbuilder_Same'), '_blank' => _t('_adm_mbuilder_New')), 'attrs' => array()), 'submit' => array('type' => 'input_set', array('type' => 'button', 'name' => 'save', 'value' => _t('_Save Changes'), 'attrs' => array('onclick' => 'javascript:saveItem(' . $aItem['ID'] . ');')), array('type' => 'button', 'name' => 'delete', 'value' => _t('_Delete'), 'attrs' => array('onclick' => 'javascript:deleteItem(' . $aItem['ID'] . ');')))));
    foreach ($aForm['inputs'] as $sKey => $aInput) {
        if (in_array($aInput['type'], array('text', 'checkbox')) && !$aItem['Editable']) {
            $aForm['inputs'][$sKey]['attrs']['disabled'] = "disabled";
        }
    }
    if (strpos($aItem['Visible'], 'non') !== false) {
        $aForm['inputs']['Visible']['value'][] = 'non';
    }
    if (strpos($aItem['Visible'], 'memb') !== false) {
        $aForm['inputs']['Visible']['value'][] = 'memb';
    }
    $oForm = new BxTemplFormView($aForm);
    return PopupBox('mmc_edit_popup', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading'))));
}
Example #7
0
 function actionPageBlock($sAction, $iID)
 {
     if (!isAdmin()) {
         $this->_oTemplate->displayAccessDenied();
     }
     if ($sAction == 'edit') {
         $aVisibility = $this->_oDb->getPageBlockVisibility($iID);
         header('Content-Type: text/html; charset=utf-8');
         return PopupBox('pageac_popup_edit_form', _t('_bx_pageac_visible_for'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->_oTemplate->getPageBlockEditForm($iID, $aVisibility) . LoadingBox('formItemEditLoading'))));
     } elseif ($sAction == 'save') {
         $aVisibleTo = array();
         if (is_array($_POST['mlv_visible_to'])) {
             $aData = array_flip($_POST['mlv_visible_to']);
             if (!isset($aData[-1])) {
                 foreach ($aData as $iMemLevel => $dummy) {
                     $aVisibleTo[$iMemLevel] = 1;
                 }
             }
         }
         if (empty($aVisibleTo) && !isset($aData[-1])) {
             $aVisibleTo[] = 0;
         }
         $this->_oDb->setPageBlockVisibility($iID, $aVisibleTo);
         $aResult = array('message' => MsgBox(_t('_Saved')), 'timer' => 1);
         $oJson = new Services_JSON();
         return $oJson->encode($aResult);
     }
 }
function showEditFormTop($aItem)
{
    $aForm = array('form_attrs' => array('id' => 'formItemEdit', 'name' => 'formItemEdit', 'action' => $GLOBALS['site']['url_admin'] . 'menu_compose_admin.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'inputs' => array('Title' => array('type' => 'text', 'name' => 'title', 'caption' => _t('_Title'), 'value' => $aItem['title'], 'attrs' => array()), 'BigIcon' => array('type' => 'text', 'name' => 'icon', 'caption' => _t('_adm_ambuilder_Small_Icon'), 'value' => htmlspecialchars_adv($aItem['icon']), 'attrs' => array()), 'SmallIcon' => array('type' => 'text', 'name' => 'icon_large', 'caption' => _t('_adm_ambuilder_Big_Icon'), 'value' => htmlspecialchars_adv($aItem['icon_large']), 'attrs' => array()), 'submit' => array('type' => 'input_set', array('type' => 'button', 'name' => 'save', 'value' => _t('_Save Changes'), 'attrs' => array('onclick' => 'javascript:saveItem(' . ($aItem['id'] + 1000) . ');')), array('type' => 'button', 'name' => 'delete', 'value' => _t('_Delete'), 'attrs' => array('onclick' => 'javascript:deleteItem(' . ($aItem['id'] + 1000) . ');')))));
    $oForm = new BxTemplFormView($aForm);
    return PopupBox('amc_edit_popup_top', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading'))));
}
Example #9
0
 protected function getProduct($sModuleName)
 {
     $sJsObject = $this->getPageJsObject();
     $oTemplate = BxDolStudioTemplate::getInstance();
     $aProduct = $this->loadProduct($sModuleName);
     if (empty($aProduct) || !is_array($aProduct)) {
         return array('code' => 1, 'message' => !empty($aProduct) ? $aProduct : _t('_adm_str_err_no_product_info'));
     }
     $aDownloaded = $this->getDownloadedModules(false);
     $bFree = (int) $aProduct['is_free'] == 1;
     $bPurchased = (int) $aProduct['is_purchased'] == 1;
     $bDownloadable = (int) $aProduct['is_file'] == 1;
     $bDownloaded = array_key_exists($sModuleName, $aDownloaded);
     $bDownload = ($bFree || $bPurchased) && $bDownloadable;
     $bDiscount = !empty($aProduct['discount']);
     $sVersion = $bDownloaded && version_compare($aDownloaded[$sModuleName]['version'], $aProduct['version']) != 0 ? _t('_adm_str_txt_pv_version_mask', $aDownloaded[$sModuleName]['version'], $aProduct['version']) : $aProduct['version'];
     $iScreenshots = 0;
     $aScreenshots = array();
     $bScreenshots = is_array($aProduct['screenshots']) && !empty($aProduct['screenshots']);
     if ($bScreenshots) {
         $iScreenshots = count($aProduct['screenshots']);
         foreach ($aProduct['screenshots'] as $aScreenshot) {
             $aScreenshots[] = array('view_url' => $aProduct['url'], 'image_url' => $aScreenshot['big']);
         }
     }
     $sContent = $oTemplate->parseHtmlByname('str_product_view.html', array('id' => $aProduct['id'], 'title' => $aProduct['title'], 'url' => $aProduct['url'], 'author_name' => $aProduct['author_name'], 'author_url' => $aProduct['author_url'], 'version' => $sVersion, 'price' => !$bFree ? _t('_adm_str_txt_price_csign', $aProduct['author_currency_sign'], $aProduct['price']) : _t('_adm_str_txt_price_free'), 'bx_if:show_discount' => array('condition' => !$bFree && $bDiscount, 'content' => array('discount' => $bDiscount ? _t('_adm_str_txt_pv_discount_off_csign', $aProduct['discount']['percent'], $aProduct['author_currency_sign'], $aProduct['discount']['save']) : '')), 'category' => $aProduct['category'], 'category_url' => $aProduct['category_url'], 'tags' => implode(', ', explode(',', $aProduct['tags'])), 'reviews' => _t('_adm_str_txt_pv_stats_reviews', $aProduct['reviews_cnt']), 'reviews_url' => $aProduct['reviews_url'], 'likes' => _t('_adm_str_txt_pv_stats_likes', $aProduct['likes_cnt']), 'views' => _t('_adm_str_txt_pv_stats_views', $aProduct['views_cnt']), 'created' => $aProduct['created'], 'updated' => $aProduct['updated'], 'description' => $aProduct['description'], 'bx_if:show_screenshots' => array('condition' => $bScreenshots, 'content' => array('width' => 222 * $iScreenshots - 20, 'bx_repeat:screenshots' => $aScreenshots)), 'bx_if:show_purchase' => array('condition' => !$bFree && !$bPurchased, 'content' => array('js_object' => $sJsObject, 'id' => $aProduct['id'], 'vendor' => $aProduct['author_name'])), 'bx_if:show_download' => array('condition' => $bDownload && !$bDownloaded, 'content' => array('js_object' => $sJsObject, 'file_id' => $aProduct['file_id'])), 'bx_if:show_download_disabled' => array('condition' => $bDownload && $bDownloaded, 'content' => array())));
     return array('code' => 0, 'message' => '', 'popup' => PopupBox('bx-std-str-popup-product', $aProduct['title'], $sContent, true), 'screenshots' => $iScreenshots);
 }
Example #10
0
    $iMemberId = getLoggedId();
    if ($iMemberId == $iProfileId) {
        $aSelect = $oPrivacy->getGroupChooser($iMemberId, $sPageName, 'view_block');
        $iCurGroupId = (int) $GLOBALS['MySQL']->getOne("SELECT `allow_view_block_to` FROM `sys_page_compose_privacy` WHERE `user_id`='" . $iMemberId . "' AND `block_id`='" . $iBlockId . "' LIMIT 1");
        if ($iCurGroupId == 0) {
            $iCurGroupId = (int) $aSelect['value'];
        }
        $aItems = array();
        foreach ($aSelect['values'] as $aValue) {
            if ($aValue['key'] == $iCurGroupId) {
                $sAlt = $aValue['value'];
            }
            $aItems[] = array('block_id' => $iBlockId, 'group_id' => $aValue['key'], 'class' => $aValue['key'] == $iCurGroupId ? 'dbPrivacyGroupActive' : 'dbPrivacyGroup', 'title' => $aValue['value']);
        }
        $sCode = $GLOBALS['oSysTemplate']->parseHtmlByName('ps_page_menu.html', array('bx_repeat:items' => $aItems));
        $sCode = PopupBox('dbPrivacyMenu' . $iBlockId, _t('_ps_bcpt_block_privacy'), $sCode);
    }
    header('Content-Type:text/javascript; charset=utf-8');
    echo json_encode(array('code' => !empty($sCode) ? 0 : 1, 'data' => $sCode));
    exit;
} else {
    if (isset($_POST['ps_action']) && $_POST['ps_action'] == 'view_block' && $iId != 0) {
        $iBlockId = (int) $_POST['ps_block_id'];
        $iGroupId = (int) $_POST['ps_group_id'];
        $iPrivacyId = (int) $GLOBALS['MySQL']->getOne("SELECT `id` FROM `sys_page_compose_privacy` WHERE `user_id`='" . $iId . "' AND `block_id`='" . $iBlockId . "' LIMIT 1");
        if ($iPrivacyId != 0) {
            $sSql = "UPDATE `sys_page_compose_privacy` SET `allow_view_block_to`='" . $iGroupId . "' WHERE `id`='" . $iPrivacyId . "'";
        } else {
            $sSql = "INSERT INTO `sys_page_compose_privacy`(`user_id`, `block_id`, `allow_view_block_to`) VALUES('" . $iId . "', '" . $iBlockId . "', '" . $iGroupId . "')";
        }
        $sGroupTitle = "";
Example #11
0
function showEditForm($iItemID, $iAreaID)
{
    $oFields = new BxDolPFM($iAreaID);
    ob_start();
    ?>
    <form name="fieldEditForm" method="post" action="<?php 
    echo $GLOBALS['site']['url_admin'] . 'fields.parse.php';
    ?>
" target="fieldFormSubmit" onsubmit="clearFormErrors( this )">
        <div class="edit_item_table_cont">
            <?php 
    echo $oFields->genFieldEditForm($iItemID);
    ?>
        </div>
    </form>

    <iframe name="fieldFormSubmit" style="display:none;"></iframe>
    <?php 
    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => ob_get_clean()));
    echo PopupBox('pf_edit_popup', _t('_adm_fields_box_cpt_field'), $sResult);
}
Example #12
0
 function getData()
 {
     global $oSysTemplate;
     $sContent = $this->_getJsCode();
     $aForm = array('form_attrs' => array('id' => 'sbs_form', 'name' => 'sbs_form', 'action' => $this->_sActionUrl, 'method' => 'post', 'enctype' => 'multipart/form-data', 'onSubmit' => 'javascript: return ' . $this->_sJsObject . '.send(this);'), 'inputs' => array('direction' => array('type' => 'hidden', 'name' => 'direction', 'value' => ''), 'unit' => array('type' => 'hidden', 'name' => 'unit', 'value' => ''), 'action' => array('type' => 'hidden', 'name' => 'action', 'value' => ''), 'object_id' => array('type' => 'hidden', 'name' => 'object_id', 'value' => ''), 'user_name' => array('type' => 'text', 'name' => 'user_name', 'caption' => _t('_sys_txt_sbs_name'), 'value' => '', 'attrs' => array('id' => 'sbs_name')), 'user_email' => array('type' => 'text', 'name' => 'user_email', 'caption' => _t('_sys_txt_sbs_email'), 'value' => '', 'attrs' => array('id' => 'sbs_email')), 'sbs_controls' => array('type' => 'input_set', array('type' => 'submit', 'name' => 'sbs_subscribe', 'value' => _t('_sys_btn_sbs_subscribe'), 'attrs' => array('onClick' => 'javascript:$("#' . $this->_sVisitorPopup . ' [name=\'direction\']").val(\'subscribe\')')), array('type' => 'submit', 'name' => 'sbs_unsubscribe', 'value' => _t('_sys_btn_sbs_unsubscribe'), 'attrs' => array('onClick' => 'javascript:$("#' . $this->_sVisitorPopup . ' [name=\'direction\']").val(\'unsubscribe\')')))));
     $oForm = new BxTemplFormView($aForm);
     $sContent .= PopupBox($this->_sVisitorPopup, _t('_sys_bcpt_subscribe'), $oSysTemplate->parseHtmlByName('default_margin.html', array('content' => $oForm->getCode())));
     $oSysTemplate->addCss('subscription.css');
     $oSysTemplate->addJs('BxDolSubscription.js');
     return $sContent;
 }
Example #13
0
 function getListTemplate($sCurrent)
 {
     $sOutputCode = "";
     $aTemplates = get_templates_array();
     if (count($aTemplates) < 2) {
         return $sOutputCode;
     }
     $sGetTransfer = bx_encode_url_params($_GET, array('skin'));
     $aTmplVars = array();
     foreach ($aTemplates as $sName => $sTitle) {
         $aTmplVars[] = array('bx_if:show_icon' => array('condition' => false, 'content' => array()), 'class' => $sName == $sCurrent ? 'sys-bm-sub-item-selected' : '', 'link' => bx_html_attribute($_SERVER['PHP_SELF']) . '?' . $sGetTransfer . 'skin=' . $sName, 'onclick' => '', 'title' => $sTitle);
     }
     $sOutputCode .= $GLOBALS['oSysTemplate']->parseHtmlByName('extra_bottom_menu_sub_items.html', array('name_method' => 'Template', 'name_block' => 'template', 'bx_repeat:items' => $aTmplVars));
     return PopupBox('sys-bm-switcher-template', _t('_sys_bm_popup_cpt_design'), $sOutputCode);
 }
Example #14
0
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
    foreach ($_POST['os_appls'] as $iApplID) {
        $iOldID = (int) $iApplID;
        switch (true) {
            case isset($_POST['action_delete']):
                $oBxOSiModule->_oDb->deleteApplication($iOldID);
                break;
            case isset($_POST['action_approve']):
                $oBxOSiModule->_oDb->updateApplicationStatus($iOldID, 'active');
Example #15
0
                    $aContent = array();
                    $aItems = $GLOBALS['MySQL']->getAll("SELECT `tlk`.`Key` AS `key`, `tls`.`String` AS `string` FROM `sys_localization_keys` AS `tlk` \n              LEFT JOIN `sys_localization_strings` AS `tls` ON `tlk`.`ID`=`tls`.`IDKey` WHERE `tls`.`IDLanguage`= ? ", [$_GET['id']]);
                    foreach ($aItems as $aItem) {
                        $aContent[$aItem['key']] = $aItem['string'];
                    }
                    $sName = 'lang_' . $aLanguage['Name'] . '.php';
                    $sContent = "<?php\n\$aLangInfo=" . var_export($aLanguage, true) . ";\n\$aLangContent=" . var_export($aContent, true) . ";\n?>";
                    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
                    header("Content-type: application/octet-stream");
                    header("Content-Length: " . strlen($sContent));
                    header("Content-Disposition: attachment; filename=" . $sName);
                    echo $sContent;
                    exit;
                } else {
                    if (isset($_POST['action']) && $_POST['action'] == 'get_edit_form_language') {
                        echo json_encode(array('code' => PopupBox('adm-langs-wnd-edit', _t('_adm_box_cpt_lang_edit_language'), _getLanguageCreateForm(true))));
                        exit;
                    }
                }
            }
        }
    }
}
//--- Create/Delete/Edit Language Key ---//
if (isset($_POST['action']) && $_POST['action'] == 'get_edit_form_key') {
    echo json_encode(array('code' => PageCodeKeyEdit((int) $_POST['id'])));
    exit;
}
if (isset($_POST['create_key'])) {
    $sName = process_db_input($_POST['name']);
    $iCategoryId = (int) $_POST['category'];
Example #16
0
    function getData()
    {
        ob_start();
        ?>
            <script language="javascript" type="text/javascript">
            <!--
                var <?php 
        echo $this->_sJsObject;
        ?>
 = new BxDolSubscription({
                    sActionUrl: '<?php 
        echo $this->_sActionUrl;
        ?>
',
                    sObjName: '<?php 
        echo $this->_sJsObject;
        ?>
',
                    sVisitorPopup: '<?php 
        echo $this->_sVisitorPopup;
        ?>
'
                });
            -->
            </script>            
        <?php 
        $sContent = ob_get_clean();
        $aForm = array('form_attrs' => array('id' => 'sbs_form', 'name' => 'sbs_form', 'action' => $this->_sActionUrl, 'method' => 'post', 'enctype' => 'multipart/form-data', 'onSubmit' => 'javascript: return ' . $this->_sJsObject . '.send(this);'), 'inputs' => array('direction' => array('type' => 'hidden', 'name' => 'direction', 'value' => ''), 'unit' => array('type' => 'hidden', 'name' => 'unit', 'value' => ''), 'action' => array('type' => 'hidden', 'name' => 'action', 'value' => ''), 'object_id' => array('type' => 'hidden', 'name' => 'object_id', 'value' => ''), 'user_name' => array('type' => 'text', 'name' => 'user_name', 'caption' => _t('_sys_txt_sbs_name'), 'value' => '', 'attrs' => array('id' => 'sbs_name')), 'user_email' => array('type' => 'text', 'name' => 'user_email', 'caption' => _t('_sys_txt_sbs_email'), 'value' => '', 'attrs' => array('id' => 'sbs_email')), 'sbs_controls' => array('type' => 'input_set', array('type' => 'submit', 'name' => 'sbs_subscribe', 'value' => _t('_sys_btn_sbs_subscribe'), 'attrs' => array('onClick' => 'javascript:$("#' . $this->_sVisitorPopup . ' [name=\'direction\']").val(\'subscribe\')')), array('type' => 'submit', 'name' => 'sbs_unsubscribe', 'value' => _t('_sys_btn_sbs_unsubscribe'), 'attrs' => array('onClick' => 'javascript:$("#' . $this->_sVisitorPopup . ' [name=\'direction\']").val(\'unsubscribe\')')))));
        $oForm = new BxTemplFormView($aForm);
        $sContent .= PopupBox($this->_sVisitorPopup, _t('_sys_bcpt_subscribe'), $oForm->getCode());
        $GLOBALS['oSysTemplate']->addCss('subscription.css');
        $GLOBALS['oSysTemplate']->addJs('BxDolSubscription.js');
        return $sContent;
    }