Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Credits for voting?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JayC" data-source="post: 341537" data-attributes="member: 36373"><p>When they vote , they get redirected to a secret page, which redirects them back to client. On the secret page just few lines of code:</p><p>[PHP]</p><p><?php</p><p>$amount = 5000;</p><p>$lastTime = mysql_fetch_assoc(mysql_query("SELECT lastGiven FROM user_rewards WHERE username='".$_SESSION['user']['username']."'"));</p><p>if(mysql_num_rows($lastTime) < 1){</p><p>mysql_query("INSERT INTO user_rewards (lastGiven, username) VALUES ('".time()."', '".$_SESSION['user']['username']."')");</p><p>mysql_query("UPDATE users SET `credits` = (`credits` + '".$amount."') WHERE username='".$_SESSION['user']['username']."'");</p><p>mysql_query("UPDATE user_rewards SET lastGiven = '".time()."' WHERE username='".$_SESSION['user']['username']."'");</p><p>}</p><p>if((date(H, $lastTime) - time()) > 23){</p><p>mysql_query("UPDATE users SET `credits` = (`credits` + '".$amount."') WHERE username='".$_SESSION['user']['username']."'");</p><p>mysql_query("UPDATE user_rewards SET lastGiven = '".time()."' WHERE username='".$_SESSION['user']['username']."'");</p><p>}</p><p>header(Location: "/client");</p><p>?></p><p>[/PHP]</p><p>And Create This Table:</p><p>user_rewards</p><p>lastGiven -> Timestamp (Length 0 , Decimal 0)</p><p>username -> Varchar (Length 50, Decimal 0)</p><p></p><p>Okay. Rest is up to you ! This is just something I coded real fast.</p></blockquote><p></p>
[QUOTE="JayC, post: 341537, member: 36373"] When they vote , they get redirected to a secret page, which redirects them back to client. On the secret page just few lines of code: [PHP] <?php $amount = 5000; $lastTime = mysql_fetch_assoc(mysql_query("SELECT lastGiven FROM user_rewards WHERE username='".$_SESSION['user']['username']."'")); if(mysql_num_rows($lastTime) < 1){ mysql_query("INSERT INTO user_rewards (lastGiven, username) VALUES ('".time()."', '".$_SESSION['user']['username']."')"); mysql_query("UPDATE users SET `credits` = (`credits` + '".$amount."') WHERE username='".$_SESSION['user']['username']."'"); mysql_query("UPDATE user_rewards SET lastGiven = '".time()."' WHERE username='".$_SESSION['user']['username']."'"); } if((date(H, $lastTime) - time()) > 23){ mysql_query("UPDATE users SET `credits` = (`credits` + '".$amount."') WHERE username='".$_SESSION['user']['username']."'"); mysql_query("UPDATE user_rewards SET lastGiven = '".time()."' WHERE username='".$_SESSION['user']['username']."'"); } header(Location: "/client"); ?> [/PHP] And Create This Table: user_rewards lastGiven -> Timestamp (Length 0 , Decimal 0) username -> Varchar (Length 50, Decimal 0) Okay. Rest is up to you ! This is just something I coded real fast. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Credits for voting?
Top