RevCMS [PlusEMU] Auto give HC Subscription

Results 1 to 11 of 11
  1. #1
    R.I.P Millercent FatalLulz is offline
    MemberRank
    Nov 2012 Join Date
    AustraliaLocation
    2,248Posts

    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?
    Last edited by FatalLulz; 10-03-14 at 10:16 AM.


  2. #2
    R.I.P Millercent FatalLulz is offline
    MemberRank
    Nov 2012 Join Date
    AustraliaLocation
    2,248Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    -- bump --

  3. #3
    iiiiiiiiiii Brought is offline
    MemberRank
    Aug 2013 Join Date
    469Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Make the default in the database tables 1 instead of 0 for club_subscription or whatever

  4. #4
    R.I.P Millercent FatalLulz is offline
    MemberRank
    Nov 2012 Join Date
    AustraliaLocation
    2,248Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Quote Originally Posted by Brought View Post
    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.

  5. #5
    Valued Member D3T0XITY is offline
    MemberRank
    Aug 2011 Join Date
    121Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Make a welcome page that will give them a subscription

  6. #6
    R.I.P Millercent FatalLulz is offline
    MemberRank
    Nov 2012 Join Date
    AustraliaLocation
    2,248Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Quote Originally Posted by D3T0XITY View Post
    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.

  7. #7
    Hakuna Matata Matata is offline
    MemberRank
    Sep 2012 Join Date
    DenmarkLocation
    807Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Because $userid is 0 or an unsupported value.

  8. #8
    HostSavor.com Lewislol is offline
    MemberRank
    Jul 2013 Join Date
    498Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Put this in your client.php, it is tested.
    <?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')");
    }
    ?>

  9. #9
    Proficient Member Kristophers is offline
    MemberRank
    Dec 2013 Join Date
    198Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Any exploits in the code above?

  10. #10
    HostSavor.com Lewislol is offline
    MemberRank
    Jul 2013 Join Date
    498Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Quote Originally Posted by Kristophers View Post
    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.

  11. #11
    Proficient Member Kristophers is offline
    MemberRank
    Dec 2013 Join Date
    198Posts

    Re: RevCMS [PlusEMU] Auto give HC Subscription

    Well no need to use it anymore as there was a fix for HC



Advertisement