|
Help for membership block code -
08-19-2008, 01:53 PM
I am trying to make a membership block that will indicate which of the three memberships a user has. I combined code from different places but am having trouble getting it to all work together. I think that I am close and would appreciate some advice or assistance as I am very new to making blocks.
The three memberships I have are "premium", "preview" and "basic".
The premium is when a member is subscribed to Nuke Royal and I am using the code from Nuke Royal.
The preview is when the member has a "1" in "nuke_users" "basic_membership" table.
The basic is when the "nuke_users" "basic_membership" is null in that table.
Here is the code I have so far:
if ($ispremium=$db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_premium_members_zone WHERE user_id='".$cookie[0]."'")) > 0)
{
$membership="Premium";
}
if ($db->sql_query("SELECT basic_membership FROM ".$prefix."_users WHERE user_id='".$cookie[0]."'") == 1)
{
$membership="Preview";
}
else
{
$membership="Basic";
}
$content .=$membership;
Last edited by California; 08-19-2008 at 01:58 PM.
|