[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.144.98.43: ~ $
<?php

// initialisation stuff
/* init sets all the defaults
 * it is called after config, so that constants not defined in config can be set here
 * it cannot use the DB contents, as the DB connection hasn't been established yet
 */
define('PHPLISTINIT', true);
error_reporting(0);

define("VERSION","3.6.14");
if (!defined('DEVVERSION')) {
    define('DEVVERSION', false);
}

if (session_status() !== PHP_SESSION_ACTIVE) {
    ini_set('session.name','phpListSession');
    ini_set('session.cookie_samesite','Strict');
    ini_set('session.use_only_cookies',1);
    ini_set('session.cookie_httponly',1);
}

// record the start time(usec) of script
$now = gettimeofday();
$GLOBALS['pagestats'] = array();
$GLOBALS['pagestats']['time_start'] = $now['sec'] * 1000000 + $now['usec'];
$GLOBALS['pagestats']['number_of_queries'] = 0;

// taken from Joomla, prepare for PHP5.6 and up
// see https://github.com/phpList/phplist3/pull/3
if (function_exists('iconv') || ((!strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && dl('iconv.so')))) {
    if (version_compare(PHP_VERSION, '5.6', '>=')) {
        @ini_set('default_charset', 'UTF-8');
    } elseif (function_exists('iconv_set_encoding')) {
        iconv_set_encoding('input_encoding', 'UTF-8');
        iconv_set_encoding('internal_encoding', 'UTF-8');
        iconv_set_encoding('output_encoding', 'UTF-8');
    }
}

## ironically, this doesn't work with Xdebug enabled.
## avoid the screen being blank, due to the FOUC system
ini_set("error_append_string",'<script>document.body.classList.remove("invisible");</script>'); ## remove the FOUC
ini_set("error_prepend_string",'<div style="{font-size: 24px;color:red;}">Sorry a software error occurred:</div><br/>
  Please <a href="https://github.com/phpList/phplist3/issues">report a bug</a> when reporting the bug, please include URL and the entire content of this page.<br/>');

if (function_exists('mb_internal_encoding')) {
    mb_internal_encoding('UTF-8');
}

$IsCommandlinePlugin = '';
$zlib_compression = ini_get('zlib.output_compression');
// hmm older versions of PHP don't have this, but then again, upgrade php instead?
if (function_exists('ob_list_handlers')) {
    $handlers = ob_list_handlers();
} else {
    $handlers = array();
}
$gzhandler = 0;
foreach ($handlers as $handler) {
    $gzhandler = $gzhandler || $handler == 'ob_gzhandler';
}
// @@@ needs more work
$GLOBALS['compression_used'] = $zlib_compression || $gzhandler;


//# this is mostly useful when using commandline, and the language is not detected
//# with the browser
if (!isset($GLOBALS['default_system_language'])) {
    $GLOBALS['default_system_language'] = 'en';
}

if (!isset($table_prefix)) {
    $table_prefix = 'phplist_';
}
if (!isset($usertable_prefix)) {
    $usertable_prefix = 'phplist_user_';
}

/* this can probably go */
if (isset($GLOBALS['design'])) {
    $GLOBALS['ui'] = $GLOBALS['design'];
//@todo
//  $GLOBALS['design'] = basename($GLOBALS['design']);
}

$website = $domain = '';

if (!isset($GLOBALS['ui']) || !is_dir(dirname(__FILE__).'/ui/'.$GLOBALS['ui'])) {
    if (is_dir(dirname(__FILE__).'/ui/phplist-ui-bootlist')) {
        $GLOBALS['ui'] = 'phplist-ui-bootlist';
    } elseif (is_dir(dirname(__FILE__).'/ui/dressprow')) {
        $GLOBALS['ui'] = 'dressprow';
    } elseif (is_dir(dirname(__FILE__).'/ui/default')) {
        $GLOBALS['ui'] = 'default';
    } else {
        ## pick the first available (this should really only be in dev mode)
        $themes = glob(dirname(__FILE__).'/ui/*',GLOB_ONLYDIR);
        $GLOBALS['ui'] = basename($themes[0]);
    }
}
if (!is_file(dirname(__FILE__).'/ui/'.$GLOBALS['ui'].'/pagetop.php')) {
    print 'Error: unable to initialise theme'; exit;
}

include_once dirname(__FILE__).'/structure.php';

if (!isset($tables)) {
    $tables = array();
}
foreach ($GLOBALS['DBstructuser'] as $tablename => $tablecolumns) {
    $tables[$tablename] = $usertable_prefix.$tablename;
}
foreach ($GLOBALS['DBstructphplist'] as $tablename => $tablecolumns) {
    $tables[$tablename] = $table_prefix.$tablename;
}
// unset the struct arrays, DBStruct and tables globals remain for the rest of the program
unset($GLOBALS['DBstructuser']);
unset($GLOBALS['DBstructphplist']);

$GLOBALS['show_dev_errors'] = $show_dev_errors;

if (empty($GLOBALS['language_module'])) {
    $GLOBALS['language_module'] = 'english.inc';
    if (isset($language_module)) {
      $GLOBALS['language_module'] = $language_module;
    }
}
if (empty($GLOBALS['database_module']) || !is_file(dirname(__FILE__).'/'.$GLOBALS['database_module'])) {
    $GLOBALS['database_module'] = 'mysqli.inc';
    if (isset($database_module)) {
        $GLOBALS['database_module'] = $database_module;
    }
}
if (!isset($database_port)) {
    $database_port = null;
}
if (!isset($database_socket)) {
    $database_socket = null;
}
if (!isset($database_connection_compression)) {
    $database_connection_compression = false;
}
if (!isset($database_connection_ssl)) {
    $database_connection_ssl = false;
}
if (!isset($mysql_database_engine)) {
  $mysql_database_engine = '';
}

//# @@ would be nice to move this to the config file at some point
// http://mantis.phplist.com/view.php?id=15521
//# set it on the fly, although that will probably only work with Apache
//# we need to save this in the DB, so that it'll work on commandline
$GLOBALS['scheme'] = (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) ? 'https' : 'http';
if (defined('ADMIN_PROTOCOL')) {
    $GLOBALS['admin_scheme'] = ADMIN_PROTOCOL;
} else {
    $GLOBALS['admin_scheme'] = $GLOBALS['scheme'];
}
if (defined('PUBLIC_PROTOCOL')) {
    $GLOBALS['public_scheme'] = PUBLIC_PROTOCOL;
} else {
    $GLOBALS['public_scheme'] = $GLOBALS['scheme'];
}
if (!defined('HTTP_HOST')) { // allow overriding of _SERVER['HTTP_HOST']
    define('HTTP_HOST', false); // but default to not, and take that value
}

if (!isset($bounce_protocol)) {
    $bounce_protocol = 'pop';
}
if (!isset($bounce_unsubscribe_threshold)) {
    $bounce_unsubscribe_threshold = 3;
}
//# spelling mistake in earlier version, make sure to set it correctly
if (!isset($bounce_unsubscribe_threshold) && isset($bounce_unsubscribe_treshold)) {
    $bounce_unsubscribe_threshold = $bounce_unsubscribe_treshold;
}
if (!isset($bounce_mailbox_purge)) {
    $bounce_mailbox_purge = true;
}
if (!isset($bounce_mailbox_purge_unprocessed)) {
    $bounce_mailbox_purge_unprocessed = true;
}
if (!isset($bounce_mailbox_maximum)) {
    $bounce_mailbox_maximum = 100000;
}
if (!isset($bounce_rules_batch_size)) {
    $bounce_rules_batch_size = 500;
}
if (!isset($bounce_mailbox_name)) {
    $bounce_mailbox_name = 'INBOX';
}

// set some defaults if they are not specified
if (!defined('REGISTER')) {
    define('REGISTER', 1);
}
if (!defined('VERBOSE')) {
    define('VERBOSE', 0);
}
if (!defined('TEST')) {
    define('TEST', 1);
}
if (!defined('DEVSITE')) {
    define('DEVSITE', 0);
}
define('TRANSLATIONS_XML', 'https://translate.phplist.org/translations.xml');

//define('TLD_AUTH_LIST','http://data.iana.org/TLD/tlds-alpha-by-domain.txt');
//define('TLD_AUTH_MD5','http://data.iana.org/TLD/tlds-alpha-by-domain.txt.md5');
define('TLD_AUTH_LIST', 'https://www.phplist.com/files/tlds-alpha-by-domain.txt');
define('TLD_AUTH_MD5', 'https://www.phplist.com/files/tlds-alpha-by-domain.txt.md5');
define('TLD_REFETCH_TIMEOUT', 2592000); //# 30 days
if (!defined('PQAPI_URL')) {
    define('PQAPI_URL', 'https://pqapi.phplist.com/1/t/pqapi');
}
if (!defined('SHOW_PQCHOICE')) {
    define('SHOW_PQCHOICE', false);
}
if (!defined('PHPLISTNEWSROOT')) {
    define('PHPLISTNEWSROOT', 'https://www.phplist.com/downloadnews/');
}

if (!defined('ALLOW_ATTACHMENTS')) {
    define('ALLOW_ATTACHMENTS', 0);
}
if (!defined('EMAILTEXTCREDITS')) {
    define('EMAILTEXTCREDITS', 0);
}
if (!defined('PAGETEXTCREDITS')) {
    define('PAGETEXTCREDITS', 0);
}
if (!defined('ASKFORPASSWORD')) {
    define('ASKFORPASSWORD', 0);
}
if (!defined('SILENT_RESUBSCRIBE')) {
    define('SILENT_RESUBSCRIBE', true);
}
if (!defined('UNSUBSCRIBE_REQUIRES_PASSWORD')) {
    define('UNSUBSCRIBE_REQUIRES_PASSWORD', 0);
}
if (!defined('UNSUBSCRIBE_JUMPOFF')) {
    define('UNSUBSCRIBE_JUMPOFF', 1);
}
if (!defined('SHOW_PREFERENCESLINK')) {
    define('SHOW_PREFERENCESLINK', true);
}
if (!defined('SHOW_UNSUBSCRIBELINK')) {
    define('SHOW_UNSUBSCRIBELINK', true);
}
if (!defined('SHOW_SUBSCRIBELINK')) {
    define('SHOW_SUBSCRIBELINK', true);
}
if (!defined('UNSUBSCRIBE_CONFIRMATION')) {
    define('UNSUBSCRIBE_CONFIRMATION', true);
}
if (ASKFORPASSWORD && defined('ENCRYPTPASSWORD') && ENCRYPTPASSWORD) {
    //#https://mantis.phplist.com/view.php?id=16787
    // passwords are encrypted, so we need to stick to md5 to keep working

    //# we also need some "update" mechanism to handle an algo change
    if (!defined('ENCRYPTION_ALGO')) {
        define('ENCRYPTION_ALGO', 'md5');
    }
}

if (ASKFORPASSWORD && !defined('ENCRYPTPASSWORD')) {
    //# we now always encrypt
    define('ENCRYPTPASSWORD', 1);
}
if (!defined('ENCRYPTPASSWORD')) {
    //# old method to encrypt, used to be with md5, keep like this for backward compat.
    if (!defined('ENCRYPTION_ALGO')) {
        define('ENCRYPTION_ALGO', 'md5');
    }
//  define("ENCRYPTPASSWORD",0);
}

if (!defined('ENCRYPTION_ALGO')) {
    if (function_exists('hash_algos') && in_array('sha256', hash_algos())) {
        define('ENCRYPTION_ALGO', 'sha256');
    } else {
        define('ENCRYPTION_ALGO', 'md5');
    }
}
if (!defined('HASH_ALGO')) {
    // keep previous hashalg. @@TODO force an update of hash method, many may still be on md5.
    if (defined('ENCRYPTION_ALGO')) {
        define('HASH_ALGO', ENCRYPTION_ALGO);
    } elseif (function_exists('hash_algos') && in_array('sha256', hash_algos())) {
        define('HASH_ALGO', 'sha256');
    } else {
        define('HASH_ALGO', 'md5');
    }
}
//# remember the length of a hashed string
$hash_length = strlen(hash(HASH_ALGO, 'some text'));

if (!defined('WARN_ABOUT_PHP_SETTINGS')) {
    define('WARN_ABOUT_PHP_SETTINGS', 1);
}
if (!defined('NUMATTACHMENTS')) {
    define('NUMATTACHMENTS', 1);
}
if (!defined('PLUGIN_ROOTDIR')) {
    define('PLUGIN_ROOTDIR', 'plugins');
} //#17270 - this will point to the plugins subdir of admin
if (!defined('PLUGIN_ROOTDIRS')) {
    define('PLUGIN_ROOTDIRS', '');
}
if (!defined('PHPMAILERHOST')) {
    define('PHPMAILERHOST', '');
}
if (!defined('PHPMAILERSUBSCRIBEHOST') && defined('PHPMAILERHOST')) {
    define('PHPMAILERSUBSCRIBEHOST', PHPMAILERHOST);
}
if (!defined('PHPMAILERBLASTHOST') && defined('PHPMAILERHOST')) {
    define('PHPMAILERBLASTHOST', PHPMAILERHOST);
}
if (!defined('PHPMAILERBLASTPORT') && defined('PHPMAILERPORT')) {
    define('PHPMAILERBLASTPORT', PHPMAILERPORT);
}
if (!defined('PHPMAILERSUBSCRIBEPORT') && defined('PHPMAILERPORT')) {
    define('PHPMAILERSUBSCRIBEPORT', PHPMAILERPORT);
}
if (!defined('PHPMAILERTESTHOST') && defined('PHPMAILERHOST')) {
    define('PHPMAILERTESTHOST', PHPMAILERHOST);
}
if (!defined('PHPMAILER_SECURE')) {
    define('PHPMAILER_SECURE', 'auto');
}
if (!defined('PHPMAILER_SMTP_DEBUG')) {
    define('PHPMAILER_SMTP_DEBUG', 0);
}
if (!defined('MANUALLY_PROCESS_QUEUE')) {
    define('MANUALLY_PROCESS_QUEUE', 1);
}
if (!defined('PROCESSCAMPAIGNS_PARALLEL')) {
    define('PROCESSCAMPAIGNS_PARALLEL', false);
}
if (!defined('CHECK_SESSIONIP')) {
    define('CHECK_SESSIONIP', 1);
}
if (!defined('FILESYSTEM_ATTACHMENTS')) {
    define('FILESYSTEM_ATTACHMENTS', 0);
}
if (!defined('MIMETYPES_FILE')) {
    define('MIMETYPES_FILE', '/etc/mime.types');
}
if (!defined('DEFAULT_MIMETYPE')) {
    define('DEFAULT_MIMETYPE', 'application/octet-stream');
}
if (!defined('USE_REPETITION')) {
    define('USE_REPETITION', 0);
}
if (!defined('FCKIMAGES_DIR')) {
    define('FCKIMAGES_DIR', 'uploadimages');
}
if (!defined('UPLOADIMAGES_DIR')) {
    define('UPLOADIMAGES_DIR', 'images');
}
if (!defined('USE_MANUAL_TEXT_PART')) {
    define('USE_MANUAL_TEXT_PART', 0);
}
if (!defined('USE_MESSAGE_PREVIEW')) {
    define('USE_MESSAGE_PREVIEW',false);
}
if (!defined('ALLOW_NON_LIST_SUBSCRIBE')) {
    define('ALLOW_NON_LIST_SUBSCRIBE', 0);
}
if (!defined('MAILQUEUE_BATCH_SIZE')) {
    define('MAILQUEUE_BATCH_SIZE', 1000);
}
if (!defined('MAILQUEUE_BATCH_PERIOD')) {
    define('MAILQUEUE_BATCH_PERIOD', 30);
}
if (!defined('MAILQUEUE_THROTTLE')) {
    define('MAILQUEUE_THROTTLE', 0);
}
if (!defined('MAILQUEUE_AUTOTHROTTLE')) {
    define('MAILQUEUE_AUTOTHROTTLE', 0);
}
if (!defined('NAME')) {
    define('NAME', 'phpList');
}
if (!defined('EXPORT_EXCEL')) {
    define('EXPORT_EXCEL', 0);
}
if (!defined('USE_PREPARE')) {
    define('USE_PREPARE', 0);
}
if (!defined('HTMLEMAIL_ENCODING')) {
    define('HTMLEMAIL_ENCODING', 'quoted-printable');
}
if (!defined('TEXTEMAIL_ENCODING')) {
    define('TEXTEMAIL_ENCODING', '7bit');
}
if (!defined('USE_LIST_EXCLUDE')) {
    define('USE_LIST_EXCLUDE', 0);
}
if (!defined('ATTRIBUTEVALUE_REORDER_LIMIT')) {
    define('ATTRIBUTEVALUE_REORDER_LIMIT', 100);
}
if (!defined('REMOTE_URL_REFETCH_TIMEOUT')) {
    define('REMOTE_URL_REFETCH_TIMEOUT', 3600);
}
if (!defined('CLICKTRACK')) {
    define('CLICKTRACK', 1);
}
if (!defined('CLICKTRACK_SHOWDETAIL')) {
    define('CLICKTRACK_SHOWDETAIL', 0);
}
if (!defined('STATS_INTERVAL')) {
    define('STATS_INTERVAL', 'weekly');
}
if (!defined('USE_DOMAIN_THROTTLE')) {
    define('USE_DOMAIN_THROTTLE', 0);
}
if (!defined('DOMAIN_BATCH_SIZE')) {
    define('DOMAIN_BATCH_SIZE', 1);
}
if (!defined('DOMAIN_BATCH_PERIOD')) {
    define('DOMAIN_BATCH_PERIOD', 120);
}
if (!defined('DOMAIN_AUTO_THROTTLE')) {
    define('DOMAIN_AUTO_THROTTLE', 0);
}
if (!defined('LANGUAGE_SWITCH')) {
    define('LANGUAGE_SWITCH', 1);
}
if (!defined('THEME_SWITCH')) {
    define('THEME_SWITCH', true);
}
//if (!defined('USE_ADVANCED_BOUNCEHANDLING')) define('USE_ADVANCED_BOUNCEHANDLING',1);
if (!defined('DATE_START_YEAR')) {
    define('DATE_START_YEAR', 1900);
}
if (!defined('DATE_END_YEAR')) {
    define('DATE_END_YEAR', 0);
}
if (!defined('ALLOW_IMPORT')) {
    define('ALLOW_IMPORT', 1);
}
if (!defined('EMPTY_VALUE_PREFIX')) {
    define('EMPTY_VALUE_PREFIX', '--');
}
if (!defined('USE_ADMIN_DETAILS_FOR_MESSAGES')) {
    define('USE_ADMIN_DETAILS_FOR_MESSAGES', 1);
}
if (!defined('SEND_ONE_TESTMAIL')) {
    define('SEND_ONE_TESTMAIL', 1);
}
if (!defined('USE_SPAM_BLOCK')) {
    define('USE_SPAM_BLOCK', 1);
}
if (!defined('NOTIFY_SPAM')) {
    define('NOTIFY_SPAM', 1);
}
if (!defined('CLICKTRACK_LINKMAP')) {
    define('CLICKTRACK_LINKMAP', 0);
}
if (!defined('SIGN_WITH_HMAC')) {
    define('SIGN_WITH_HMAC', false);
}
if (!defined('ALWAYS_ADD_USERTRACK')) {
    define('ALWAYS_ADD_USERTRACK', 1);
}
if (!defined('MERGE_DUPLICATES_DELETE_DUPLICATE')) {
    define('MERGE_DUPLICATES_DELETE_DUPLICATE', 1);
}
if (!defined('USE_PERSONALISED_REMOTEURLS')) {
    define('USE_PERSONALISED_REMOTEURLS', 1);
}
if (!defined('USE_LOCAL_SPOOL')) {
    define('USE_LOCAL_SPOOL', 0);
}
if (!defined('SEND_LISTADMIN_COPY')) {
    define('SEND_LISTADMIN_COPY', false);
}
if (!defined('EMAIL_ADDRESS_VALIDATION_LEVEL')) {
    define('EMAIL_ADDRESS_VALIDATION_LEVEL', 3);
}
if (!defined('BLACKLIST_EMAIL_ON_BOUNCE')) {
    define('BLACKLIST_EMAIL_ON_BOUNCE', 50);
}
if ($bounce_unsubscribe_threshold > BLACKLIST_EMAIL_ON_BOUNCE) {
    $bounce_unsubscribe_threshold = BLACKLIST_EMAIL_ON_BOUNCE;
}

if (!defined('UNBLACKLIST_IN_PROFILE')) {
    define('UNBLACKLIST_IN_PROFILE', false);
}
if (!defined('MANUALLY_PROCESS_BOUNCES')) {
    define('MANUALLY_PROCESS_BOUNCES', 1);
}
if (!defined('PASSWORD_CHANGE_TIMEFRAME')) {
    define('PASSWORD_CHANGE_TIMEFRAME', '1 day');
}
if (!defined('MAX_SENDPROCESSES')) {
    define('MAX_SENDPROCESSES', 1);
}
if (!defined('MAXLIST')) {
    define('MAXLIST', 1);
}
if (!defined('SHOW_LIST_OFALL_SUBSCRIBERS')) {
    define('SHOW_LIST_OFALL_SUBSCRIBERS', false);
}
if (!defined('SENDPROCESS_SERVERNAME')) {
    define('SENDPROCESS_SERVERNAME', 'localhost');
}
if (!defined('CHECK_REFERRER')) {
    define('CHECK_REFERRER', true);
}
// if (!defined('PHPMAILER_PATH')) define ('PHPMAILER_PATH',dirname(__FILE__) . '/PHPMailer/PHPMailerAutoload.php');
// if (!defined('PHPMAILER_PATH')) define ('PHPMAILER_PATH',dirname(__FILE__) . '/PHPMailer_v5.1/class.phpmailer.php');
if (!defined('DB_TRANSLATION')) {
    define('DB_TRANSLATION', 0);
}
if (!defined('MAX_PROCESS_MESSAGE')) {
    define('MAX_PROCESS_MESSAGE', 5);
} //# how many campaigns to work on at the same time
if (!defined('ALLOW_DELETEBOUNCE')) {
    define('ALLOW_DELETEBOUNCE', 1);
}
if (!defined('REPORT_DELETED_BOUNCES')) {
    define('REPORT_DELETED_BOUNCES', 0);
}
if (!defined('MESSAGE_SENDSTATUS_INACTIVETHRESHOLD')) {
    define('MESSAGE_SENDSTATUS_INACTIVETHRESHOLD', 120);
}
if (!defined('MESSAGE_SENDSTATUS_SAMPLETIME')) {
    define('MESSAGE_SENDSTATUS_SAMPLETIME', 600);
}
if (!defined('SEND_QUEUE_PROCESSING_REPORT')) {
    define('SEND_QUEUE_PROCESSING_REPORT', true);
}
if (!defined('MAX_AVATAR_SIZE')) {
    define('MAX_AVATAR_SIZE', 2000);
}
if (!defined('DEFAULT_MESSAGEAGE')) {
    define('DEFAULT_MESSAGEAGE', 691200);
} //# 8 days in seconds
if (!defined('ADD_EMAIL_THROTTLE')) {
    define('ADD_EMAIL_THROTTLE', 1);
} //# seconds between addemail ajax requests
if (!defined('SENDTEST_THROTTLE')) {
    define('SENDTEST_THROTTLE', 1);
} //# seconds between send test
if (!defined('SENDTEST_MAX')) {
    define('SENDTEST_MAX', 999);
} //# max number of emails in a send test
if (!defined('RESETSTATS_MAX')) {
    define('RESETSTATS_MAX', 10);
} //# do not reset statistics if more than this number have been sent
if (!defined('MAX_PROCESSQUEUE_TIME')) {
    define('MAX_PROCESSQUEUE_TIME', 99999);
}
if (!defined('LANGUAGE_AUTO_UPDATE')) {
    define('LANGUAGE_AUTO_UPDATE', true);
}
if (!defined('SESSION_TIMEOUT')) {
    define('SESSION_TIMEOUT', 1800);
}
if (!defined('MAX_MAILSIZE')) {
    define('MAX_MAILSIZE', 209715200);
} // in bytes, 200Mb
if (!defined('POP_BEFORE_SMTP')) {
    define('POP_BEFORE_SMTP', '');
}
if (!defined('POPBEFORESMTP_DEBUG')) {
    define('POPBEFORESMTP_DEBUG', '');
}
if (!defined('USERSPAGE_MAX')) {
    define('USERSPAGE_MAX', 1000);
}
if (!defined('LISTPAGE_MAX')) {
    define('LISTPAGE_MAX', 10);
}
if (!defined('GOOGLE_SENDERID')) {
    define('GOOGLE_SENDERID', '');
}
// if false, it will disable the automatic updater.
if (!defined ('ALLOW_UPDATER')){
    define('ALLOW_UPDATER', false);
}
if (!defined ('USE_REPLY_TO')){
    define('USE_REPLY_TO', false);
}
if (!isset($plugins_disabled) || !is_array($plugins_disabled)) {
    $plugins_disabled = array();
}

if (!isset($GLOBALS['installation_name'])) {
    $GLOBALS['installation_name'] = 'phpList';
}
if (!defined('SESSIONNAME')) {
    define('SESSIONNAME', 'phpList'.$GLOBALS['installation_name'].'session');
}
//# this doesn't yet work with the FCKEditor
//ini_set('session.name',str_replace(' ','',SESSIONNAME));

if (!defined('USE_AMAZONSES')) {
    define('USE_AMAZONSES', defined('AWS_ACCESSKEYID') && AWS_ACCESSKEYID && function_exists('curl_init'));
}
if (!defined('AWS_POSTURL')) {
    define('AWS_POSTURL', 'https://email.us-east-1.amazonaws.com/');
}
if (!defined('PHPLIST_POWEREDBY_URLROOT')) {
    define('PHPLIST_POWEREDBY_URLROOT', 'https://d3u7tsw7cvar0t.cloudfront.net/images');
}

if (!isset($allowed_referrers) || !is_array($allowed_referrers)) {
    $allowed_referrers = array();
}
if (isset($_SERVER['HTTP_ORIGIN']) && defined('ACCESS_CONTROL_ALLOW_ORIGINS') && in_array($_SERVER['HTTP_ORIGIN'], ACCESS_CONTROL_ALLOW_ORIGINS)) {
    define('ACCESS_CONTROL_ALLOW_ORIGIN', $_SERVER['HTTP_ORIGIN']);
} elseif (!defined('ACCESS_CONTROL_ALLOW_ORIGIN')) {
    define('ACCESS_CONTROL_ALLOW_ORIGIN', $GLOBALS['scheme'].'://'.$_SERVER['HTTP_HOST']);
}

if (!defined('PREFERENCEPAGE_SHOW_PRIVATE_LISTS')) {
    define('PREFERENCEPAGE_SHOW_PRIVATE_LISTS', false);
}
//https://mantis.phplist.com/view.php?id=15603
if (!defined('WORDWRAP_HTML')) {
    define('WORDWRAP_HTML', 0);
}
if (!defined('USE_PRECEDENCE_HEADER')) {
    define('USE_PRECEDENCE_HEADER', true);
}
if (!defined('RFC_DIRECT_DELIVERY')) {
    define('RFC_DIRECT_DELIVERY', false);
}  //# Request for Confirmation, delivery with SMTP

set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/PEAR');
$GLOBALS['has_curl'] = function_exists('curl_init');

$GLOBALS['jQuery'] = 'jquery-3.6.0.min.js';

$system_tmpdir = ini_get('upload_tmp_dir');
if (!isset($GLOBALS['tmpdir']) && !empty($system_tmpdir)) {
    $GLOBALS['tmpdir'] = $system_tmpdir;
}
if (!isset($GLOBALS['tmpdir'])) {
    $GLOBALS['tmpdir'] = '/tmp';
}
if (!is_dir($GLOBALS['tmpdir']) || !is_writable($GLOBALS['tmpdir']) && !empty($system_tmpdir)) {
    $GLOBALS['tmpdir'] = $system_tmpdir;
}
if (!isset($attachment_repository)) {
    $attachment_repository = $tmpdir;
}

if (isset($pageroot)) {
    if ($pageroot == '/') {
        $pageroot = '';
    }
} else {
    $pageroot = '/lists';
}
// as the "admin" in adminpages is hardcoded, don't put it in the config file
$adminpages = $GLOBALS['pageroot'].'/admin';

$GLOBALS['homepage'] = 'home';

if (!isset($systemroot)) {
    $systemroot = dirname(__FILE__);
}
if (!isset($documentRoot)) {
    $documentRoot = $_SERVER['DOCUMENT_ROOT'];
}
if (!defined('FORWARD_ALTERNATIVE_CONTENT')) {
    define('FORWARD_ALTERNATIVE_CONTENT', 0);
}
if (!defined('KEEPFORWARDERATTRIBUTES')) {
    define('KEEPFORWARDERATTRIBUTES', 0);
}
if (!defined('FORWARD_EMAIL_COUNT')) {
    define('FORWARD_EMAIL_COUNT', 1);
}
if (!defined('FORWARD_FRIEND_COUNT_ATTRIBUTE')) {
    define('FORWARD_FRIEND_COUNT_ATTRIBUTE', 0);
}
//# when click track links are detected, block sending
//# if false, will only show warning. For now defaulting to false, but may change that later
if (!defined('BLOCK_PASTED_CLICKTRACKLINKS')) {
    define('BLOCK_PASTED_CLICKTRACKLINKS', false);
}

if (FORWARD_EMAIL_COUNT < 1) {
    echo 'Config Error: FORWARD_EMAIL_COUNT must be > (int) 0';
    exit;
}
// allows FORWARD_EMAIL_COUNT forwards per user per period in mysql interval terms
if (!defined('FORWARD_EMAIL_PERIOD')) {
    define('FORWARD_EMAIL_PERIOD', '1 minute');
}
if (!defined('FORWARD_PERSONAL_NOTE_SIZE')) {
    define('FORWARD_PERSONAL_NOTE_SIZE', 0);
}
if (!defined('EMBEDUPLOADIMAGES')) {
    define('EMBEDUPLOADIMAGES', 0);
}
if (!defined('EMBEDEXTERNALIMAGES')) {
    define('EMBEDEXTERNALIMAGES', false);
}
if (!defined('IMPORT_FILESIZE')) {
    define('IMPORT_FILESIZE', 5);
}
if (!defined('SMTP_TIMEOUT')) {
    define('SMTP_TIMEOUT', 5);
}
//# experimental, mark mails "todo" in the DB and process the "todo" list, to avoid the user query being run every queue run
if (!defined('MESSAGEQUEUE_PREPARE')) {
    //# with a multi-process config, we need the queue prepare mechanism and memcache
    if (MAX_SENDPROCESSES > 1) {
        define('MESSAGEQUEUE_PREPARE', true);
    } else {
        define('MESSAGEQUEUE_PREPARE', false);
    }
}
if (!defined('USE_PHPMAILER6')) {
    define('USE_PHPMAILER6', true);
}
if (!defined('HTTP_PROXY_HOST')) {
    define('HTTP_PROXY_HOST', false);
}
if (!defined('HTTP_PROXY_PORT')) {
    define('HTTP_PROXY_PORT', false);
}
// interval in milliseconds between asynchronous requests
if (!defined('ASYNC_REQUEST_INTERVAL')) {
    define('ASYNC_REQUEST_INTERVAL', 0);
}

if (!isset($GLOBALS['export_mimetype'])) {
    $GLOBALS['export_mimetype'] = 'application/csv';
}
if (!isset($GLOBALS['admin_auth_module'])) {
    $GLOBALS['admin_auth_module'] = 'phplist_auth.inc';
}
// unset the default admin_auth_module, to use the plugin version
if ($GLOBALS['admin_auth_module'] == 'phplist_auth.inc') {
    $GLOBALS['admin_auth_module'] = '';
}
if (!isset($GLOBALS['noteditableconfig'])) {
    $GLOBALS['noteditableconfig'] = array();
}
if (!defined('WORKAROUND_OUTLOOK_BUG') && defined('USE_CARRIAGE_RETURNS')) {
    define('WORKAROUND_OUTLOOK_BUG', USE_CARRIAGE_RETURNS);
}
if (!isset($GLOBALS['blacklist_gracetime'])) {
    $GLOBALS['blacklist_gracetime'] = 5;
}
if (!isset($GLOBALS['message_envelope'])) {
    $GLOBALS['message_envelope'] = '';
}

if (!isset($GLOBALS['pageheader']) || !is_array($GLOBALS['pageheader'])) {
    $GLOBALS['pageheader'] = array();
}
if (!isset($GLOBALS['pagefooter']) || !is_array($GLOBALS['pagefooter'])) {
    $GLOBALS['pagefooter'] = array();
}
if (!isset($GLOBALS['check_for_host'])) {
    $GLOBALS['check_for_host'] = 0;
}

//# experimental, use minified JS and CSS
if (!defined('USE_MINIFIED_ASSETS')) {
    define('USE_MINIFIED_ASSETS', true);
}
$firstInstallButton = '';

//# set up a memcached global object, and test it
$GLOBALS['MC'] = null;

if (defined('MEMCACHED')) {
    include_once dirname(__FILE__).'/class.memcached.php';
    if (class_exists('phpListMC')) {
        $GLOBALS['MC'] = new phpListMC();
        list($mc_server, $mc_port) = explode(':', MEMCACHED);
        $MC->addServer($mc_server, $mc_port);

        /* check that the MC connection is ok
        $MC->add('Hello','World');
        $test = $MC->get('Hello');
        if ($test != 'World') {
          unset($MC);
        }
        */
    }
}

//# global counters array to keep track of things
$counters = array(
    'campaign'                        => 0,
    'num_users_for_message'           => 0,
    'batch_count'                     => 0,
    'batch_total'                     => 0,
    'sendemail returned false total'  => 0,
    'send blocked by domain throttle' => 0,
    'add attachment error'            => 0,
    'sendemail returned false'        => 0,
    'sentastest'                      => 0,
    'invalid'                         => 0,
    'failed_sent'                     => 0,
    'sent'                            => 0,
    'num_per_batch'                   => 0,
);

$repetitionLabels = array(
    60    => 'hour',  // can't use s() here yet
    1440  => 'day',
    10080 => 'week',
    20160 => 'fortnight',
    40320 => 'four weeks',
);

$LANGUAGES = array();
$THEMES = array();

$GLOBALS['disallowpages'] = array();
// list of pages and categorisation in the system
//# old version
$system_pages = array(
    'system' => array(
        'adminattributes' => 'none',
        'attributes'      => 'none',
        'upgrade'         => 'none',
        'configure'       => 'none',
        'spage'           => 'owner',
        'spageedit'       => 'owner',
        'defaultconfig'   => 'none',
        'defaults'        => 'none',
        'initialise'      => 'none',
        'bounces'         => 'none',
        'bounce'          => 'none',
        'processbounces'  => 'none',
        'eventlog'        => 'none',
        'reconcileusers'  => 'none',
        'getrss'          => 'owner',
        'viewrss'         => 'owner',
        'purgerss'        => 'none',
        'setup'           => 'none',
        'dbcheck'         => 'none',

    ),
    'list' => array(
        'list'     => 'owner',
        'editlist' => 'owner',
        'members'  => 'owner',
    ),
    'user' => array(
        'user'           => 'none',
        'users'          => 'none',
        'dlusers'        => 'none',
        'editattributes' => 'none',
        'usercheck'      => 'none',
        'import1'        => 'none',
        'import2'        => 'none',
        'import3'        => 'none',
        'import4'        => 'none',
        'import'         => 'none',
        'export'         => 'none',
        'massunconfirm'  => 'none',

    ),
    'message' => array(
        'message'      => 'owner',
        'messages'     => 'owner',
        'processqueue' => 'none',
        'send'         => 'owner',
        'preparesend'  => 'none',
        'sendprepared' => 'all',
        'template'     => 'none',
        'templates'    => 'none',
    ),
    'clickstats' => array(
        'statsmgt'      => 'owner',
        'mclicks'       => 'owner',
        'uclicks'       => 'owner',
        'userclicks'    => 'owner',
        'mviews'        => 'owner',
        'statsoverview' => 'owner',

    ),
    'admin' => array(
        'admins' => 'none',
        'admin'  => 'owner',
    ),
);

Filemanager

Name Type Size Permission Actions
PEAR Folder 0755
PHPMailer Folder 0755
PHPMailer6 Folder 0755
actions Folder 0755
css Folder 0755
data Folder 0755
help Folder 0755
images Folder 0755
inc Folder 0755
info Folder 0755
js Folder 0755
locale Folder 0755
onyxrss Folder 0755
plugins Folder 0755
tests Folder 0755
ui Folder 0755
.gitignore File 20 B 0644
.htaccess File 489 B 0644
.minceconf File 994 B 0644
AnalyticsQuery.php File 985 B 0644
CsvReader.php File 1.27 KB 0644
EmailSender.php File 477 B 0644
Updater.php File 193 B 0644
about.php File 7.4 KB 0644
accesscheck.php File 715 B 0644
addprefix.php File 1.01 KB 0644
adduser.php File 46 B 0644
admin.php File 12.77 KB 0644
adminattributes.php File 7.46 KB 0644
admins.php File 5.16 KB 0644
analytics.php File 2.84 KB 0644
attributes.php File 26.2 KB 0644
blacklistemail.php File 1.22 KB 0644
bounce.php File 11.14 KB 0644
bouncemgt.php File 1.44 KB 0644
bouncerule.php File 4.27 KB 0644
bouncerules.php File 6.33 KB 0644
bounces.php File 7.57 KB 0644
catlists.php File 3.34 KB 0644
checkbouncerules.php File 1.43 KB 0644
checki18n.php File 3.13 KB 0644
checkprerequisites.php File 1.62 KB 0644
class.image.inc File 3.9 KB 0644
class.phplistmailer.php File 30.73 KB 0644
class.phplistmailerbase.php File 1.67 KB 0644
community.php File 3.5 KB 0644
communityfeed.php File 2.36 KB 0644
configure.php File 7.85 KB 0644
connect.php File 89.86 KB 0644
convertstats.php File 5.83 KB 0644
converttoutf8.php File 3.78 KB 0644
cron.php File 3.34 KB 0644
date.php File 7.65 KB 0644
dbcheck.php File 3.7 KB 0644
defaultFrontendTexts.php File 9.79 KB 0644
defaultconfig.php File 30.66 KB 0644
defaultplugin.php File 31.59 KB 0644
defaults.php File 3.64 KB 0644
defaultsystemtemplate.php File 15.29 KB 0644
defaulttest.php File 1.23 KB 0644
dlusers.php File 235 B 0644
domainbounces.php File 507 B 0644
domainstats.php File 371 B 0644
editattributes.php File 8.78 KB 0644
editlist.php File 7.4 KB 0644
eventlog.php File 4.68 KB 0644
export.php File 6.86 KB 0644
exportuserdata.php File 8.26 KB 0644
fckphplist.php File 49.84 KB 0644
gchart.php File 903 B 0644
generatebouncerules.php File 5.51 KB 0644
home.php File 6.56 KB 0644
hostedprocessqueuesetup.php File 3.09 KB 0644
htaccess File 311 B 0644
image.php File 2.01 KB 0644
import.php File 2.75 KB 0644
import1.php File 11.09 KB 0644
import2.php File 34.16 KB 0644
import3.php File 22.72 KB 0644
import4.php File 16.86 KB 0644
importadmin.php File 17.08 KB 0644
importsimple.php File 7.32 KB 0644
index.php File 32.82 KB 0644
info.php File 1.07 KB 0644
init.php File 27.36 KB 0644
initialise.php File 12.05 KB 0644
initlanguages.php File 867 B 0644
languages.php File 21.37 KB 0644
lib.php File 86.79 KB 0644
list.php File 11.32 KB 0644
listbounces.php File 4.13 KB 0644
login.php File 6.39 KB 0644
logout.php File 865 B 0644
massremove.php File 2.55 KB 0644
mclicks.php File 7.28 KB 0644
members.php File 19.99 KB 0644
mergeduplicates.php File 4.48 KB 0644
message.php File 9.08 KB 0644
messages.php File 26.27 KB 0644
minify.txt File 201 B 0644
msgbounces.php File 3.4 KB 0644
msgstatus.php File 1.27 KB 0644
mviews.php File 6.27 KB 0644
mysql.inc File 40 B 0644
mysqli.inc File 14.02 KB 0644
pageaction.php File 1.11 KB 0644
phpListAdminAuthentication.php File 6.82 KB 0644
pluginlib.php File 9.43 KB 0644
plugins.php File 17.78 KB 0644
preparesend.php File 669 B 0644
processbounces.php File 35.36 KB 0644
processqueue.php File 3.71 KB 0644
readtestmail.php File 11.59 KB 0644
reconcileusers.php File 27.71 KB 0644
redirecttoupdater.php File 187 B 0644
reindex.php File 1.82 KB 0644
rsslib.php File 3.17 KB 0644
runcommand.php File 583 B 0644
send.php File 6.17 KB 0644
send_core.php File 63.91 KB 0644
sendemaillib.php File 69.84 KB 0644
sendprepared.php File 4.87 KB 0644
sessionlib.php File 2.7 KB 0644
setpermissions.php File 2.08 KB 0644
setup.php File 2.56 KB 0644
spage.php File 4.35 KB 0644
spageedit.php File 19.08 KB 0644
statsmgt.php File 1.23 KB 0644
statsoverview.php File 6.19 KB 0644
stresstest.php File 4.82 KB 0644
structure.php File 29.21 KB 0644
subscribelib2.php File 70.22 KB 0644
subscriberstats.php File 617 B 0644
suppressionlist.php File 1.71 KB 0644
system.php File 795 B 0644
systemstats.php File 5.73 KB 0644
template.php File 16.4 KB 0644
templates.php File 3.01 KB 0644
tests.php File 1.67 KB 0644
uclicks.php File 6.74 KB 0644
update.php File 187 B 0644
updateLib.php File 2.2 KB 0644
updatetlds.php File 358 B 0644
updatetranslation.php File 2.51 KB 0644
upgrade.php File 23.82 KB 0644
user.php File 23.08 KB 0644
usercheck.php File 2.55 KB 0644
userclicks.php File 11.57 KB 0644
userhistory.php File 8.25 KB 0644
usermgt.php File 1.9 KB 0644
users.php File 19.3 KB 0644
vCard.php File 1.9 KB 0644
viewmessage.php File 635 B 0644
viewtemplate.php File 1.86 KB 0644
vote.php File 38 B 0644