ob_start(); ?>
//++++++++++++++++++++++++++++++ Configuration ++++++++++++++++++++++++++++++++++
/*** mysql hostname ***/
$hostname = 'stl1410201380271.db.8642939.hostedresource.com';
$username = 'stl1410201380271';
$password = '0b6096ad4906';
$dbname = 'stl1410201380271';
$dbh = new PDO("mysql:host=$hostname;dbname=$dbname", $username, $password);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
session_start();
//--------------------------------------------------------------------------------------
if (isset($_POST['update_renewal'])) {
$name = mysql_real_escape_string($_GET['dn']);
$uid = mysql_real_escape_string($_GET['user_id']);
$status = mysql_real_escape_string($_GET['status']);
$membership_type = $_POST['membership_type'];
if ($status == 'inactive'){
$startdate = date("Y-m-d");
$enddate = date('Y-m-d',strtotime(date("Y-m-d", mktime()) . " + 365 day"));
if ($membership_type == 'HONORARY') {
$team_name = $_POST['team_name'];
$membership_amount = 0.00;
$pm_id = 7;
}
if ($membership_type == 'BOD') {
$membership_amount = 0.00;
$pm_id = 6;
}
if ($membership_type == 'INDIVIDUAL') {
$membership_amount = '25.00';
$pm_id = 1;
}
if ($membership_type == 'FAMILY') {
$membership_amount = '50.00';
$pm_id = 2;
}
if ($membership_type == 'BUSINESS1') {
$membership_amount = '100.00';
$pm_id = 3;
}
if ($membership_type == 'BUSINESS2') {
$membership_amount = '200.00';
$pm_id = 4;
}
echo "Membership Amount: $".$membership_amount;
echo "
"; // Prep ready to update record $user_id = $uid; $status = 'active'; $initial_payment = $membership_amount; $billing_amount = $membership_amount; $membership_id = $pm_id; $startdate; $enddate; $dbh->exec("UPDATE wp_pmpro_memberships_users SET membership_id = '$membership_id', status = '$status', initial_payment = '$initial_payment', billing_amount = '$billing_amount', startdate = '$startdate', enddate = '$enddate' WHERE user_id = $user_id"); $sql = "SELECT * FROM wp_users WHERE ID = $uid"; foreach ($dbh->query($sql) as $row) { $email = $row['user_email']; $user_login = $row['user_login']; } $to = $email; $subject = 'SLBS Membership Renewal Information'; $message = 'Thank you for Renewing your St. Louis BBQ Society membership, your USERNAME = '.$user_login.' / your PASSWORD = slbs2014. To log in please visit the following link http://stlouisbbqsociety.com/wp-login.php. '; $headers = 'From: info@stlouisbbqsociety.com' . "rn" . 'Reply-To: info@stlouisbbqsociety.com' . "rn" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); //Destroy the session. session_destroy(); $name = ''; $uid = ''; $status = ''; echo ""."User has been Updated".""; /*** close the database connection ***/ $dbh = null; } } if ($status == 'active'){ $enddate = date('Y-m-d',strtotime(date("Y-m-d", mktime()) . " + 365 day")); if ($membership_type == 'HONORARY') { $team_name = $_POST['team_name']; $membership_amount = 0.00; $pm_id = 7; } if ($membership_type == 'BOD') { $membership_amount = 0.00; $pm_id = 6; } if ($membership_type == 'INDIVIDUAL') { $membership_amount = '25.00'; $pm_id = 1; } if ($membership_type == 'FAMILY') { $membership_amount = '50.00'; $pm_id = 2; } if ($membership_type == 'BUSINESS1') { $membership_amount = '100.00'; $pm_id = 3; } if ($membership_type == 'BUSINESS2') { $membership_amount = '200.00'; $pm_id = 4; } echo "Membership Amount: $".$membership_amount; echo "
"; // Prep ready to update record $user_id = $uid; $status = 'active'; $initial_payment = $membership_amount; $billing_amount = $membership_amount; $membership_id = $pm_id; $startdate; $enddate; $dbh->exec("UPDATE wp_pmpro_memberships_users SET membership_id = '$membership_id', status = '$status', initial_payment = '$initial_payment', billing_amount = '$billing_amount', enddate = '$enddate' WHERE user_id = $user_id"); $sql = "SELECT * FROM wp_users WHERE ID = $uid"; foreach ($dbh->query($sql) as $row) { $email = $row['user_email']; $user_login = $row['user_login']; } $to = $email; $subject = 'SLBS Membership Renewal Information'; $message = 'Thank you for Renewing your St. Louis BBQ Society membership, your USERNAME = '.$user_login.' / your PASSWORD = slbs2014. To log in please visit the following link http://stlouisbbqsociety.com/wp-login.php. '; $headers = 'From: info@stlouisbbqsociety.com' . "rn" . 'Reply-To: info@stlouisbbqsociety.com' . "rn" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); //Destroy the session. session_destroy(); $name = ''; $uid = ''; $status = ''; echo ""."User has been Updated".""; /*** close the database connection ***/ $dbh = null; } session_write_close() ?>
"; // Prep ready to update record $user_id = $uid; $status = 'active'; $initial_payment = $membership_amount; $billing_amount = $membership_amount; $membership_id = $pm_id; $startdate; $enddate; $dbh->exec("UPDATE wp_pmpro_memberships_users SET membership_id = '$membership_id', status = '$status', initial_payment = '$initial_payment', billing_amount = '$billing_amount', startdate = '$startdate', enddate = '$enddate' WHERE user_id = $user_id"); $sql = "SELECT * FROM wp_users WHERE ID = $uid"; foreach ($dbh->query($sql) as $row) { $email = $row['user_email']; $user_login = $row['user_login']; } $to = $email; $subject = 'SLBS Membership Renewal Information'; $message = 'Thank you for Renewing your St. Louis BBQ Society membership, your USERNAME = '.$user_login.' / your PASSWORD = slbs2014. To log in please visit the following link http://stlouisbbqsociety.com/wp-login.php. '; $headers = 'From: info@stlouisbbqsociety.com' . "rn" . 'Reply-To: info@stlouisbbqsociety.com' . "rn" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); //Destroy the session. session_destroy(); $name = ''; $uid = ''; $status = ''; echo ""."User has been Updated".""; /*** close the database connection ***/ $dbh = null; } } if ($status == 'active'){ $enddate = date('Y-m-d',strtotime(date("Y-m-d", mktime()) . " + 365 day")); if ($membership_type == 'HONORARY') { $team_name = $_POST['team_name']; $membership_amount = 0.00; $pm_id = 7; } if ($membership_type == 'BOD') { $membership_amount = 0.00; $pm_id = 6; } if ($membership_type == 'INDIVIDUAL') { $membership_amount = '25.00'; $pm_id = 1; } if ($membership_type == 'FAMILY') { $membership_amount = '50.00'; $pm_id = 2; } if ($membership_type == 'BUSINESS1') { $membership_amount = '100.00'; $pm_id = 3; } if ($membership_type == 'BUSINESS2') { $membership_amount = '200.00'; $pm_id = 4; } echo "Membership Amount: $".$membership_amount; echo "
"; // Prep ready to update record $user_id = $uid; $status = 'active'; $initial_payment = $membership_amount; $billing_amount = $membership_amount; $membership_id = $pm_id; $startdate; $enddate; $dbh->exec("UPDATE wp_pmpro_memberships_users SET membership_id = '$membership_id', status = '$status', initial_payment = '$initial_payment', billing_amount = '$billing_amount', enddate = '$enddate' WHERE user_id = $user_id"); $sql = "SELECT * FROM wp_users WHERE ID = $uid"; foreach ($dbh->query($sql) as $row) { $email = $row['user_email']; $user_login = $row['user_login']; } $to = $email; $subject = 'SLBS Membership Renewal Information'; $message = 'Thank you for Renewing your St. Louis BBQ Society membership, your USERNAME = '.$user_login.' / your PASSWORD = slbs2014. To log in please visit the following link http://stlouisbbqsociety.com/wp-login.php. '; $headers = 'From: info@stlouisbbqsociety.com' . "rn" . 'Reply-To: info@stlouisbbqsociety.com' . "rn" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); //Destroy the session. session_destroy(); $name = ''; $uid = ''; $status = ''; echo ""."User has been Updated".""; /*** close the database connection ***/ $dbh = null; } session_write_close() ?>
Start to typing to begin Search (Click on Name to Select) |
?> ob_flush(); ?>