root/trunk/bin/invitation-error.php

Revision 1, 1.8 KB (checked in by anonymous, 7 years ago)

initial import

Line 
1<?php
2/****************************************************** Open .node ***
3 * Description:   Called by the mail server to manage mailer-daemon
4 *                error
5 * Status:        Stable.
6 * Author:        Alexandre Dath <alexandre@dotnode.com>
7 * $Id$
8 *
9 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 ******************** http://opensource.ikse.net/projects/dotnode ***/
25
26include ('../includes/includes.inc.php');
27include ('../includes/config/global.inc.php');
28
29if($argv[1])
30    $id_to_hidde = $argv[1];
31elseif($_ENV['DEFAULT'])
32    $id_to_hidde = $_ENV['DEFAULT'];
33else
34    die("no args\n");
35
36$db =& DB::connect($dsn);
37if (DB::isError($db))
38                error_log($_SERVER['HTTP_HOST'].' | '.__FILE__.' | Connexion SQL impossible : '.$db->getMessage());
39
40$db->setFetchMode(DB_FETCHMODE_ASSOC);
41
42$failure_notice = file_get_contents('php://stdin');
43
44$values = array(
45    'status' => 'stop',
46    'response' => 'mailproblem',
47    'failure_notice' => $failure_notice,
48    'date_finish' => time() );
49
50$db->autoExecute('invitation_email', $values, DB_AUTOQUERY_UPDATE, "id='".$id_to_hidde."'");
51
52$db->disconnect();
53?>
Note: See TracBrowser for help on using the browser.