get('Your database is out of date, please make sure to upgrade').'
'. $GLOBALS['I18N']->get('Your version').' : '.$dbversion.'
'. $GLOBALS['I18N']->get('phplist version').' : '.VERSION. '
'.PageLink2('upgrade', $GLOBALS['I18N']->get('Upgrade')) ); $upgrade_required = 1; } } else { Info($GLOBALS['I18N']->get('Database has not been initialised').'. '. $GLOBALS['I18N']->get('go to').' '. PageLink2('initialise&firstinstall=1', $GLOBALS['I18N']->get('Initialise Database')).' '. $GLOBALS['I18N']->get('to continue'), 1); $GLOBALS['firsttime'] = 1; $_SESSION['firstinstall'] = 1; return; } //# trigger this somewhere else? refreshTlds(); // check for latest version $checkinterval = sprintf('%d', getConfig('check_new_version')); if (empty($checkinterval)) { $checkinterval = 7; } $showUpdateAvail = !empty($_GET['showupdate']); //# just to check the design $thisversion = VERSION; $thisversion = preg_replace("/[^\.\d]/", '', $thisversion); $latestversion = getConfig('updateavailable'); $showUpdateAvail = $showUpdateAvail || (!empty($latestversion) && !versionCompare($thisversion, $latestversion)); if (!$showUpdateAvail && $checkinterval) { //#https://mantis.phplist.com/view.php?id=16815 $query = sprintf('select date_add(value, interval %d day) < now() as needscheck from %s where item = "updatelastcheck"', $checkinterval, $tables['config']); $needscheck = Sql_Fetch_Row_Query($query); if ($needscheck[0] != '0') { @ini_set('user_agent', NAME.' (phplist version '.VERSION.')'); @ini_set('default_socket_timeout', 5); if ($fp = @fopen('https://www.phplist.com/files/LATESTVERSION', 'r')) { $latestversion = fgets($fp); $latestversion = preg_replace("/[^\.\d]/", '', $latestversion); @fclose($fp); if (!versionCompare($thisversion, $latestversion)) { //# remember this, so we can remind about the update, without the need to check the phplist site //# hmmm, this causes it to be "stuck" on the last version checked SaveConfig('updateavailable', $latestversion, 0, true); $showUpdateAvail = true; } } SaveConfig('updatelastcheck', date('Y-m-d H:i:s', time()), 0, true); } } if ($showUpdateAvail) { echo '
'; echo s('A new version of phpList is available!'); echo '
'; echo '
'.s('The new version may have fixed security issues,
so it is recommended to upgrade as soon as possible'); echo '
'.s('Your version').': '.$thisversion.''; echo '
'.s('Latest version').': '.$latestversion.'
'; echo ''.$GLOBALS['I18N']->get('View what has changed').'  '; echo ''.$GLOBALS['I18N']->get('Download').'
'; } $lastCampaignID = null; if ($_SESSION['logindetails']['superuser']) { $result = Sql_Query(sprintf( 'select id from %s where sent is not null order by entered desc limit 1', $GLOBALS['tables']['message'] )); if ($result) { $row = Sql_Fetch_Assoc($result); $lastCampaignID = $row['id']; $lastcampaign = Sql_Fetch_Assoc_Query(sprintf( 'select msg.id as messageid,count(um.viewed) as views, count(um.status) as total, subject,date_format(sent,"%%e %%M %%Y") as sent,bouncecount as bounced from %s um join %s msg on msg.id = um.messageid where msg.id = %d and um.status = "sent"', $GLOBALS['tables']['usermessage'], $GLOBALS['tables']['message'], $lastCampaignID )); } } else { $result = Sql_Query(sprintf( 'select msg.id from %s msg join %s lm on lm.messageid = msg.id join %s list on list.id = lm.listid where sent is not null and list.owner = %d order by msg.entered desc limit 1', $GLOBALS['tables']['message'],$GLOBALS['tables']['listmessage'],$GLOBALS['tables']['list'],$_SESSION['logindetails']['id'] )); if ($result) { $row = Sql_Fetch_Assoc($result); $lastCampaignID = $row['id']; $lastcampaign = Sql_Fetch_Assoc_Query(sprintf( 'select msg.id as messageid,count(um.viewed) as views, count(um.status) as total, subject,date_format(sent,"%%e %%b %%Y") as sent,bouncecount as bounced from %s um join %s msg on um.messageid = msg.id join %s lm on lm.messageid = msg.id join %s list on list.id = lm.listid where msg.id = %d and um.status = "sent" and list.owner = %d', $GLOBALS['tables']['usermessage'], $GLOBALS['tables']['message'], $GLOBALS['tables']['listmessage'], $GLOBALS['tables']['list'], $lastCampaignID, $_SESSION['logindetails']['id'] )); } } ?>

Getting Started

' . s('Import Subscribers') . '
'; } if (!in_array('send', $GLOBALS['disallowpages'])) { echo '' . s('Start or continue a campaign') . '
'; } if (!in_array('statsoverview', $GLOBALS['disallowpages'])) { // are we allowed to view stats if (!empty($lastCampaignID)) { // are there any echo '' . s('View Statistics') . '
'; } else { echo ' ' . s('View Statistics') . '
'; } } ?>

Last Campaign Results

' . s('There are currently no statistics available') . '

'; } else { ?>

Subject:

Messages sent on .

Viewed (%), and bounced (%).