My Account Status

profile_account_type;
$goodThru = $user->profile_good_thru;
$parts = explode(‘-‘, $goodThru);
$canRenewTime = mktime(0,0,0,$parts[1]-3,$parts[2],$parts[0]);

if ($user->profile_account_type != ‘S’ && $user->profile_account_type != ‘M’)
{
$output = ‘Account Type:
   Registered Web User

Do you want to
    Apply for Membership? or
    Subscribe to JETS?

‘;
}
else if (!is_current() && $user->profile_account_type == ‘S’)
{
$output .= ‘Subscription is:&nbspExpired‘;
$output .= “
   Expired: $user->profile_good_thru”;
$output .= ‘
   Renew Subscription

‘;
}
else if (!is_current() && $user->profile_account_type == ‘M’)
{
$output .= ‘Membership is:&nbspExpired‘;
$output .= “
   Expired: $user->profile_good_thru”;
$output .= ‘
   Renew Membership

‘;

}
else if ( time() >= $canRenewTime && $user->profile_account_type == ‘S’)
{
$output .= ‘Subscription is:  Ready to Renew‘;
$output .= “
   Expires: $user->profile_good_thru”;
$output .= ‘
   Renew Subscription

‘;
}
else if ( time() >= $canRenewTime && $user->profile_account_type == ‘M’)
{
$output .= ‘Membership is:    Ready to Renew‘;
$output .= “
   Expires: $user->profile_good_thru”;
$output .= ‘
   Renew Membership

‘;
}
else if (is_current() && $user->profile_account_type== ‘M’)
{
$output .= ‘Membership is:  Current
‘;
$output .= ”     Expires: $user->profile_good_thru

“;
}
else if (is_current() && $user->profile_account_type== ‘S’)
{
$output .= ‘Subscription is:  Current
‘;
$output .= ”    Expires: $user->profile_good_thru

“;
}

//Membership Type
if ($user->profile_account_subtype == ‘Full Membership’)
{
$output .=’Membership Level:
   Full

‘;
}
else if ($user->profile_account_subtype== ‘Full Membership (Retired)’)
{
$output .= ‘Membership Level:
   Full (Retired)

‘;
}
else if ($user->profile_account_subtype == ‘Associate Membership’)
{
$output .= ‘Membership Level:
   Associate

‘;
}
else if ($user->profile_account_subtype == ‘Associate Membership (Retired)’)
{
$output .= ‘Membership Level:
   Associate (Retired)

‘;
}
else if ($user->profile_account_subtype == ‘Student Membership’)
{
$output .= ‘Membership Level:
   Student

‘;
}
else
{
$output .=”;
}

//get conference status
$res = db_query(“SELECT cid FROM conference WHERE uid={$user->uid}”);
if (mysqli_num_rows($res))
{
$output .= ‘Annual Meeting Registration:
   Registered‘;
}
else
{
$output .= ‘Annual Meeting Registration:
   Not Registered
‘.’    Register for the Meeting‘;
}
print $output;

?>