Example #1
0
/**
 * @param string $footer
 */
function html_end($footer = '')
{
    echo '</td>' . "\n";
    echo '</tr>' . "\n";
    echo '</table>' . "\n";
    echo $footer;
    if (DEBUG) {
        echo '<p class="center" style="font-size:13px"><i>' . "\n";
        echo page_creation_timer();
        echo '</i></p>' . "\n";
    }
    echo '<p class="center" style="font-size:13px">' . "\n";
    echo __('footer01');
    echo mailwatch_version();
    echo ' - &copy; 2006-' . date('Y');
    echo '</p>' . "\n";
    echo '</body>' . "\n";
    echo '</html>' . "\n";
}
Example #2
0
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
// Authentication checking
session_start();
require 'login.function.php';
if ($_SESSION['user_type'] != 'A') {
    header("Location: index.php");
    audit_log('Non-admin user attemped to view Software Version Page');
} else {
    html_start('MailWatch and MailScanner Version information', '0', false, false);
    $mailwatch_version = mailwatch_version();
    $mailscanner_version = get_conf_var('MailScannerVersionNumber');
    $php_version = phpversion();
    $mysql_version = mysql_result(dbquery("SELECT VERSION()"), 0);
    $geoipv4_version = FALSE;
    $geoipv6_version = FALSE;
    if (file_exists('./temp/GeoIP.dat')) {
        $geoipv4_version = date('r', filemtime('./temp/GeoIP.dat')) . ' (download date)';
    }
    if (file_exists('./temp/GeoIPv6.dat')) {
        $geoipv6_version = date('r', filemtime('./temp/GeoIPv6.dat')) . ' (download date)';
    }
    echo '<table width="100%" class="boxtable">' . "\n";
    echo '<tr>' . "\n";
    echo '<td>' . "\n";
    echo '<p class="center" style="font-size:20px"><b>' . __('softver11') . '</b></p>' . "\n";
Example #3
0
 $files['ipv6']['path'] = '/download/geoip/database/GeoIPv6.dat.gz';
 $files['ipv6']['destination'] = __DIR__ . '/temp/GeoIPv6.dat.gz';
 $extract_dir = __DIR__ . '/temp/';
 // Clean-up from last run
 foreach ($files as $file) {
     if (file_exists($file['destination'])) {
         unlink($file['destination']);
     }
 }
 ob_flush();
 flush();
 if (!file_exists($files['ipv4']['destination']) && !file_exists($files['ipv6']['destination'])) {
     if (is_writable($extract_dir) && is_readable($extract_dir)) {
         if (function_exists('fsockopen') || extension_loaded('curl')) {
             $requestSession = new Requests_Session($files_base_url . '/');
             $requestSession->useragent = 'MailWatch/' . str_replace(array(' - ', ' '), array('-', '-'), mailwatch_version());
             if (USE_PROXY === true) {
                 if (PROXY_USER != '') {
                     $requestSession->options['proxy']['authentication'] = array(PROXY_SERVER . ':' . PROXY_PORT, PROXY_USER, PROXY_PASS);
                 } else {
                     $requestSession->options['proxy']['authentication'] = array(PROXY_SERVER . ':' . PROXY_PORT);
                 }
                 switch (PROXY_TYPE) {
                     case 'HTTP':
                     case 'CURLPROXY_HTTP':
                         //BC for old constant name
                         //$requestProxy = new Requests_Proxy_HTTP($requestProxyParams);
                         $requestSession->options['proxy']['type'] = 'HTTP';
                         break;
                     case 'SOCKS5':
                     case 'CURLPROXY_SOCKS5':