<?

include_once "./setting.php";

include_once $global["root"] . "/include/handle.php";
include_once $global["root"] . "/include/print_array.php";
include_once $global["root"] . "/include/print_time.php";

//include_once $global["root"] . "/module/message/function/xmlrpc.php";
include_once $global["root"] . "/module/message/function/do.php";

//-------------------------------------------------- execute

include_once $global["root"] . "/lib/Site.php";
include_once $global["root"] . "/lib/Payload.php";

$Site = new Site;
$Site->init("mail");

include_once $global["root"] . "/lang/" . $_SESSION["config_lang"] . ".php";

extract($_POST);

$Payload = new Payload;

switch ($action) {

	case ("add") :
		$retval = $Payload->insert();
	break;
	case ("remove") :
		if (! is_array($insertedPayload) and (count($insertedPayload) < 1)) {
			$_SESSION["tmp"]["msg"]["content"] = $string["error11"];
			goprev();
		}

		while (list($i, $j) = each($insertedPayload)) {
			$retval = $Payload->remove($j);
		}

	break;
}

$Site->end1();
goprev();

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

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

Changelog
---------

Usage
-----

*/

?>
