<?php $email = $auth = null; if (!empty($_POST) && isset($_POST['email']) && isset($_POST['auth'])) { $email = $db->real_escape_string($_POST['email']); $auth = $db->real_escape_string($_POST['auth']); } elseif (!empty($id) && !empty($extra)) { $email = $id; $auth = $extra; } if (!empty($email) && !empty($auth) && Subscriber::isValid($email, $auth)) { $subscriber = new Subscriber($email); $postman = new Postman(); if (isset($_POST['delete_subscriber'])) { if ($subscriber->delete()) { $postman->MailSubscriptionRemoved($email); $template = 'subscriptions-removed.tpl'; } } else { if ($settings['subscribe_page_content'] != '') { $sql = ' SELECT * FROM ' . DB_PREFIX . 'pages WHERE url = "' . $db->real_escape_string($settings['subscribe_page_content']) . '"'; $result = $db->query($sql); $pageData = $result->fetch_assoc(); if (is_array($pageData)) { $html_title = $pageData['page_title'] . ' - ' . SITE_NAME; $meta_keywords = $pageData['keywords']; $meta_description = $pageData['description']; $smarty->assign('page', $pageData);