<?

include "./setting.php";

include_once $global["root"] . "/include/print_array.php";
include_once $global["root"] . "/lib/MySQLdb.php";

if ($_POST) exit;
if (! array_key_exists("a", $_GET)) exit;
if (! array_key_exists("b", $_GET)) exit;

$DB = new MySQLdb;
$DB->connect($db);
$DB->set_db($db["database"]);

if (! $DB->retval) exit;

# update the notified field as "1"
$SQL_UPDATE_NOTIFIED = "update mail_%s set notified = '1' where message_id = '%s'";

$DB->execute_query(
	sprintf($SQL_UPDATE_NOTIFIED, $_GET["a"], $_GET["b"])
);

$DB->close();
$DB->quit();

$fd = fopen(sprintf("%s/image/blank.gif", $global["root"]), "rb");
Header("Content-type: image/gif");
Header("Content-Disposition: inline; filename=\"null.gif\"");

//echo $data;
fpassthru($fd);

/*
Description
-----------

Delivery Notification Service

Author
------
 Spike^ekipS <spike@spikeekips.net>

Changelog
---------

Usage
-----

*/

?>
