Files
Testing/email_subscription.php

42 lines
1.8 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
/* $Id: email subscriptions bateworld 8 2014-11-08 06:02:53Z phil $ */
$page = "email_subscription";
include "header.php";
include(PATHTOINCLUDES."base.php");
//$terms_of_service = SE_Language::get(1210);
// SET GLOBAL PAGE TITLE/DESCRIPTION
$global_page_title = 'Bateworld Email Subscriptions';
$global_page_description[0] = '';
$global_page_description[1] = '';
//do query to see if they have opted-out and update content as appropriate
$em="";
$frmsubmsg="";
$uid=$user->user_info['user_id'];
if(isset($_POST["optout"]))
{
$sql="UPDATE `se_users` SET `se_users`.`user_pdp_optout` = ".$_POST["optout"]." WHERE `se_users`.`user_id` = ".$uid;
$query=$database->database_query($sql) or $em=$em.$database->database_error();
if($em==""){
$user->user_info['user_pdp_optout']=$_POST["optout"];
if($_POST["optout"]==1)
{
$frmsubmsg='<p style="font-weight:700;font-size:140%;">You have successfully opted-out of receiving this type of email.</p>';
}
if($_POST["optout"]==0)
{
$frmsubmsg= '<p style="font-weight:700;font-size:140%;">You have successfully opted-in to receiving this type of email.</p>';
}
} else{$em='<p style="font-weight:700;font-size:140%;">We were unable to complete your request. Please resubmit the form.';}
}
// ASSIGN VARIABLES AND INCLUDE FOOTER
$smarty->assign('thetitle', 'BateWorld Email Subscriptions');
$smarty->assign('thedescription','Bateworld is concern about spam and privacy. Use this page to opt-in and opt-put of important emails.');
$smarty->assign('thekeywords','bateworld, men\'s masturbation');
$smarty->assign('msize', $msize);
$smarty->assign('em', $em);
$smarty->assign('frmsubmsg', $frmsubmsg);
include_once "/home/thebate/public_html/include/analytics/email_subscriptions_stats.php";
include "footer.php";
?>