RevCMS [PlusEMU] Auto give HC Subscription
Hey,
I've ran this code for when a user registers;
Code:
$engine->query("INSERT INTO user_subscriptions (user_id, subscription_id, timestamp_activated, timestamp_expire) VALUES ('" . $userid . "', '" . $userid . "', '1376239398', '1735689630')");
Unfortunately when it's entered into the DB it says that the user ID is 0 and subscription ID is 0..
Any ideas why it's coming up like that?
Re: RevCMS [PlusEMU] Auto give HC Subscription
Re: RevCMS [PlusEMU] Auto give HC Subscription
Make the default in the database tables 1 instead of 0 for club_subscription or whatever
Re: RevCMS [PlusEMU] Auto give HC Subscription
Quote:
Originally Posted by
Brought
Make the default in the database tables 1 instead of 0 for club_subscription or whatever
Well if it was that easy I would have done that, but unfortunately it's not so.
Still need help with this.
Re: RevCMS [PlusEMU] Auto give HC Subscription
Make a welcome page that will give them a subscription
Re: RevCMS [PlusEMU] Auto give HC Subscription
Quote:
Originally Posted by
D3T0XITY
Make a welcome page that will give them a subscription
Or not. Welcome pages are useless and boring. Not a must have or need have.
Re: RevCMS [PlusEMU] Auto give HC Subscription
Because $userid is 0 or an unsupported value.
Re: RevCMS [PlusEMU] Auto give HC Subscription
Put this in your client.php, it is tested.
Quote:
<?php
$getSubscription = mysql_query("SELECT * FROM user_subscriptions WHERE user_id = '".$_SESSION['user']['id']."'");
if (mysql_num_rows($getSubscription) == 0)
{
mysql_query("INSERT INTO user_subscriptions (user_id, subscription_id, timestamp_activated, timestamp_expire) VALUES ('".$_SESSION['user']['id']."', '1', '".time()."', '1503071255')");
}
?>
Re: RevCMS [PlusEMU] Auto give HC Subscription
Any exploits in the code above?
Re: RevCMS [PlusEMU] Auto give HC Subscription
Quote:
Originally Posted by
Kristophers
Any exploits in the code above?
No, I used this on my old hotel for 3 months if there was a exploit my hotel would of been exploited.
Re: RevCMS [PlusEMU] Auto give HC Subscription
Well no need to use it anymore as there was a fix for HC