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
Div Container
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="Kryptos" data-source="post: 74766" data-attributes="member: 540"><p>... <img src="/styles/default/xenforo/smilies/facepalm.gif" class="smilie" loading="lazy" alt="facepalm.jpg" title="Facepalm facepalm.jpg" data-shortname="facepalm.jpg" /></p><p>[MOD] Thread moved to Habbo Help section. It's not RevCMS, it's uberCMS. [/MOD]</p><p> </p><p>OT:</p><p>Here it is</p><p>[CODE]</p><p><div class="habblet-container" style="padding: 5px;"></p><p> <div class="cbb clearfix blue" style="margin-top:5px;"></p><p> <h2 class="title">Who are these people?</h2></p><p> </p><p> <?php</p><p>$user_has = mysql_num_rows(mysql_query("SELECT * FROM items WHERE base_item = '1145' AND user_id = '" . USER_ID ."' AND room_id = '0'"));</p><p>if(mysql_result(mysql_query("SELECT online FROM users WHERE id = '" . USER_ID . "'"), 0) == 1)</p><p>{</p><p> echo '<div class="rounded rounded-red" width="20%"></p><p> Please close your game client before using this page.<br /></p><p> </div></p><p> <div>&nbsp;</div>';</p><p>}</p><p>else</p><p>{</p><p> if(isset($_POST["REDEEM"]))</p><p> {</p><p> </p><p> $derp = filter($_POST["amt"]);</p><p> </p><p> $length = strlen($derp);</p><p> $amt = '';</p><p> for($i = 0; $i < $length; $i++)</p><p> {</p><p> $temp = ord(substr($derp, $i, 1));</p><p> </p><p> if($temp > 47 && $temp < 58)</p><p> $amt .= chr($temp);</p><p> }</p><p> </p><p> if(strlen($amt) == 0) $amt = 0;</p><p> </p><p> $amt_rd = $amt * 500;</p><p> if($amt == 0) {</p><p> define('ERROR', '<div class="rounded rounded-red" width="20%"></p><p> You need to type a number.<br /></p><p> </div></p><p> <div>&nbsp;</div>'); } </p><p> if($amt > 150) {</p><p> define('ERROR', '<div class="rounded rounded-red" width="20%"></p><p> You cannot redeem more than 150 gold bars at a time for security reasons.<br /></p><p> </div></p><p> <div>&nbsp;</div>'); }</p><p> if($user_has < $amt)</p><p> {</p><p> define('ERROR', '<div class="rounded rounded-red" width="20%"></p><p> You do not have this many Gold Bars in your hand to redeem.<br /></p><p> </div></p><p> <div>&nbsp;</div>');</p><p> }</p><p> else</p><p> {</p><p> define('SUCCESS', '<div class="rounded rounded-green" width="20%"></p><p> You successfully redeemed ' . $amt . ' Gold Bars for ' . $amt_rd . ' credits. <br /></p><p> </div></p><p> <di v>&nbsp;</div>');</p><p> mysql_query("DELETE FROM items WHERE user_id = '" . USER_ID . "' AND base_item = '1145' AND room_id = '0' LIMIT " . $amt . "");</p><p> mysql_query("UPDATE users SET credits = credits + '" . $amt_rd . "' WHERE id = '" . USER_ID . "'");</p><p> $user_has = mysql_num_rows(mysql_query("SELECT * FROM items WHERE base_item = '1145' AND user_id = '" . USER_ID ."' AND room_id = '0'"));</p><p> }</p><p> }</p><p> if(defined('ERROR')) { echo ERROR; } elseif(defined('SUCCESS')){ echo SUCCESS; }</p><p>?></p><p><img src='images/goldbar.png' align='left'>You have <b><?php echo $user_has; ?></b> Goldbars in your hand.<br /><br /><br /><br /></p><p><form method="post"></p><p>How many Gold Bars do you wish to redeem?<br /></p><p><input type="text" name="amt" /><br /></p><p><br /></p><p><input type="submit" value="Exchange Goldbars" name="REDEEM" /></p><p></form></p><p><?php</p><p>}</p><p>?></p><p> </p><p> </div></p><p> </div>[/CODE]</p><p> </p><p>tsk tsk</p></blockquote><p></p>
[QUOTE="Kryptos, post: 74766, member: 540"] ... facepalm.jpg [MOD] Thread moved to Habbo Help section. It's not RevCMS, it's uberCMS. [/MOD] OT: Here it is [CODE] <div class="habblet-container" style="padding: 5px;"> <div class="cbb clearfix blue" style="margin-top:5px;"> <h2 class="title">Who are these people?</h2> <?php $user_has = mysql_num_rows(mysql_query("SELECT * FROM items WHERE base_item = '1145' AND user_id = '" . USER_ID ."' AND room_id = '0'")); if(mysql_result(mysql_query("SELECT online FROM users WHERE id = '" . USER_ID . "'"), 0) == 1) { echo '<div class="rounded rounded-red" width="20%"> Please close your game client before using this page.<br /> </div> <div> </div>'; } else { if(isset($_POST["REDEEM"])) { $derp = filter($_POST["amt"]); $length = strlen($derp); $amt = ''; for($i = 0; $i < $length; $i++) { $temp = ord(substr($derp, $i, 1)); if($temp > 47 && $temp < 58) $amt .= chr($temp); } if(strlen($amt) == 0) $amt = 0; $amt_rd = $amt * 500; if($amt == 0) { define('ERROR', '<div class="rounded rounded-red" width="20%"> You need to type a number.<br /> </div> <div> </div>'); } if($amt > 150) { define('ERROR', '<div class="rounded rounded-red" width="20%"> You cannot redeem more than 150 gold bars at a time for security reasons.<br /> </div> <div> </div>'); } if($user_has < $amt) { define('ERROR', '<div class="rounded rounded-red" width="20%"> You do not have this many Gold Bars in your hand to redeem.<br /> </div> <div> </div>'); } else { define('SUCCESS', '<div class="rounded rounded-green" width="20%"> You successfully redeemed ' . $amt . ' Gold Bars for ' . $amt_rd . ' credits. <br /> </div> <di v> </div>'); mysql_query("DELETE FROM items WHERE user_id = '" . USER_ID . "' AND base_item = '1145' AND room_id = '0' LIMIT " . $amt . ""); mysql_query("UPDATE users SET credits = credits + '" . $amt_rd . "' WHERE id = '" . USER_ID . "'"); $user_has = mysql_num_rows(mysql_query("SELECT * FROM items WHERE base_item = '1145' AND user_id = '" . USER_ID ."' AND room_id = '0'")); } } if(defined('ERROR')) { echo ERROR; } elseif(defined('SUCCESS')){ echo SUCCESS; } ?> <img src='images/goldbar.png' align='left'>You have <b><?php echo $user_has; ?></b> Goldbars in your hand.<br /><br /><br /><br /> <form method="post"> How many Gold Bars do you wish to redeem?<br /> <input type="text" name="amt" /><br /> <br /> <input type="submit" value="Exchange Goldbars" name="REDEEM" /> </form> <?php } ?> </div> </div>[/CODE] tsk tsk [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Div Container
Top