"); define("PROMOS","Periodical Special Promotions, Updates and Announcements"); define("HEALTH","Healthy Lifestyle News"); define("LIFESTYLES","Inspired Lifestyles Newsletter"); define("BIZNEWS","Inspired Biz News"); include("exitconfig.php"); $confirm = $_GET['confirm']; if( $confirm == "yes" ) : $userid = $_GET['id']; $special = $_GET['s']; $hlnews = $_GET['h']; $ilnews = $_GET['i']; $ibnews = $_GET['b']; // now we need to set the confirmed field in phplist_user_user to 1 connect_database(); use_database(); $result = @mysql_query("SELECT * FROM phplist_user_user WHERE id=\"$userid\" "); if (!$result) { echo("Unable to update database at this time (7)."); exit(); } $row = mysql_fetch_array($result); $email = $row["email"]; $result = @mysql_query("UPDATE phplist_user_user SET confirmed=1 WHERE id=\"$userid\" "); if (!$result) { echo("Unable to update database at this time (8)."); exit(); } $subscription = ""; $message = ""; if( $s == "yes" ) { $subscription = $subscription . PROMOS . EOLHTML . EOLHTML; $message = $message . PROMOS . EOL; } if( $h == "yes" ) { $subscription = $subscription . HEALTH . EOLHTML . EOLHTML; $message = $message . HEALTH . EOL; } if( $i == "yes" ) { $subscription = $subscription . LIFESTYLES . EOLHTML . EOLHTML; $message = $message . LIFESTYLES . EOL; } if( $b == "yes" ) { $subscription = $subscription . BIZNEWS . EOLHTML . EOLHTML;\ $message = $message . BIZNEWS . EOL; } mail($sysemail, "Subscription Confirmed!"," A visitor at $email just confirmed subscription(s) to $message ","From: $email"); ?> Thank You for Subscribing

Thank You!

You are successfully subscribed to:

Thank You for Visiting

You have subscribed to:

"); store_in_table(NEWS, $newuser); // Save in NEWS table $partial = $partial . "&s=yes"; $subscriptions = $subscriptions . PROMOS . EOL; } if( $hlnews == "yes" ) { echo("* " . HEALTH . "
"); store_in_table(HEALTHYLIFESTYLE, $newuser); // Save in HEALTHYLIFESTYLE table $partial = $partial . "&h=yes"; $subscriptions = $subscriptions . HEALTH . EOL; } if( $ilnews == "yes" ) { echo("* " . LIFESTYLES . "
"); store_in_table(INSPIREDLIFESTYLE, $newuser); // Save in INSPIREDLIFESTYLE table $partial = $partial . "&i=yes"; $subscriptions = $subscriptions . LIFESTYLES . EOL; } if( $ibnews == "yes" ) { echo("* " . BIZNEWS . "
"); store_in_table(BIZ, $newuser); // Save in BIZ table $partial = $partial . "&b=yes"; $subscriptions = $subscriptions . BIZNEWS . EOL; } ?>

Please check your inbox for a confirmation email. When you click on the link in that email, your subscription(s) will be confirmed. If you do not wish to be subscribed, you need do nothing.

Thank You!

 

Thank you for visiting .
We hope we've uplifted your day.

YES      NO    Add to my favorites
YES      NO    Send me periodical news about Special Promotions, Updates and Announcements
NEWSLETTER SUBSCRIPTIONS:
YES      NO    Subscribe to Healthy Lifestyle News.
Get monthly articles, tidbits, resources and products to help you
live a healthier, more vibrant, youthful life.
YES      NO    Subscribe to Inspired Lifestyles Newsletter.
Get a monthly shot of inspiring, motivating
and empowering quotes, stories, articles & tidbits.
YES      NO    Subscribe to Inspired Biz News.
Get monthly articles, stories, tidbits and resources to create
a more spiritual, whole-living, balanced work environment.

   Your Name
   Email Address

Please press only once - and have patience! Thank you.

Back

"); exit(); } $row = mysql_fetch_array($result); $test = $row["email"]; if( $test == $email ) { // meaning that the user already exists $userid = $row['id']; // now delete all subscriptions for that email adr, as new ones are coming in $result = @mysql_query("DELETE FROM phplist_listuser WHERE userid=$userid "); return $userid; } $enterdate = date("Y-m-d G:i:00"); // 2003-09-11 15:07:04 $modified = time(); // timestamp - 20030911150751 $id = md5(uniqid(mt_rand())); // this should be unique // make sure it isn't there already $req = "SELECT id FROM phplist_user_user WHERE uniqid = \"$id\" "; if( !@mysql_query($req) ) { echo("Unable to update database at this time (5)."); echo("

Back

"); exit(); } while ( @mysql_affected_rows() ) : $id = md5(uniqid(mt_rand())); // if there, do it again $req = "SELECT id FROM phplist_user_user WHERE uniqid = \"$id\" "; if( !@mysql_query($req) ) { echo("Unable to update database at this time (6)."); echo("

Back

"); exit(); } endwhile; $uniqid = $id; // Like 9ce7f9e9331ba2edb1443ae327c70105 $sql = "INSERT INTO phplist_user_user SET email='$email', confirmed=0, bouncecount=0, htmlemail=1, entered='$enterdate', modified=$modified, uniqid='$uniqid' "; if (!@mysql_query($sql)) { echo("Unable to update database at this time (1)."); echo("

Back

"); exit(); } $userid = mysql_insert_id(); // pick up the auto id from the last INSERT $sql2 = "INSERT INTO phplist_user_user_attribute SET attributeid=1, userid=$userid, value='$name' "; if (!@mysql_query($sql2)) { echo("Unable to update database at this time (3)."); echo("

Back

"); exit(); } return $userid; } function store_in_table($which, $userid) { connect_database(); use_database(); $enterdate = date("Y-m-d G:i:00"); // 2003-09-11 15:07:04 $modified = time(); // timestamp - 20030911150751 $sql1 = "INSERT INTO phplist_listuser SET userid=$userid, listid=$which, entered='$enterdate', modified=$modified "; if (!@mysql_query($sql1)) { echo("Unable to update database at this time (2)."); echo("

Back

"); exit(); } return; } function connect_database() { $dbcnx = @mysql_connect("localhost", "root", "basak1"); if (!$dbcnx) { echo("Unable to connect to the database server at this time."); echo("

Back

"); exit(); } return; } function use_database() { if (!@mysql_select_db("inspiredliving")) { echo("Unable to locate the inspiredliving database at this time."); echo("

Back

"); exit(); } } ?>