Location: PHPKode > projects > ADbNewsSender > ADbNewsSender_2.0.4/maintenance.php
//File: maintainance.php
//Last change in version: 2.0.0
    ADbNewsSender 2

    Copyright (C) 2009 Florian Grannemann (hide@address.com)
    Website: http://adbnewssender.sf.net

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
     any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License			
    along with this program.  If not, see http://www.gnu.org/licenses/
// Do not edit anything until you realy REALY know what you are doing!
// This file is used to delete Email-adresses from your maillinglist that Abonnement has expired
// and to delete Emailadresses from PendingList, that are older than 24 hours.
// This File should be executed every hour.
// You may do this by a cron job or by accessing it as an image
// by including it to all of your sites:
//<img src="http://yourdomain.com/maintenance.php?fakecronjob=yes" width="0" height="0">
//Please enter the relative or absolute path to folder ./protected
//That should set the absolute path to the protected folder (if this file was not moved).
//It should work on all UNIX-like Server Operating Systems (e.g. Linux, *BSD, Solaris)
//If it does not work, try to enter the absolute path manualy or try the relative path: 

Header("Content-type: image/jpeg");
Header("Content-Disposition: inline; filename=\"image.txt\"");
$image = imagecreate ( 1, 1 );

imagecolorallocate ( $image, 0, 0, 0 );

imagejpeg ( $image, '', 1 ); 

include "$path_to_protected_folder/skeleton/public_apis.class.php.inc";
include "$path_to_protected_folder/skeleton/private_apis.class.php.inc";


$MyDB = new ADBNS_DB($path_to_DB_defs,$path_to_DB_conf);
$MyCFGro=new global_config_ro($MyDB);
$MyCFGrw=new global_config_rw($MyDB);


	//Getting Timestamp of next planed Maintenance


//Getting current timestamp


if($NextMaintenance <= $today)

	//including modul information:
	include "$path_to_protected_folder/maintenance/modules_reg.php.inc";
	//loading modules:


	while ($i <count($maint_modules))
		include "$path_to_protected_folder/maintenance/".$maint_modules[$i];

		//next maintenance  shall be in 1 hour:
Return current item: ADbNewsSender