示例#1
0
 $p_name_seo = !empty($_POST['p_name_seo']) && is_array($_POST['p_name_seo']) ? $_POST['p_name_seo'] : array();
 $p_title = !empty($_POST['p_title']) && is_array($_POST['p_title']) ? $_POST['p_title'] : array();
 $p_meta_description = !empty($_POST['p_meta_description']) && is_array($_POST['p_meta_description']) ? $_POST['p_meta_description'] : array();
 $p_meta_keywords = !empty($_POST['p_meta_keywords']) && is_array($_POST['p_meta_keywords']) ? $_POST['p_meta_keywords'] : array();
 $p_enable_metas = !empty($_POST['p_enable_metas']) ? true : false;
 $p_enable_gal_password = !empty($_POST['p_enable_gal_password']) ? true : false;
 $p_enable_gal_rte = !empty($_POST['p_enable_gal_rte']) ? $_POST['p_enable_gal_rte'] : '';
 $p_enable_rte = !empty($_POST['p_enable_rte']) ? $_POST['p_enable_rte'] : '';
 $p_enable_zip_upload = !empty($_POST['p_enable_zip_upload']) ? true : false;
 $p_enable_multiple_upload = !empty($_POST['p_enable_multiple_upload']) ? true : false;
 $p_multiple_upload_type = !empty($_POST['p_multiple_upload_type']) ? $_POST['p_multiple_upload_type'] : 'plupload';
 $p_images = $oItemImageUploadConfig->getPostConfig();
 $p_images_gal = $oGalleryImageUploadConfig->getPostConfig();
 $p_tpl_list = $oTemplatesList->getPostConfig();
 $p_tpl_gallery = $oTemplatesGallery->getPostConfig();
 $p_tpl_item = $oTemplatesItem->getPostConfig();
 $p_public_list_url = !empty($_POST['p_public_list_url']) && is_array($_POST['p_public_list_url']) ? $_POST['p_public_list_url'] : array();
 foreach ($p_public_list_url as $lang => $url) {
     $p_public_list_url[$lang] = util::formatAppPath($url, false, false);
 }
 $p_public_feed_url = !empty($_POST['p_public_feed_url']) && is_array($_POST['p_public_feed_url']) ? $_POST['p_public_feed_url'] : array();
 foreach ($p_public_feed_url as $lang => $url) {
     $p_public_feed_url[$lang] = util::formatAppPath($url, false, false);
 }
 $p_public_gallery_url = !empty($_POST['p_public_gallery_url']) && is_array($_POST['p_public_gallery_url']) ? $_POST['p_public_gallery_url'] : array();
 foreach ($p_public_gallery_url as $lang => $url) {
     $p_public_gallery_url[$lang] = util::formatAppPath($url, false, false);
 }
 $p_public_item_url = !empty($_POST['p_public_item_url']) && is_array($_POST['p_public_item_url']) ? $_POST['p_public_item_url'] : array();
 foreach ($p_public_item_url as $lang => $url) {
     $p_public_item_url[$lang] = util::formatAppPath($url, false, false);
示例#2
0
    $okt->redirect('module.php?m=pages&action=config');
}
# enregistrement configuration
if (!empty($_POST['form_sent'])) {
    $p_enable_metas = !empty($_POST['p_enable_metas']) ? true : false;
    $p_enable_filters = !empty($_POST['p_enable_filters']) ? true : false;
    $p_perms = !empty($_POST['p_perms']) && is_array($_POST['p_perms']) ? array_map('intval', $_POST['p_perms']) : array(0);
    $p_enable_group_perms = !empty($_POST['p_enable_group_perms']) ? true : false;
    $p_enable_rte = !empty($_POST['p_enable_rte']) ? $_POST['p_enable_rte'] : '';
    $p_categories_enable = !empty($_POST['p_categories_enable']) ? true : false;
    $p_categories_descriptions = !empty($_POST['p_categories_descriptions']) ? true : false;
    $p_categories_rte = !empty($_POST['p_categories_rte']) ? $_POST['p_categories_rte'] : '';
    $p_tpl_list = $oTemplatesList->getPostConfig();
    $p_tpl_item = $oTemplatesItem->getPostConfig();
    $p_tpl_insert = $oTemplatesInsert->getPostConfig();
    $p_tpl_feed = $oTemplatesFeed->getPostConfig();
    $aImagesConfig = $oImageUploadConfig->getPostConfig();
    $p_enable_files = !empty($_POST['p_enable_files']) ? true : false;
    $p_number_files = !empty($_POST['p_number_files']) ? intval($_POST['p_number_files']) : 0;
    $p_allowed_exts = !empty($_POST['p_allowed_exts']) ? $_POST['p_allowed_exts'] : '';
    $p_name = !empty($_POST['p_name']) && is_array($_POST['p_name']) ? $_POST['p_name'] : array();
    $p_name_seo = !empty($_POST['p_name_seo']) && is_array($_POST['p_name_seo']) ? $_POST['p_name_seo'] : array();
    $p_title = !empty($_POST['p_title']) && is_array($_POST['p_title']) ? $_POST['p_title'] : array();
    $p_meta_description = !empty($_POST['p_meta_description']) && is_array($_POST['p_meta_description']) ? $_POST['p_meta_description'] : array();
    $p_meta_keywords = !empty($_POST['p_meta_keywords']) && is_array($_POST['p_meta_keywords']) ? $_POST['p_meta_keywords'] : array();
    $p_public_list_url = !empty($_POST['p_public_list_url']) && is_array($_POST['p_public_list_url']) ? $_POST['p_public_list_url'] : array();
    foreach ($p_public_list_url as $lang => $url) {
        $p_public_list_url[$lang] = util::formatAppPath($url, false, false);
    }
    $p_public_feed_url = !empty($_POST['p_public_feed_url']) && is_array($_POST['p_public_feed_url']) ? $_POST['p_public_feed_url'] : array();
    foreach ($p_public_feed_url as $lang => $url) {
示例#3
0
 $p_enable_accessories = !empty($_POST['p_enable_accessories']) ? true : false;
 $p_captcha = !empty($_POST['p_captcha']) ? $_POST['p_captcha'] : '';
 $p_enable_notifications = !empty($_POST['p_enable_notifications']) ? true : false;
 $p_notifications_recipients = !empty($_POST['p_notifications_recipients']) ? $_POST['p_notifications_recipients'] : '';
 $p_notifications_recipients = array_map('trim', explode(',', $p_notifications_recipients));
 foreach ($p_notifications_recipients as $i => $sEmail) {
     if ($sEmail != '' && !text::isEmail($sEmail)) {
         $okt->error->set(sprintf(__('c_c_error_invalid_email'), html::escapeHTML($sEmail)));
     }
     $p_notifications_recipients[$i] = $sEmail;
 }
 $p_notifications_recipients = implode(',', $p_notifications_recipients);
 $p_default_products_number = !empty($_POST['p_default_products_number']) ? intval($_POST['p_default_products_number']) : 1;
 $p_default_accessories_number = !empty($_POST['p_default_accessories_number']) ? intval($_POST['p_default_accessories_number']) : 1;
 $p_tpl_form = $oTemplatesForm->getPostConfig();
 $p_tpl_summary = $oTemplatesSummary->getPostConfig();
 $p_name = !empty($_POST['p_name']) && is_array($_POST['p_name']) ? $_POST['p_name'] : array();
 $p_name_seo = !empty($_POST['p_name_seo']) && is_array($_POST['p_name_seo']) ? $_POST['p_name_seo'] : array();
 $p_title = !empty($_POST['p_title']) && is_array($_POST['p_title']) ? $_POST['p_title'] : array();
 $p_meta_description = !empty($_POST['p_meta_description']) && is_array($_POST['p_meta_description']) ? $_POST['p_meta_description'] : array();
 $p_meta_keywords = !empty($_POST['p_meta_keywords']) && is_array($_POST['p_meta_keywords']) ? $_POST['p_meta_keywords'] : array();
 $p_public_form_url = !empty($_POST['p_public_form_url']) ? $_POST['p_public_form_url'] : '';
 foreach ($p_public_form_url as $lang => $url) {
     $p_public_form_url[$lang] = util::formatAppPath($url, false, false);
 }
 $p_public_summary_url = !empty($_POST['p_public_summary_url']) ? $_POST['p_public_summary_url'] : '';
 foreach ($p_public_summary_url as $lang => $url) {
     $p_public_summary_url[$lang] = util::formatAppPath($url, false, false);
 }
 if ($okt->error->isEmpty()) {
     $new_conf = array('name' => $p_name, 'name_seo' => $p_name_seo, 'title' => $p_title, 'meta_description' => $p_meta_description, 'meta_keywords' => $p_meta_keywords, 'enable_accessories' => (bool) $p_enable_accessories, 'captcha' => $p_captcha, 'enable_notifications' => (bool) $p_enable_notifications, 'notifications_recipients' => $p_notifications_recipients, 'default_products_number' => (int) $p_default_products_number, 'default_accessories_number' => (int) $p_default_accessories_number, 'templates' => array('form' => $p_tpl_form, 'summary' => $p_tpl_summary), 'public_form_url' => $p_public_form_url, 'public_summary_url' => $p_public_summary_url);
示例#4
0
 *
 * @addtogroup Okatea
 *
 */
# Accès direct interdit
if (!defined('ON_CONFIGURATION_MODULE')) {
    die;
}
/* Initialisations
----------------------------------------------------------*/
# Gestionnaire de templates
$oTemplates = new oktTemplatesSet($okt, $okt->config->navigation_tpl, 'navigation', 'navigation', 'configuration.php?action=navigation&do=config&');
/* Traitements
----------------------------------------------------------*/
if (!empty($_POST['sended'])) {
    $p_tpl = $oTemplates->getPostConfig();
    if ($okt->error->isEmpty()) {
        $new_conf = array('navigation_tpl' => $p_tpl);
        try {
            $okt->config->write($new_conf);
            $okt->page->flashMessages->addSuccess(__('c_c_confirm_configuration_updated'));
            $okt->redirect('configuration.php?action=navigation&do=config');
        } catch (InvalidArgumentException $e) {
            $okt->error->set(__('c_c_error_writing_configuration'));
            $okt->error->set($e->getMessage());
        }
    }
}
/* Affichage
----------------------------------------------------------*/
# button set
示例#5
0
----------------------------------------------------------*/
# google map activable ?
$bGoogleMapNotEnablable = $okt->config->address['street'] == '' || $okt->config->address['code'] == '' || $okt->config->address['city'] == '';
# Gestionnaires de templates
$oTemplatesContact = new oktTemplatesSet($okt, $okt->contact->config->templates['contact'], 'contact/contact', 'contact', 'module.php?m=contact&action=config&');
$oTemplatesMap = new oktTemplatesSet($okt, $okt->contact->config->templates['map'], 'contact/map', 'map', 'module.php?m=contact&action=config&');
/* Traitements
----------------------------------------------------------*/
# enregistrement configuration
if (!empty($_POST['form_sent'])) {
    $p_captcha = !empty($_POST['p_captcha']) ? $_POST['p_captcha'] : '';
    $p_from_to = !empty($_POST['p_from_to']) ? $_POST['p_from_to'] : '';
    $p_mail_color = !empty($_POST['p_mail_color']) ? $_POST['p_mail_color'] : '000000';
    $p_mail_size = !empty($_POST['p_mail_size']) ? $_POST['p_mail_size'] : '12';
    $p_tpl_contact = $oTemplatesContact->getPostConfig();
    $p_tpl_map = $oTemplatesMap->getPostConfig();
    $p_name = !empty($_POST['p_name']) && is_array($_POST['p_name']) ? $_POST['p_name'] : array();
    $p_name_seo = !empty($_POST['p_name_seo']) && is_array($_POST['p_name_seo']) ? $_POST['p_name_seo'] : array();
    $p_title = !empty($_POST['p_title']) && is_array($_POST['p_title']) ? $_POST['p_title'] : array();
    $p_meta_description = !empty($_POST['p_meta_description']) && is_array($_POST['p_meta_description']) ? $_POST['p_meta_description'] : array();
    $p_meta_keywords = !empty($_POST['p_meta_keywords']) && is_array($_POST['p_meta_keywords']) ? $_POST['p_meta_keywords'] : array();
    $p_name_map = !empty($_POST['p_name_map']) && is_array($_POST['p_name_map']) ? $_POST['p_name_map'] : array();
    $p_name_seo_map = !empty($_POST['p_name_seo_map']) && is_array($_POST['p_name_seo_map']) ? $_POST['p_name_seo_map'] : array();
    $p_title_map = !empty($_POST['p_title_map']) && is_array($_POST['p_title_map']) ? $_POST['p_title_map'] : array();
    $p_meta_description_map = !empty($_POST['p_meta_description_map']) && is_array($_POST['p_meta_description_map']) ? $_POST['p_meta_description_map'] : array();
    $p_meta_keywords_map = !empty($_POST['p_meta_keywords_map']) && is_array($_POST['p_meta_keywords_map']) ? $_POST['p_meta_keywords_map'] : array();
    $p_public_url = !empty($_POST['p_public_url']) && is_array($_POST['p_public_url']) ? $_POST['p_public_url'] : array();
    foreach ($p_public_url as $lang => $url) {
        $p_public_url[$lang] = util::formatAppPath($url, false, false);
    }
    $p_public_map_url = !empty($_POST['p_public_map_url']) && is_array($_POST['p_public_map_url']) ? $_POST['p_public_map_url'] : array();
示例#6
0
 $p_enable_log_reg_page = !empty($_POST['p_enable_log_reg_page']) ? true : false;
 $p_enable_forget_password_page = !empty($_POST['p_enable_forget_password_page']) ? true : false;
 $p_enable_profile_page = !empty($_POST['p_enable_profile_page']) ? true : false;
 $p_enable_custom_fields = !empty($_POST['p_enable_custom_fields']) ? true : false;
 $p_mail_new_registration = !empty($_POST['p_mail_new_registration']) ? true : false;
 $p_validate_users_registration = !empty($_POST['p_validate_users_registration']) ? true : false;
 $p_merge_username_email = !empty($_POST['p_merge_username_email']) ? true : false;
 $p_auto_log_after_registration = !empty($_POST['p_auto_log_after_registration']) && !$p_validate_users_registration ? true : false;
 $p_user_choose_group = !empty($_POST['p_user_choose_group']) && !$p_validate_users_registration ? true : false;
 $p_default_group = !empty($_POST['p_default_group']) ? intval($_POST['p_default_group']) : 0;
 $p_tpl_forgotten_password = $oTemplatesForgottenPassword->getPostConfig();
 $p_tpl_login = $oTemplatesLogin->getPostConfig();
 $p_tpl_loginRegister = $oTemplatesLoginRegister->getPostConfig();
 $p_tpl_profile = $oTemplatesProfile->getPostConfig();
 $p_tpl_register = $oTemplatesRegister->getPostConfig();
 $p_tpl_user_bar = $oTemplatesUserBar->getPostConfig();
 $p_public_login_url = !empty($_POST['p_public_login_url']) && is_array($_POST['p_public_login_url']) ? $_POST['p_public_login_url'] : array();
 foreach ($p_public_login_url as $lang => $url) {
     $p_public_login_url[$lang] = util::formatAppPath($url, false, false);
 }
 $p_public_logout_url = !empty($_POST['p_public_logout_url']) && is_array($_POST['p_public_logout_url']) ? $_POST['p_public_logout_url'] : array();
 foreach ($p_public_logout_url as $lang => $url) {
     $p_public_logout_url[$lang] = util::formatAppPath($url, false, false);
 }
 $p_public_register_url = !empty($_POST['p_public_register_url']) && is_array($_POST['p_public_register_url']) ? $_POST['p_public_register_url'] : array();
 foreach ($p_public_register_url as $lang => $url) {
     $p_public_register_url[$lang] = util::formatAppPath($url, false, false);
 }
 $p_public_log_reg_url = !empty($_POST['p_public_log_reg_url']) && is_array($_POST['p_public_log_reg_url']) ? $_POST['p_public_log_reg_url'] : array();
 foreach ($p_public_log_reg_url as $lang => $url) {
     $p_public_log_reg_url[$lang] = util::formatAppPath($url, false, false);