Beispiel #1
0
function check_user_info(&$error)
{
    global $CONFIG;
    //, $PHP_SELF;
    global $lang_register_php, $lang_register_confirm_email, $lang_continue, $lang_register_approve_email, $lang_register_activated_email, $lang_register_user_login;
    //$CONFIG['admin_activation'] = FALSE;
    //$CONFIG['admin_activation'] = TRUE;
    $user_name = trim(get_post_var('username'));
    $password = trim(get_post_var('password'));
    $password_again = trim(get_post_var('password_verification'));
    $email = trim(get_post_var('email'));
    $profile1 = addslashes($_POST['user_profile1']);
    $profile2 = addslashes($_POST['user_profile2']);
    $profile3 = addslashes($_POST['user_profile3']);
    $profile4 = addslashes($_POST['user_profile4']);
    $profile5 = addslashes($_POST['user_profile5']);
    $profile6 = addslashes($_POST['user_profile6']);
    $sql = "SELECT user_id " . "FROM {$CONFIG['TABLE_USERS']} " . "WHERE user_name = '" . addslashes($user_name) . "'";
    $result = cpg_db_query($sql);
    if (mysql_num_rows($result)) {
        $error = '<li>' . $lang_register_php['err_user_exists'];
        return false;
    }
    mysql_free_result($result);
    if (utf_strlen($user_name) < 2) {
        $error .= '<li>' . $lang_register_php['err_uname_short'];
    }
    if (utf_strlen($password) < 2) {
        $error .= '<li>' . $lang_register_php['err_password_short'];
    }
    if ($password == $user_name) {
        $error .= '<li>' . $lang_register_php['err_uname_pass_diff'];
    }
    if ($password != $password_again) {
        $error .= '<li>' . $lang_register_php['err_password_mismatch'];
    }
    if (!eregi("^[_\\.0-9a-z\\-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,6}\$", $email)) {
        $error .= '<li>' . $lang_register_php['err_invalid_email'];
    }
    if ($error != '') {
        return false;
    }
    if (!$CONFIG['allow_duplicate_emails_addr']) {
        $sql = "SELECT user_id " . "FROM {$CONFIG['TABLE_USERS']} " . "WHERE user_email = '" . addslashes($email) . "'";
        $result = cpg_db_query($sql);
        if (mysql_num_rows($result)) {
            $error = '<li>' . $lang_register_php['err_duplicate_email'];
            return false;
        }
        mysql_free_result($result);
    }
    if ($CONFIG['reg_requires_valid_email'] || $CONFIG['admin_activation']) {
        $active = 'NO';
        list($usec, $sec) = explode(' ', microtime());
        $seed = (double) $sec + (double) $usec * 100000;
        srand($seed);
        $act_key = md5(uniqid(rand(), 1));
    } else {
        $active = 'YES';
        $act_key = '';
    }
    if ($CONFIG['enable_encrypted_passwords']) {
        $encpassword = md5($password);
    } else {
        $encpassword = $password;
    }
    $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} " . "(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6) " . "VALUES (NOW(), '{$active}', '{$act_key}', '" . addslashes($user_name) . "', '" . addslashes($encpassword) . "', '" . addslashes($email) . "', '{$profile1}', '{$profile2}', '{$profile3}', '{$profile4}', '{$profile5}', '{$profile6}')";
    if ($CONFIG['log_mode']) {
        log_write('New user "' . addslashes($user_name) . '" created on ' . date("F j, Y, g:i a"), CPG_ACCESS_LOG);
    }
    $result = cpg_db_query($sql);
    if ($CONFIG['reg_requires_valid_email']) {
        if (!$CONFIG['admin_activation'] == 1) {
            //user gets activation email
            $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
            $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'], '{USER_NAME}' => $user_name, '{ACT_LINK}' => $act_link);
            if (!cpg_mail($email, sprintf($lang_register_php['confirm_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_confirm_email, $template_vars)))) {
                cpg_die(CRITICAL_ERROR, $lang_register_php['failed_sending_email'], __FILE__, __LINE__);
            }
        }
        if ($CONFIG['admin_activation'] == 1) {
            msg_box($lang_register_php['information'], $lang_register_php['thank_you_admin_activation'], $lang_continue, 'index.php');
        } else {
            msg_box($lang_register_php['information'], $lang_register_php['thank_you'], $lang_continue, 'index.php');
        }
    } else {
        msg_box($lang_register_php['information'], $lang_register_php['acct_active'], $lang_continue, 'index.php');
    }
    // email notification to admin
    if ($CONFIG['reg_notify_admin_email']) {
        // get default language in which to inform the admin
        $lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
        $lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');
        if ($CONFIG['admin_activation'] == 1) {
            $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
            $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'], '{USER_NAME}' => $user_name, '{ACT_LINK}' => $act_link);
            cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars)));
        } else {
            cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
        }
    }
    return true;
}
Beispiel #2
0
function check_user_info(&$error)
{
    // function check_user_info - start
    global $CONFIG;
    //, $PHP_SELF;
    global $lang_register_php, $lang_register_confirm_email, $lang_common, $lang_register_approve_email;
    global $lang_register_activated_email, $lang_register_user_login, $lang_errors;
    $superCage = Inspekt::makeSuperCage();
    //$CONFIG['admin_activation'] = FALSE;
    //$CONFIG['admin_activation'] = TRUE;
    $user_name = trim(get_post_var('username'));
    $password = trim(get_post_var('password'));
    $password_again = trim(get_post_var('password_verification'));
    $email = trim(get_post_var('email'));
    $profile1 = $superCage->post->getEscaped('user_profile1');
    $profile2 = $superCage->post->getEscaped('user_profile2');
    $profile3 = $superCage->post->getEscaped('user_profile3');
    $profile4 = $superCage->post->getEscaped('user_profile4');
    $profile5 = $superCage->post->getEscaped('user_profile5');
    $profile6 = $superCage->post->getEscaped('user_profile6');
    $agree_disclaimer = $superCage->post->getEscaped('agree');
    $captcha_confirmation = $superCage->post->getEscaped('confirmCode');
    $sql = "SELECT user_id " . "FROM {$CONFIG['TABLE_USERS']} " . "WHERE user_name = '" . $user_name . "'";
    $result = cpg_db_query($sql);
    if (mysql_num_rows($result)) {
        $error = '<li>' . $lang_register_php['err_user_exists'] . '</li>';
        return false;
    }
    mysql_free_result($result);
    if (utf_strlen($user_name) < 2) {
        $error .= '<li>' . $lang_register_php['err_uname_short'] . '</li>';
    }
    if (!empty($CONFIG['global_registration_pw'])) {
        $global_registration_pw = get_post_var('global_registration_pw');
        if ($global_registration_pw != $CONFIG['global_registration_pw']) {
            $error .= '<li>' . $lang_register_php['err_global_pw'] . '</li>';
        } elseif ($password == $CONFIG['global_registration_pw']) {
            $error .= '<li>' . $lang_register_php['err_global_pass_same'] . '</li>';
        }
    }
    if (utf_strlen($password) < 2) {
        $error .= '<li>' . $lang_register_php['err_password_short'] . '</li>';
    }
    if ($password == $user_name) {
        $error .= '<li>' . $lang_register_php['err_uname_pass_diff'] . '</li>';
    }
    if ($password != $password_again) {
        $error .= '<li>' . $lang_register_php['err_password_mismatch'] . '</li>';
    }
    if (!eregi("^[_\\.0-9a-z\\-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,6}\$", $email)) {
        $error .= '<li>' . $lang_register_php['err_invalid_email'] . '</li>';
    }
    if ($CONFIG['user_registration_disclaimer'] == 2 && $agree_disclaimer != 1) {
        $error .= '<li>' . $lang_register_php['err_disclaimer'] . '</li>';
    }
    // check captcha
    if ($CONFIG['registration_captcha'] != 0) {
        require "include/captcha.inc.php";
        if (!PhpCaptcha::Validate($captcha_confirmation)) {
            $error .= '<li>' . $lang_errors['captcha_error'] . '</li>';
        }
    }
    if ($error != '') {
        return false;
    }
    if (!$CONFIG['allow_duplicate_emails_addr']) {
        $sql = "SELECT user_id " . "FROM {$CONFIG['TABLE_USERS']} " . "WHERE user_email = '" . addslashes($email) . "'";
        $result = cpg_db_query($sql);
        if (mysql_num_rows($result)) {
            $error = '<li>' . $lang_register_php['err_duplicate_email'] . '</li>';
            return false;
        }
        mysql_free_result($result);
    }
    if ($CONFIG['reg_requires_valid_email'] || $CONFIG['admin_activation']) {
        $active = 'NO';
        list($usec, $sec) = explode(' ', microtime());
        $seed = (double) $sec + (double) $usec * 100000;
        srand($seed);
        $act_key = md5(uniqid(rand(), 1));
    } else {
        $active = 'YES';
        $act_key = '';
    }
    if ($CONFIG['enable_encrypted_passwords']) {
        $encpassword = md5($password);
    } else {
        $encpassword = $password;
    }
    $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} " . "(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6) " . "VALUES (NOW(), '{$active}', '{$act_key}', '{$user_name}', '{$encpassword}', '{$email}', '{$profile1}', '{$profile2}', '{$profile3}', '{$profile4}', '{$profile5}', '{$profile6}')";
    if ($CONFIG['log_mode']) {
        log_write('New user "$user_name" created on ' . date("F j, Y, g:i a"), CPG_ACCESS_LOG);
    }
    $result = cpg_db_query($sql);
    // Create a personal album if corresponding option is enabled
    if ($CONFIG['personal_album_on_registration'] == 1) {
        print 'sub<br />';
        $catid = mysql_insert_id() + FIRST_USER_CAT;
        print $catid;
        cpg_db_query("INSERT INTO {$CONFIG['TABLE_ALBUMS']} (`title`, `category`) VALUES ('{$user_name}', {$catid})");
        print "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (`title`, `category`) VALUES ('{$user_name}', {$catid})";
    }
    if ($CONFIG['reg_requires_valid_email']) {
        if (!$CONFIG['admin_activation'] == 1) {
            //user gets activation email
            $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
            $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'], '{USER_NAME}' => $user_name, '{ACT_LINK}' => $act_link);
            if (!cpg_mail($email, sprintf($lang_register_php['confirm_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_confirm_email, $template_vars)))) {
                cpg_die(CRITICAL_ERROR, $lang_register_php['failed_sending_email'], __FILE__, __LINE__);
            }
        }
        if ($CONFIG['admin_activation'] == 1) {
            msg_box($lang_register_php['information'], $lang_register_php['thank_you_admin_activation'], $lang_common['continue'], 'index.php');
        } else {
            msg_box($lang_register_php['information'], $lang_register_php['thank_you'], $lang_common['continue'], 'index.php');
        }
    } else {
        msg_box($lang_register_php['information'], $lang_register_php['acct_active'], $lang_common['continue'], 'index.php');
    }
    // email notification to admin
    if ($CONFIG['reg_notify_admin_email']) {
        // get default language in which to inform the admin
        $lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
        $lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');
        if ($CONFIG['admin_activation'] == 1) {
            $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
            $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'], '{USER_NAME}' => $user_name, '{ACT_LINK}' => $act_link);
            cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars)));
        } else {
            cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
        }
    }
    return true;
}
function check_user_info(&$error)
{
    global $CONFIG;
    global $lang_register_php, $lang_common, $lang_register_approve_email;
    global $lang_register_user_login, $lang_errors;
    $superCage = Inspekt::makeSuperCage();
    $user_name = trim(get_post_var('username'));
    $password = trim(get_post_var('password'));
    $password_again = trim(get_post_var('password_verification'));
    $email = trim(get_post_var('email'));
    $profile1 = $superCage->post->getEscaped('user_profile1');
    $profile2 = $superCage->post->getEscaped('user_profile2');
    $profile3 = $superCage->post->getEscaped('user_profile3');
    $profile4 = $superCage->post->getEscaped('user_profile4');
    $profile5 = $superCage->post->getEscaped('user_profile5');
    $profile6 = $superCage->post->getEscaped('user_profile6');
    $agree_disclaimer = $superCage->post->getEscaped('agree');
    $captcha_confirmation = $superCage->post->getEscaped('confirmCode');
    $sql = "SELECT null FROM {$CONFIG['TABLE_USERS']} WHERE user_name = '{$user_name}'";
    $result = cpg_db_query($sql);
    if (mysql_num_rows($result)) {
        $error = '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['err_user_exists'] . '</li>';
        return false;
    }
    mysql_free_result($result);
    if (utf_strlen($user_name) < 2) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['username_warning2'] . '</li>';
    }
    if (!empty($CONFIG['global_registration_pw'])) {
        $global_registration_pw = get_post_var('global_registration_pw');
        if ($global_registration_pw != $CONFIG['global_registration_pw']) {
            $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['err_global_pw'] . '</li>';
        } elseif ($password == $CONFIG['global_registration_pw']) {
            $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['err_global_pass_same'] . '</li>';
        }
    }
    if (utf_strlen($password) < 2) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['password_warning1'] . '</li>';
    }
    if ($password == $user_name) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['password_warning2'] . '</li>';
    }
    if ($password != $password_again) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['password_verification_warning1'] . '</li>';
    }
    if (!Inspekt::isEmail($email)) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['email_warning2'] . '</li>';
    }
    if ($CONFIG['user_registration_disclaimer'] == 2 && $agree_disclaimer != 1) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['err_disclaimer'] . '</li>';
    }
    // Perform the ban check against email address and username
    $result = cpg_db_query("SELECT null FROM {$CONFIG['TABLE_BANNED']} WHERE user_name = '{$user_name}' AND brute_force = 0 LIMIT 1");
    if (mysql_num_rows($result)) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['user_name_banned'] . '</li>';
    }
    mysql_free_result($result);
    $result = cpg_db_query("SELECT null FROM {$CONFIG['TABLE_BANNED']} WHERE email = '{$email}' AND brute_force = 0 LIMIT 1");
    if (mysql_num_rows($result)) {
        $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['email_address_banned'] . '</li>';
    }
    mysql_free_result($result);
    // check captcha
    if ($CONFIG['registration_captcha'] != 0) {
        if (!captcha_plugin_enabled('register')) {
            require "include/captcha.inc.php";
            if (!PhpCaptcha::Validate($captcha_confirmation)) {
                $error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_errors['captcha_error'] . '</li>';
            }
        } else {
            $error = CPGPluginAPI::filter('captcha_register_validate', $error);
        }
    }
    if (!$CONFIG['allow_duplicate_emails_addr']) {
        $sql = "SELECT null FROM {$CONFIG['TABLE_USERS']} WHERE user_email = '{$email}'";
        $result = cpg_db_query($sql);
        if (mysql_num_rows($result)) {
            $error = '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_register_php['err_duplicate_email'] . '</li>';
        }
        mysql_free_result($result);
    }
    $error = CPGPluginAPI::filter('register_form_validate', $error);
    if ($error != '') {
        return false;
    }
    if ($CONFIG['reg_requires_valid_email'] || $CONFIG['admin_activation']) {
        $active = 'NO';
        list($usec, $sec) = explode(' ', microtime());
        $seed = (double) $sec + (double) $usec * 100000;
        srand($seed);
        $act_key = md5(uniqid(rand(), 1));
    } else {
        $active = 'YES';
        $act_key = '';
    }
    $encpassword = md5($password);
    $user_language = $CONFIG['lang'];
    $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} (user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6, user_language) VALUES (NOW(), '{$active}', '{$act_key}', '{$user_name}', '{$encpassword}', '{$email}', '{$profile1}', '{$profile2}', '{$profile3}', '{$profile4}', '{$profile5}', '{$profile6}', '{$user_language}')";
    $result = cpg_db_query($sql);
    $user_array = array();
    $user_array['user_id'] = mysql_insert_id();
    $user_array['user_name'] = $user_name;
    $user_array['user_email'] = $email;
    $user_array['user_active'] = $active;
    CPGPluginAPI::action('register_form_submit', $user_array);
    if ($CONFIG['log_mode']) {
        log_write('New user "' . $user_name . '" registered', CPG_ACCESS_LOG);
    }
    // Create a personal album if corresponding option is enabled
    if ($CONFIG['personal_album_on_registration'] == 1) {
        $user_id = mysql_insert_id();
        $catid = $user_id + FIRST_USER_CAT;
        cpg_db_query("INSERT INTO {$CONFIG['TABLE_ALBUMS']} (`title`, `category`, `owner`) VALUES ('{$user_name}', {$catid}, {$user_id})");
    }
    // Registrations must be activated/verified by the user clicking a link in an email
    if ($CONFIG['reg_requires_valid_email']) {
        // Mail the user the activation/verification link
        $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
        $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'], '{USER_NAME}' => $user_name, '{ACT_LINK}' => $act_link);
        if (!cpg_mail($email, sprintf($lang_register_php['confirm_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_php['confirm_email'], $template_vars)))) {
            cpg_die(CRITICAL_ERROR, $lang_register_php['failed_sending_email'], __FILE__, __LINE__);
        }
        msg_box($lang_register_php['information'], $lang_register_php['thank_you'], $lang_common['continue'], 'index.php');
    } else {
        if ($CONFIG['admin_activation']) {
            // We need admin activation only
            msg_box($lang_register_php['information'], $lang_register_php['thank_you_admin_activation'], $lang_common['continue'], 'index.php');
        } else {
            // No activation required, account is ready for login
            msg_box($lang_register_php['information'], $lang_register_php['acct_active'], $lang_common['continue'], 'index.php');
        }
    }
    // email notification or actication link to admin
    if ($CONFIG['reg_notify_admin_email'] || $CONFIG['admin_activation'] && !$CONFIG['reg_requires_valid_email']) {
        if (UDB_INTEGRATION == 'coppermine') {
            // get default language in which to inform the admins
            $result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_group = 1");
            while ($row = mysql_fetch_assoc($result)) {
                if (!empty($row['user_email'])) {
                    $admins[$row['user_id']] = array('email' => $row['user_email'], 'lang' => $row['user_language']);
                }
            }
        } else {
            //@todo: is it possible to get the language from bridged installs?
            $admins[] = array('email' => $CONFIG['gallery_admin_email'], 'lang' => 'english');
        }
        foreach ($admins as $admin) {
            //check if the admin language is available
            if (file_exists("lang/{$admin['lang']}.php")) {
                $lang_register_php_def = cpg_get_default_lang_var('lang_register_php', $admin['lang']);
                $lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email', $admin['lang']);
            } else {
                $lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
                $lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');
            }
            // if the admin has to activate the login, give them the link to do so; but only if users don't have to verify their email address
            if ($CONFIG['admin_activation'] && !$CONFIG['reg_requires_valid_email']) {
                $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
                $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'], '{USER_NAME}' => $user_name, '{ACT_LINK}' => $act_link);
                cpg_mail($admin['email'], sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars)));
            } elseif ($CONFIG['reg_notify_admin_email']) {
                // otherwise, email is for information only
                cpg_mail($admin['email'], sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
            }
        }
    }
    return true;
}
Beispiel #4
0
 function cpg_send_upload_notification()
 {
     global $CONFIG;
     $lang_db_input_php = cpg_get_default_lang_var('lang_db_input_php');
     // Get the mail files.
     include_once 'include/mailer.inc.php';
     // Send the message.
     cpg_mail('admin', sprintf($lang_db_input_php['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_db_input_php['notify_admin_email_body'], USER_NAME, $CONFIG['ecards_more_pic_target'] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . 'editpics.php?mode=upload_approval'));
 }
Beispiel #5
0
// ------------------------------------------------------------------------- //
// File xp_publish.php
// ------------------------------------------------------------------------- //
if (defined('XP_PUBLISH_PHP')) {
    $lang_xp_publish_php_en = cpg_get_default_lang_var('lang_xp_publish_php', 'english');
    $lang_xp_publish_php = array_merge($lang_xp_publish_php_en, $lang_xp_publish_php);
    $lang_xp_publish_required_en = cpg_get_default_lang_var('lang_xp_publish_required', 'english');
    if (!isset($lang_xp_publish_required)) {
        $lang_xp_publish_required = $lang_xp_publish_required_en;
    }
    $lang_xp_publish_client_en = cpg_get_default_lang_var('lang_xp_publish_client', 'english');
    if (!isset($lang_xp_publish_client)) {
        $lang_xp_publish_client = $lang_xp_publish_client_en;
    }
    $lang_xp_publish_select_en = cpg_get_default_lang_var('lang_xp_publish_select', 'english');
    if (!isset($lang_xp_publish_select)) {
        $lang_xp_publish_select = $lang_xp_publish_select_en;
    }
    $lang_xp_publish_testing_en = cpg_get_default_lang_var('lang_xp_publish_testing', 'english');
    if (!isset($lang_xp_publish_testing)) {
        $lang_xp_publish_testing = $lang_xp_publish_testing_en;
    }
    $lang_xp_publish_notes_en = cpg_get_default_lang_var('lang_xp_publish_notes', 'english');
    if (!isset($lang_xp_publish_notes)) {
        $lang_xp_publish_notes = $lang_xp_publish_notes_en;
    }
    $lang_xp_publish_flood_en = cpg_get_default_lang_var('lang_xp_publish_flood', 'english');
    if (!isset($lang_xp_publish_flood)) {
        $lang_xp_publish_flood = $lang_xp_publish_flood_en;
    }
}
Beispiel #6
0
    if (!isset($lang_xp_publish_required)) {
        $lang_xp_publish_required = $lang_xp_publish_required_en;
    }
    $lang_xp_publish_client_en = cpg_get_default_lang_var('lang_xp_publish_client', 'english');
    if (!isset($lang_xp_publish_client)) {
        $lang_xp_publish_client = $lang_xp_publish_client_en;
    }
    $lang_xp_publish_select_en = cpg_get_default_lang_var('lang_xp_publish_select', 'english');
    if (!isset($lang_xp_publish_select)) {
        $lang_xp_publish_select = $lang_xp_publish_select_en;
    }
    $lang_xp_publish_testing_en = cpg_get_default_lang_var('lang_xp_publish_testing', 'english');
    if (!isset($lang_xp_publish_testing)) {
        $lang_xp_publish_testing = $lang_xp_publish_testing_en;
    }
    $lang_xp_publish_notes_en = cpg_get_default_lang_var('lang_xp_publish_notes', 'english');
    if (!isset($lang_xp_publish_notes)) {
        $lang_xp_publish_notes = $lang_xp_publish_notes_en;
    }
    $lang_xp_publish_flood_en = cpg_get_default_lang_var('lang_xp_publish_flood', 'english');
    if (!isset($lang_xp_publish_flood)) {
        $lang_xp_publish_flood = $lang_xp_publish_flood_en;
    }
}
// ------------------------------------------------------------------------- //
// Core plugins
// ------------------------------------------------------------------------- //
if (defined('CORE_PLUGIN')) {
    $lang_plugin_php_en = cpg_get_default_lang_var('lang_plugin_php', 'english');
    $lang_plugin_php = array_merge($lang_plugin_php_en, $lang_plugin);
}