<?php
    /*
     * $Id: adminhelp.php 1517 2011-05-09 03:15:06Z dmorton $
     *
     * MAIA MAILGUARD LICENSE v.1.0
     *
     * Copyright 2004 by Robert LeBlanc <rjl@renaissoft.com>
     *                   David Morton   <mortonda@dgrmm.net>
     * All rights reserved.
     *
     * PREAMBLE
     *
     * This License is designed for users of Maia Mailguard
     * ("the Software") who wish to support the Maia Mailguard project by
     * leaving "Maia Mailguard" branding information in the HTML output
     * of the pages generated by the Software, and providing links back
     * to the Maia Mailguard home page.  Users who wish to remove this
     * branding information should contact the copyright owner to obtain
     * a Rebranding License.
     *
     * DEFINITION OF TERMS
     *
     * The "Software" refers to Maia Mailguard, including all of the
     * associated PHP, Perl, and SQL scripts, documentation files, graphic
     * icons and logo images.
     *
     * GRANT OF LICENSE
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * 1. Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * 2. Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * 3. The end-user documentation included with the redistribution, if
     *    any, must include the following acknowledgment:
     *
     *    "This product includes software developed by Robert LeBlanc
     *    <rjl@renaissoft.com>."
     *
     *    Alternately, this acknowledgment may appear in the software itself,
     *    if and wherever such third-party acknowledgments normally appear.
     *
     * 4. At least one of the following branding conventions must be used:
     *
     *    a. The Maia Mailguard logo appears in the page-top banner of
     *       all HTML output pages in an unmodified form, and links
     *       directly to the Maia Mailguard home page; or
     *
     *    b. The "Powered by Maia Mailguard" graphic appears in the HTML
     *       output of all gateway pages that lead to this software,
     *       linking directly to the Maia Mailguard home page; or
     *
     *    c. A separate Rebranding License is obtained from the copyright
     *       owner, exempting the Licensee from 4(a) and 4(b), subject to
     *       the additional conditions laid out in that license document.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
     * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
     * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
     * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
     * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
     * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
     * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     */

    require_once ("core.php");
    require_once ("maia_db.php");
    require_once ("authcheck.php");
    require_once ("display.php");
    $display_language = get_display_language($euid);
    require_once ("./locale/$display_language/db.php");
    require_once ("./locale/$display_language/display.php");
    require_once ("./locale/$display_language/admindex.php");
    require_once ("./locale/$display_language/adminviruses.php");
    require_once ("./locale/$display_language/adminusers.php");
    require_once ("./locale/$display_language/admindomains.php");
    require_once ("./locale/$display_language/domainsettings.php");
    require_once ("./locale/$display_language/adminlanguages.php");
    require_once ("./locale/$display_language/adminthemes.php");
    require_once ("./locale/$display_language/adminstats.php");
    require_once ("./locale/$display_language/adminsystem.php");
    require_once ("./locale/$display_language/adminhelp.php");

    require_once ("smarty.php");
    
    // Only administrators should be here.
    if (!is_an_administrator($uid)) {
       header("Location: index.php" . $sid);
       exit();
    }

    // Is this administrator the superadmin, or just a
    // domain admin?
    $super = is_superadmin($uid);

    $lang['adminhelp_find_users'] = sprintf($lang['adminhelp_find_users'], $lang['header_users_menu']);
    $lang['adminhelp_add_email_address'] = sprintf($lang['adminhelp_add_email_address'], $lang['header_add_email']);
    $lang['adminhelp_link_email_address'] = sprintf($lang['adminhelp_link_email_address'], $lang['header_link_email']);
    $lang['adminhelp_delete_email_address'] = sprintf($lang['adminhelp_delete_email_address'], $lang['header_delete_email'], $lang['header_delete_user']);
    $lang['adminhelp_delete_user'] = sprintf($lang['adminhelp_delete_user'], $lang['header_delete_user'], $lang['text_enable_user_autocreation']);
    $lang['adminhelp_impersonate'] = sprintf($lang['adminhelp_impersonate'], 
                                             sprintf($lang['text_user_found'], "1"),
                                                     '<a href="adminindex.php' . $sid . '">[' . $lang['menu_admin'] . ']</a>'
                                             );
    $lang['adminhelp_domain_administration'] = sprintf($lang['adminhelp_domain_administration'], $lang['header_domains_menu']);
    $lang['adminhelp_add_domain'] = sprintf($lang['adminhelp_add_domain'], $lang['header_add_domain']);
    $lang['adminhelp_domain_settings'] = sprintf($lang['adminhelp_domain_settings'], $lang['header_domain'], '<a href="help.php' . $sid . '">[' . $lang['menu_help'] . ']</a>');
    $lang['adminhelp_administrators'] = sprintf($lang['adminhelp_administrators'], $lang['header_admins']);
    $lang['adminhelp_add_administrator'] = sprintf($lang['adminhelp_add_administrator'], $lang['header_add_administrator']);
    $lang['adminhelp_domain_transport'] = sprintf($lang['adminhelp_domain_transport'], $lang['header_transport']);
    $lang['adminhelp_virus_aliases'] = sprintf($lang['adminhelp_virus_aliases'], $lang['header_virus_menu']);
    $lang['adminhelp_add_virus_alias'] = sprintf($lang['adminhelp_add_virus_alias'], $lang['header_add_alias']);
    $lang['adminhelp_languages'] = sprintf($lang['adminhelp_languages'], $lang['header_languages_menu']);
    $lang['adminhelp_install_languages'] = sprintf($lang['adminhelp_install_languages'], $lang['header_install_language']);
	$lang['adminhelp_themes'] = sprintf($lang['adminhelp_themes'], $lang['header_themes_menu']);
    $lang['adminhelp_install_themes'] = sprintf($lang['adminhelp_install_themes'], $lang['header_install_theme']);
    $lang['adminhelp_enable_user_autocreation'] = sprintf($lang['adminhelp_enable_user_autocreation'], $lang['text_enable_user_autocreation']);
    $lang['adminhelp_internal_auth'] = sprintf($lang['adminhelp_internal_auth'], $lang['text_internal_auth'], $lang['text_enable_user_autocreation']);
    $lang['adminhelp_enable_false_negative_management'] = sprintf($lang['adminhelp_enable_false_negative_management'], $lang['text_enable_false_negative_management'], $lang['text_ham_cache_expiry_period']);
    $lang['adminhelp_enable_stats_tracking'] = sprintf($lang['adminhelp_enable_stats_tracking'], $lang['text_enable_stats_tracking']);
    $lang['adminhelp_enable_virus_scanning'] = sprintf($lang['adminhelp_enable_virus_scanning'], $lang['text_enable_virus_scanning']);
    $lang['adminhelp_user_virus_scanning'] = sprintf($lang['adminhelp_user_virus_scanning'], $lang['text_user_virus_scanning']);
    $lang['adminhelp_enable_spam_filtering'] = sprintf($lang['adminhelp_enable_spam_filtering'], $lang['text_enable_spam_filtering']);
    $lang['adminhelp_user_spam_filtering'] = sprintf($lang['adminhelp_user_spam_filtering'], $lang['text_user_spam_filtering']);   
    $lang['adminhelp_enable_banned_files_checking'] = sprintf($lang['adminhelp_enable_banned_files_checking'], $lang['text_enable_banned_files_checking']);
    $lang['adminhelp_user_banned_files_checking'] = sprintf($lang['adminhelp_user_banned_files_checking'], $lang['text_user_banned_files_checking']);    
    $lang['adminhelp_enable_bad_header_checking'] = sprintf($lang['adminhelp_enable_bad_header_checking'], $lang['text_enable_bad_header_checking']);
    $lang['adminhelp_user_bad_header_checking'] = sprintf($lang['adminhelp_user_bad_header_checking'], $lang['text_user_bad_header_checking']);
    $lang['adminhelp_enable_spamtraps'] = sprintf($lang['adminhelp_enable_spamtraps'], $lang['text_enable_spamtraps']);
    $lang['adminhelp_enable_address_linking'] = sprintf($lang['adminhelp_enable_address_linking'], $lang['text_enable_address_linking']);
    $lang['adminhelp_enable_username_changes'] = sprintf($lang['adminhelp_enable_username_changes'], $lang['text_enable_username_changes']); 
    $lang['adminhelp_enable_privacy_invasion'] = sprintf($lang['adminhelp_enable_privacy_invasion'], $lang['text_enable_privacy_invasion']);
    $lang['adminhelp_system_default_user_is_local'] =sprintf($lang['adminhelp_system_default_user_is_local'], $lang['text_system_default_user_is_local']);
    $lang['adminhelp_size_limit'] = sprintf($lang['adminhelp_size_limit'], $lang['text_size_limit']);
    $lang['adminhelp_oversize_policy'] = sprintf($lang['adminhelp_oversize_policy'], $lang['text_oversize_policy'], $lang['text_accept'], $lang['text_reject']);
    $lang['adminhelp_admin_email'] = sprintf($lang['adminhelp_admin_email'], $lang['text_admin_email']);
    $lang['adminhelp_smtp_server'] = sprintf($lang['adminhelp_smtp_server'], $lang['text_smtp_server']);
    $lang['adminhelp_smtp_port'] = sprintf($lang['adminhelp_smtp_port'], $lang['text_smtp_port']);
    $lang['adminhelp_key_file'] = sprintf($lang['adminhelp_key_file'], $lang['text_key_file']); 
    $lang['adminhelp_newuser_template_file'] = sprintf($lang['adminhelp_newuser_template_file'], $lang['text_newuser_template_file']);
    $lang['adminhelp_expiry_period'] = sprintf($lang['adminhelp_expiry_period'], $lang['text_expiry_period']);
    $lang['adminhelp_ham_cache_expiry_period'] = sprintf($lang['adminhelp_ham_cache_expiry_period'], $lang['text_ham_cache_expiry_period']);
    $lang['adminhelp_reminder_threshold_count'] = sprintf($lang['adminhelp_reminder_threshold_count'], $lang['text_reminder_threshold_count']);
    $lang['adminhelp_reminder_threshold_size'] = sprintf($lang['adminhelp_reminder_threshold_size'], $lang['text_reminder_threshold_size']);
    $lang['adminhelp_reminder_template_file'] = sprintf($lang['adminhelp_reminder_template_file'], $lang['text_reminder_template_file']);
    $lang['adminhelp_reminder_login_url'] = sprintf($lang['adminhelp_reminder_login_url'], $lang['text_reminder_login_url']);
    $lang['adminhelp_banner_title'] = sprintf($lang['adminhelp_banner_title'], $lang['text_banner_title']);
    $lang['adminhelp_use_icons'] = sprintf($lang['adminhelp_use_icons'], $lang['text_use_icons']);
    $lang['adminhelp_use_logo'] = sprintf($lang['adminhelp_use_logo'], $lang['text_use_logo']);
    $lang['adminhelp_logo_file'] = sprintf($lang['adminhelp_logo_file'], $lang['text_logo_file']);
    $lang['adminhelp_logo_alt_text'] = sprintf($lang['adminhelp_logo_alt_text'], $lang['text_logo_alt_text']);
    $lang['adminhelp_logo_url'] = sprintf($lang['adminhelp_logo_url'], $lang['text_logo_url']);
    $lang['adminhelp_virus_info_url'] = sprintf($lang['adminhelp_virus_info_url'], $lang['text_virus_info_url']);
    $lang['adminhelp_virus_lookup'] = sprintf($lang['adminhelp_virus_lookup'], $lang['text_virus_lookup'], $lang['text_virus_info_url']);
    $lang['adminhelp_currency_label'] = sprintf($lang['adminhelp_currency_label'], $lang['text_currency_label']);
    $lang['adminhelp_bandwidth_cost'] = sprintf($lang['adminhelp_bandwidth_cost'], $lang['text_bandwidth_cost']);
    $lang['adminhelp_enable_stats_reporting'] = sprintf($lang['adminhelp_enable_stats_reporting'], $lang['text_enable_stats_reporting']);
    $lang['adminhelp_primary_report_server'] = sprintf($lang['adminhelp_primary_report_server'], $lang['text_primary_report_server']);
    $lang['adminhelp_primary_report_port'] = sprintf($lang['adminhelp_primary_report_port'], $lang['text_primary_report_port']);
    $lang['adminhelp_secondary_report_server'] = sprintf($lang['adminhelp_secondary_report_server'], $lang['text_secondary_report_server']);
    $lang['adminhelp_secondary_report_port'] = sprintf($lang['adminhelp_secondary_report_port'], $lang['text_secondary_report_port']);
    $lang['adminhelp_reporter_sitename'] = sprintf($lang['adminhelp_reporter_sitename'], $lang['text_reporter_sitename']);
    $lang['adminhelp_reporter_username'] = sprintf($lang['adminhelp_reporter_username'], $lang['text_reporter_username'], '<a href="http://www.renaissoft.com/maia/reporter_registration.php">' . $lang['adminhelp_reporter_registration'] . '</a>');
    $lang['adminhelp_reporter_password'] = sprintf($lang['adminhelp_reporter_password'], $lang['text_reporter_password']);
    $lang['adminhelp_enable_charts'] = sprintf($lang['adminhelp_enable_charts'], $lang['text_enable_charts'], $lang['text_enable_stats_tracking'], $lang['text_chart_autogeneration_interval']);
    $lang['adminhelp_chart_ham_colour'] = sprintf($lang['adminhelp_chart_ham_colour'], $lang['text_chart_ham_colour']);
    $lang['adminhelp_chart_spam_colour'] = sprintf($lang['adminhelp_chart_spam_colour'], $lang['text_chart_spam_colour']);
    $lang['adminhelp_chart_virus_colour'] = sprintf($lang['adminhelp_chart_virus_colour'], $lang['text_chart_virus_colour']);
    $lang['adminhelp_chart_fp_colour'] = sprintf($lang['adminhelp_chart_fp_colour'], $lang['text_chart_fp_colour']);
    $lang['adminhelp_chart_fn_colour'] = sprintf($lang['adminhelp_chart_fn_colour'], $lang['text_chart_fn_colour']);
    $lang['adminhelp_chart_suspected_ham_colour'] = sprintf($lang['adminhelp_chart_suspected_ham_colour'], $lang['text_chart_suspected_ham_colour']);
    $lang['adminhelp_chart_suspected_spam_colour'] = sprintf($lang['adminhelp_chart_suspected_spam_colour'], $lang['text_chart_suspected_spam_colour']);
    $lang['adminhelp_chart_wl_colour'] = sprintf($lang['adminhelp_chart_wl_colour'], $lang['text_chart_wl_colour']);
    $lang['adminhelp_chart_bl_colour'] = sprintf($lang['adminhelp_chart_bl_colour'], $lang['text_chart_bl_colour']);
    $lang['adminhelp_chart_background_colour'] = sprintf($lang['adminhelp_chart_background_colour'], $lang['text_chart_background_colour']);
    $lang['adminhelp_chart_font_colour'] = sprintf($lang['adminhelp_chart_font_colour'], $lang['text_chart_font_colour']);
    $lang['adminhelp_chart_autogeneration_interval'] = sprintf($lang['adminhelp_chart_autogeneration_interval'], $lang['text_chart_autogeneration_interval']);
    $lang['adminhelp_reset_stats'] = sprintf($lang['adminhelp_reset_stats'], $lang['header_reset_stats']);

    $smarty->assign('lang', $lang);
    
    $smarty->display('adminhelp.tpl');
    
?>
