예제 #1
0
<?php

if (!defined('INCLUDED_AMEMBER_CONFIG')) {
    die("Direct access to this location is not allowed");
}
$notebook_page = 'TripleDeal';
config_set_notebook_comment($notebook_page, 'TripleDeal plugin configuration');
if (file_exists($rm = dirname(__FILE__) . "/readme.txt")) {
    config_set_readme($notebook_page, $rm);
}
add_config_field('payment.tripledeal.merchant_name', 'Your TripleDeal Merchant Name', 'text', "your TripleDeal merchant name", $notebook_page, '');
add_config_field('payment.tripledeal.merchant_password', 'Your TripleDeal Merchant Password', 'password_c', "your TripleDeal merchant password", $notebook_page, '');
add_config_field('payment.tripledeal.profile', 'Your TripleDeal Profile', 'text', "your TripleDeal profile", $notebook_page, '', '', '', array('default' => 'OnlyCreditCards'));
add_config_field('payment.tripledeal.debugmode', 'Debug Mode Enabled', 'select', "Set to No after you complete testing.", $notebook_page, '', '', '', array('options' => array(0 => 'No', 1 => 'Yes')));
add_config_field('payment.tripledeal.title', 'Payment Method Title', 'text', "displayed on signup page and on renewal page", $notebook_page, '', '', '', array('default' => 'TripleDeal'));
add_config_field('payment.tripledeal.description', 'Payment Method Description', 'text', "displayed on signup page", $notebook_page, '', '', '', array('default' => 'Credit Card Payment'));
예제 #2
0
}
if ($config['use_shop']) {
    shop_config();
}
/********************************** LANGUAGES ***********************************/
$page = "Languages";
config_set_notebook_comment($page, 'configure multi-language user interface');
if ($_REQUEST['notebook'] == $page) {
    add_config_field('lang.list', 'Available Languages', 'multi_checkbox', 'choose which languages are available<br />
        for customers choice', $page, '', '', '', array('options' => languages_get_options(), 'store_type' => 1, size => '5em'));
    add_config_field('lang.default', 'Default Language', 'select', 'will be used by default until customer<br />
        makes another choice. Make sure it is also<br />
        selected in the list above', $page, '', '', '', array('options' => languages_get_options(), 'default' => 'en:English'));
    add_config_field('lang.display_choice', 'Display Language Choice', 'checkbox', 'allow customer to choose another language<br />
        from signup, login and other pages', $page, '', '', '', array());
    config_set_readme($page, $config['root_dir'] . '/language/readme.txt');
}
/*############################## FUNCTIONS #########################################*/
function validate_license($field, $vars)
{
    if (function_exists('is_trial') && is_trial()) {
        return;
    }
    global $config;
    $v = $vars[$field['name']];
    if (!strlen($v)) {
        $errors[] = "Please enter license code";
    }
    $domains = array();
    foreach (preg_split('|===== ENF OF LICENSE =====[\\r\\n\\s]*|m', $v, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $v) {
        $v .= "===== ENF OF LICENSE =====";