1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | PhpWebGallery - a PHP based picture gallery | |
---|
4 | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | |
---|
5 | // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | |
---|
6 | // | Copyright (C) 2006 Ruben ARNAUD - team@phpwebgallery.net | |
---|
7 | // +-----------------------------------------------------------------------+ |
---|
8 | // | branch : BSF (Best So Far) |
---|
9 | // | file : $RCSfile$ |
---|
10 | // | last update : $Date: 2006-03-23 02:49:04 +0100 (jeu., 23 mars 2006) $ |
---|
11 | // | last modifier : $Author: rvelices $ |
---|
12 | // | revision : $Revision: 1094 $ |
---|
13 | // +-----------------------------------------------------------------------+ |
---|
14 | // | This program is free software; you can redistribute it and/or modify | |
---|
15 | // | it under the terms of the GNU General Public License as published by | |
---|
16 | // | the Free Software Foundation | |
---|
17 | // | | |
---|
18 | // | This program is distributed in the hope that it will be useful, but | |
---|
19 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
20 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
21 | // | General Public License for more details. | |
---|
22 | // | | |
---|
23 | // | You should have received a copy of the GNU General Public License | |
---|
24 | // | along with this program; if not, write to the Free Software | |
---|
25 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
26 | // | USA. | |
---|
27 | // +-----------------------------------------------------------------------+ |
---|
28 | |
---|
29 | |
---|
30 | define('PHPWG_ROOT_PATH','./'); |
---|
31 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); |
---|
32 | include_once(PHPWG_ROOT_PATH.'include/functions_notification.inc.php'); |
---|
33 | include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); |
---|
34 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
35 | include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.php'); |
---|
36 | // Translations are in admin file too |
---|
37 | include(get_language_filepath('admin.lang.php')); |
---|
38 | |
---|
39 | // +-----------------------------------------------------------------------+ |
---|
40 | // | Main | |
---|
41 | // +-----------------------------------------------------------------------+ |
---|
42 | $page['errors'] = array(); |
---|
43 | $page['infos'] = array(); |
---|
44 | |
---|
45 | if (isset($_GET['subscribe']) |
---|
46 | and preg_match('/^[A-Za-z0-9]{16}$/', $_GET['subscribe'])) |
---|
47 | { |
---|
48 | subcribe_notification_by_mail(false, array($_GET['subscribe'])); |
---|
49 | } |
---|
50 | else |
---|
51 | if (isset($_GET['unsubscribe']) |
---|
52 | and preg_match('/^[A-Za-z0-9]{16}$/', $_GET['unsubscribe'])) |
---|
53 | { |
---|
54 | unsubcribe_notification_by_mail(false, array($_GET['unsubscribe'])); |
---|
55 | } |
---|
56 | else |
---|
57 | { |
---|
58 | echo l10n('nbm_unknown_identifier'); |
---|
59 | exit(); |
---|
60 | } |
---|
61 | |
---|
62 | // +-----------------------------------------------------------------------+ |
---|
63 | // | infos & errors display | |
---|
64 | // +-----------------------------------------------------------------------+ |
---|
65 | echo '<pre>'; |
---|
66 | |
---|
67 | if (count($page['errors']) != 0) |
---|
68 | { |
---|
69 | echo "\n\nErrors:\n"; |
---|
70 | foreach ($page['errors'] as $error) |
---|
71 | { |
---|
72 | echo $error."\n"; |
---|
73 | } |
---|
74 | } |
---|
75 | |
---|
76 | if (count($page['infos']) != 0) |
---|
77 | { |
---|
78 | echo "\n\nInformations:\n"; |
---|
79 | foreach ($page['infos'] as $info) |
---|
80 | { |
---|
81 | echo $info."\n"; |
---|
82 | } |
---|
83 | } |
---|
84 | |
---|
85 | echo '</pre>'; |
---|
86 | |
---|
87 | |
---|
88 | ?> |
---|