Пример #1
0
/**
* Load Plugins
* Include all plugins of type to setup all hooks
*
* @param string $type Plugin Type = db|payment|protect
*
* @global array Plugins List
* @global mixed Script Config
*/
function load_plugins($type)
{
    global $plugins;
    global $config;
    foreach ((array) $plugins[$type] as $name) {
        if (!strlen($name)) {
            continue;
        }
        $file = $config['plugins_dir'][$type] . "/{$name}/{$name}.inc.php";
        if (!file_exists($file)) {
            trigger_error("Plugin file ({$file}) for plugin ({$type}/{$name}) does not exists", E_USER_WARNING);
            continue;
        }
        if ($type == 'protect') {
            if (is_lite()) {
                if (!in_array($name, array('htpasswd', 'php_include'))) {
                    fatal_error("Sorry, but this plugin ({$type}/{$name}) cannot be used with aMember Lite");
                }
            }
        }
        if ($type == 'payment') {
            if (is_lite()) {
                if (!in_array($name, array('twocheckout', 'twocheckout_r', 'paypal', 'paypal_r', 'free'))) {
                    fatal_error("Sorry, but this plugin ({$type}/{$name}) cannot be used with aMember Lite");
                }
            }
        }
        $open = (include $file);
        //@LPCHK@
    }
}
function protection_check_auto_prepend_file()
{
    global $config;
    $ret = get_url($url = "{$config['root_url']}/plugins/protect/new_rewrite/tests/auto_prepend_file/1.htm", '', 0, 1);
    if (!strlen($ret)) {
        return "#Unable to fetch result of test from {$url}.";
    } elseif ($ret != '2-second_file1-first_file') {
        return "php_value auto_prepend_file directive doesn't work in .htaccess files on this server";
    }
    if (is_lite()) {
        return "This method of protection is not available in aMember Lite";
    }
}
Пример #3
0
if (!is_lite()) {
    add_config_field('hide_password_cp', 'Hide customer passwords in aMember CP', 'checkbox', "", "Advanced", '', '', '', array());
}
add_config_field('terms_is_price', 'Display only Product Price in terms', 'checkbox', "on signup.php and member.php display only price instead<br />\n    of full subscriptino terms description. this simulates behaviour of<br />\n    aMember version up to 3.1.2", "Advanced", '', '', '', array());
add_config_field('payment_report_num_days', 'Number of days for payment report on admin index page', 'text', "", "Advanced", '', '', '', array('default' => 7));
add_config_field('##6', 'XML-RPC Integration Interface', 'header', '', 'Advanced');
if (!is_lite()) {
    add_config_field('use_xmlrpc', 'Enable XML-RPC Library', 'checkbox', "", "Advanced", '', '', '', array());
}
if (!is_lite()) {
    add_config_field('xmlrpc_login', 'Login for XML-RPC server', 'text', "Login for access to XML-RPC interface", "Advanced", '', '', '', array('default' => ''));
}
if (!is_lite()) {
    add_config_field('xmlrpc_password', 'Password for XML-RPC server', 'password_c', "Password for access XML-RPC inteface", "Advanced", '', '', '');
}
if (!is_lite()) {
    add_config_field('google_analytics', 'Google Analytics Account ID', 'text', "To enable automatic sales and hits tracking with GA,\n    <br />\n    enter Google Analytics cAccount ID into this field. \n    <a href='http://www.google.com/support/googleanalytics/bin/answer.py?answer=55603' target=_blank>Where can I find my tracking ID?</a>\n    <br />\n    The tracking ID will look like <i>UA-1231231-1</i>.<br />\n    Please note - this tracking is only for pages displayed by aMember,<br />\n    pages that are just protected by aMember, cannot be tracked. Use<br />\n    <a href=http://www.google.com/support/googleanalytics/bin/search.py?query=how+to+add+tracking&ctx=en%3Asearchbox'' target=_blank>GA instructions</a>\n    how to add tracking code to your own pages.\n    ", "Advanced", '', '', '');
}
//array('store_type' => 3)
//
/********* END OF ADVANCED **********************************************************/
/********************************** BAN *********************************************/
add_config_field('ban.email', 'Denied Email address list', 'textarea', 'put one email per line<br />
    use * for substitution, like <i>*@aol.com</i>', 'Ban', '', '', '', array('cols' => 30, 'rows' => 10, 'store_type' => 2));
add_config_field('ban.email_action', 'Denied Email Action', 'select', 'what to do if user enter denied email', 'Ban', '', '', '', array('options' => array('error' => 'Display error message', 'die' => 'Die and show ugly internal error page')));
add_config_field('ban.ip', 'Denied IP address list', 'textarea', 'put one IP per line<br />
    use * for substitution, like <i>193.122.123.*</i>', 'Ban', '', '', '', array('cols' => 30, 'rows' => 10, 'store_type' => 2));
add_config_field('ban.ip_action', 'Denied IP Action', 'select', 'what to do if user comes from denied IP<br />
    to signup or renewal page', 'Ban', '', '', '', array('options' => array('error' => 'Display error message', 'die' => 'Die and show ugly internal error page')));
add_config_field('ban.login', 'Denied usernames list', 'textarea', 'put one denined username per line<br />
    use * for substitution, like <i>admin*</i>', 'Ban', '', '', '', array('cols' => 30, 'rows' => 10, 'store_type' => 2));
Пример #4
0
/**
 * return AdminMenu object reference
 */
function &initMainMenu()
{
    static $menu_list = array();
    if ($menu_list[0]) {
        return $menu_list[0];
    }
    global $config;
    $m =& new AdminMenu();
    $s =& $m->addSection('users', 'Browse Users', 'users.php?letter=A', -1000);
    $s->addItem('Search Users', 'users.php?action=search_form');
    $s->addItem('Add User', 'users.php?action=add_form');
    if ($config['manually_approve']) {
        $s->addItem('Not-Approved Users', 'users.php?action=not_approved');
    }
    if (!is_lite()) {
        $s->addItem('Email Users', 'email.php');
        $s->addHTML('<li class="menu_item"><a href="import.php">Import</a>&nbsp;/&nbsp;<a href="export.php">Export</a> </li>' . "\n");
        $s->addHTML('<li class="menu_item"><a href="backup.php">Backup</a>&nbsp;/&nbsp;<a href="restore.php">Restore</a> </li>' . "\n");
    }
    $s->addItem('Rebuild DB', 'rebuild.php');
    $s =& $m->addSection('reports', 'Reports', null, -100);
    $s->addItem('Payments', 'payments.php');
    if (function_exists('cc_core_rebill')) {
        $s->addItem('Rebills', 'rebill_log.php');
    }
    if (!is_lite()) {
        $s->addItem('Reports', 'report.php');
    }
    $s =& $m->addSection('products', 'Manage Products', 'products.php', 100);
    $s->addItem('Protect Folders', 'protect.php');
    if (!is_lite()) {
        $s->addItem('Coupons', 'coupons.php');
    }
    $s =& $m->addSection('utils', 'Utilities', null, 1000);
    $s->addItem('Error/Debug Log', 'error_log.php');
    $s->addItem('Access Log', 'access_log.php');
    if ($config['use_affiliates']) {
        $s->addItem('Affiliate Program', 'aff_commission.php?do=aff_menu');
    }
    $s->addItem('Delete Old Records', 'clear.php');
    $s->addItem('<b>Setup/Configuration</b>', 'setup.php');
    $s->addHTML('<li class="menu_item"><a href="admins.php">Admin Accounts</a>&nbsp;/&nbsp;<a href="admin_log.php">Logs</a> </li>' . "\n");
    if (!is_lite()) {
        $s->addItem('Add Fields', 'fields.php');
    }
    $s->addItem('Version Info', 'info.php');
    $s->addItem('<b>Logout</b>', 'logout.php');
    plugin_init_admin_menu($m);
    return $menu_list[0] =& $m;
}
<body bgcolor=#f0f0e0 leftmargin=0 marginwidth=0 topmargin=3>
<div style='text-align: center; font-weight: bold; font-size: 11pt;'><a href="<?php 
echo $this->_tpl_vars['config']['root_url'];
?>
/admin/index.php?page=blank">aMember CP</div>
<hr width="98%" />
<?php 
echo $this->_tpl_vars['menu_html'];
?>


<center><form method=get target=right action="q.php" style="clear: none;">
    <input type=text name=q id="q" size=10 class=small title="Enter part of username, email or name">
    <input type=submit value="Lookup" class=small>
</form></center>

<ul style='margin-left: 0.6em; padding: 0;'>    
<li type=square><a target=_blank href="http://manual.amember.com/">aMember Pro Manual</a>
<li type=square><a target=_blank href="http://www.amember.com/site_add.php">List your site for free</a>
<li type=square><a target=_blank href="http://www.amember.com/forum/forumdisplay.php?f=18">Write a testimonial</a>
<?php 
if (is_lite()) {
    ?>
<li type=square><a target=_blank href="http://www.cgi-central.net/scripts/amember/lite_upgrade.php"><font color=red><b>Upgrade to aMember Pro</b></font></a>
<?php 
}
?>
</ul>
</body>
</html>