2006-04-01 03:14:57 +02:00
|
|
|
<?php
|
|
|
|
// +-----------------------------------------------------------------------+
|
2011-01-18 01:02:52 +01:00
|
|
|
// | Piwigo - a PHP based photo gallery |
|
2008-04-05 00:57:23 +02:00
|
|
|
// +-----------------------------------------------------------------------+
|
2016-01-14 12:17:58 +01:00
|
|
|
// | Copyright(C) 2008-2016 Piwigo Team http://piwigo.org |
|
2008-04-05 00:57:23 +02:00
|
|
|
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
|
|
|
|
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | 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 |
|
|
|
|
// | |
|
|
|
|
// | This program is distributed in the hope that it will be useful, but |
|
|
|
|
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
2006-04-01 03:14:57 +02:00
|
|
|
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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, write to the Free Software |
|
|
|
|
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
|
|
|
|
// | USA. |
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
2007-02-22 21:20:30 +01:00
|
|
|
//--------------------------------------------------------------------- include
|
2006-04-01 03:14:57 +02:00
|
|
|
define('PHPWG_ROOT_PATH','./');
|
|
|
|
include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
|
2008-05-02 23:56:21 +02:00
|
|
|
check_status(ACCESS_FREE);
|
2006-04-01 03:14:57 +02:00
|
|
|
include_once(PHPWG_ROOT_PATH.'include/functions_notification.inc.php');
|
|
|
|
include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
|
|
|
|
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|
|
|
include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.php');
|
|
|
|
// Translations are in admin file too
|
2007-10-09 01:46:09 +02:00
|
|
|
load_language('admin.lang');
|
2007-01-08 01:16:10 +01:00
|
|
|
// Need to update a second time
|
2014-06-02 09:55:46 +02:00
|
|
|
trigger_notify('loading_lang');
|
2011-01-17 19:48:13 +01:00
|
|
|
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
|
2007-10-09 01:46:09 +02:00
|
|
|
|
2007-01-08 01:16:10 +01:00
|
|
|
|
2006-04-01 03:14:57 +02:00
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | Main |
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
if (isset($_GET['subscribe'])
|
|
|
|
and preg_match('/^[A-Za-z0-9]{16}$/', $_GET['subscribe']))
|
|
|
|
{
|
2007-02-11 13:01:07 +01:00
|
|
|
subscribe_notification_by_mail(false, array($_GET['subscribe']));
|
2006-04-01 03:14:57 +02:00
|
|
|
}
|
2013-10-19 19:43:04 +02:00
|
|
|
else if (isset($_GET['unsubscribe'])
|
2006-04-01 03:14:57 +02:00
|
|
|
and preg_match('/^[A-Za-z0-9]{16}$/', $_GET['unsubscribe']))
|
|
|
|
{
|
2007-02-11 13:01:07 +01:00
|
|
|
unsubscribe_notification_by_mail(false, array($_GET['unsubscribe']));
|
2006-04-01 03:14:57 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-10-19 19:43:04 +02:00
|
|
|
$page['errors'][] = l10n('Unknown identifier');
|
2006-04-01 03:14:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// +-----------------------------------------------------------------------+
|
2006-04-01 11:42:55 +02:00
|
|
|
// | template initialization |
|
2006-04-01 03:14:57 +02:00
|
|
|
// +-----------------------------------------------------------------------+
|
2010-03-02 15:54:22 +01:00
|
|
|
$title = l10n('Notification');
|
2006-04-01 11:42:55 +02:00
|
|
|
$page['body_id'] = 'theNBMPage';
|
2006-04-01 03:14:57 +02:00
|
|
|
|
2006-04-01 11:42:55 +02:00
|
|
|
$template->set_filenames(array('nbm'=>'nbm.tpl'));
|
|
|
|
|
2011-12-18 22:46:24 +01:00
|
|
|
|
2011-05-07 17:55:10 +02:00
|
|
|
// include menubar
|
|
|
|
$themeconf = $template->get_template_vars('themeconf');
|
2011-05-09 17:04:15 +02:00
|
|
|
if (!isset($themeconf['hide_menu_on']) OR !in_array('theNBMPage', $themeconf['hide_menu_on']))
|
2011-05-07 17:55:10 +02:00
|
|
|
{
|
|
|
|
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
|
|
|
|
}
|
2006-04-01 03:14:57 +02:00
|
|
|
|
2006-04-01 11:42:55 +02:00
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | html code display |
|
|
|
|
// +-----------------------------------------------------------------------+
|
2011-05-07 17:55:10 +02:00
|
|
|
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
2013-02-07 22:17:08 +01:00
|
|
|
flush_page_messages();
|
2006-04-01 11:42:55 +02:00
|
|
|
$template->parse('nbm');
|
|
|
|
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
2008-03-13 02:43:45 +01:00
|
|
|
?>
|