Global Unsubscribe

","",$email); $dbconnect = mysql_pconnect($dbserver,$dblogin,$dbpassword) or trigger_error("Could not connect to database server. Please try again later. ".htmlspecialchars(mysql_error()), E_USER_ERROR); $db = mysql_select_db($db,$dbconnect)or trigger_error("Could not select database. Please try again later. ".htmlspecialchars(mysql_error()), E_USER_ERROR); $email = str_replace("=", "@", $email); $sql = "SELECT userid FROM mailtrack_addresses WHERE email='$email'"; $sql_result = mysql_query($sql); if (mysql_num_rows($sql_result)) { $userid = mysql_result($sql_result,0,0); $query = "SELECT mailtrack_subscriptions.list, title FROM mailtrack_subscriptions LEFT JOIN mailtrack_lists USING (list) WHERE userid='".mysql_escape_string($userid)."'"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $list = $row['list']; print "
$email -unsub-$site"; $sql = "DELETE FROM mailtrack_subscriptions WHERE userid=$userid AND list='".mysql_escape_string($list)."'"; mysql_query($sql); } #End While going through lists } #End If there is a UserId } } #End Function removetable if ($sent == "1"){ $email = str_replace("=","@",$email); $email = trim($email);$email = strtolower($email);$email = stripslashes($email); $email = str_replace("/","",$email);$email = str_replace(" ","",$email); $email = str_replace("<","",$email);$email = str_replace(">","",$email); $dbserver = "209.173.128.196"; // Database server - probably 'localhost' $dblogin = "christian"; // Database username $dbpassword = "sw23wsx"; // Database password $db = "mailnewfunpages"; // Database name $dbconnect = mysql_pconnect($dbserver,$dblogin,$dbpassword) or trigger_error("Could not connect to database server. Please try again later. ".htmlspecialchars(mysql_error()), E_USER_ERROR); $db = mysql_select_db($db,$dbconnect) or trigger_error("Could not select database. Please try again later. ".htmlspecialchars(mysql_error()), E_USER_ERROR); $sql = "INSERT INTO gunsub (email) VALUES ('".mysql_escape_string($email)."')"; mysql_query($sql); removetable ("FunnyFunPages.com","209.173.128.196","christian","sw23wsx","mailfunnyfunpages"); removetable ("Newfunpages.com","209.173.128.196","christian","sw23wsx","mailnewfunpages"); removetable ("Funthumb.com","209.173.128.196","christian","sw23wsx","mailfunthumb"); removetable ("ThisSiteRocks.com","209.173.128.196","christian","sw23wsx","mailthissiterocks"); removetable ("DontForgetThis.com","209.173.128.196","christian","sw23wsx","maildontforgetthis"); removetable ("funnies.com","209.173.128.196","christian","sw23wsx","mailfunnies"); removetable ("positivethoughts.com","209.173.128.196","christian","sw23wsx","mailpositivethoughts"); print "
$email has been removed from all lists and added to global unsubscribe.
";exit; } ?>

Global Unsubscribe



Emails will be removed
from all lists on a daily basis.