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
Software Development
Programming
Programming Q&A
php/html help
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="Weasel" data-source="post: 357930" data-attributes="member: 9520"><p>This was some of the worst coding ever. As I saw "totalresolves", enjoy scriptkid. Next time, when you open a if statement (!$key), also close it at the end of the page. Look up the errors PHP gives you.</p><p>[PHP]<?php</p><p></p><p>if ($_SESSION['user']['rank'] >= 1)</p><p>{</p><p> $key = false;</p><p> $error = false;</p><p> $query = mysql_query("SELECT * FROM users WHERE id = '{$_SESSION['user']['id']}' AND account_locked = '1' LIMIT 1") or die(mysql_error());</p><p></p><p> if (mysql_num_rows($query) == 1)</p><p> {</p><p> echo "This account has been locked. Please contact Joe immediately.";</p><p> exit;</p><p> }</p><p>}</p><p></p><p>if (isset($_POST['pin']))</p><p>{</p><p> $q = mysql_query("SELECT id FROM users WHERE id = '{$_SESSION['user']['id']}' AND housekeeping_pin = '" . md5($_POST['pin']) . "' AND account_locked = '0' LIMIT 1") or die(mysql_error());</p><p></p><p> if (mysql_num_rows($q) != 1)</p><p> {</p><p> if (!isset($_SESSION['client']['attempts']))</p><p> {</p><p> $_SESSION['client']['attempts'] = 0;</p><p> }</p><p> </p><p> $_SESSION['client']['attempts']++;</p><p> </p><p> if ($_SESSION['client']['attempts'] >= 999999999)</p><p> {</p><p> mysql_query("UPDATE users SET account_locked = '1' WHERE id = '{$_SESSION['user']['id']}' LIMIT 1") or die(mysql_error());</p><p> }</p><p></p><p> $error = true;</p><p> }</p><p> else</p><p> {</p><p> $key = true;</p><p> }</p><p>}</p><p></p><p>if (!$key)</p><p>{</p><p>?></p><p><html></p><p> <head></p><p> <title>Nebbo Hotel</title></p><p></p><p> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"></p><p> <link href="animate.css" rel="stylesheet" type="text/css" /></p><p></p><p> <script src='https://www.google.com/recaptcha/api.js'></script></p><p> <script src="https://code.jquery.com/jquery-2.1.4.js"></script></p><p></p><p> </script></p><p> <script src="https://code.jquery.com/jquery-2.1.4.js"></script></p><p> </head></p><p> <body></p><p> <!--<div class="redalert"></p><p> <div class="redmessage"><b>Keep calm and play on</b>, people are trying to <b>hack</b> us and <b>DDoS</b> us right now. It won't affect anything. Promise Enjoy:)</b></div></p><p> </div>--></p><p> <div class="logo"><div class="animated bounceInDown"><img src="http://nebbo.org/app/tpl/skins/Habbo/images/logo.png"></div></div></p><p></p><p> <div class="totalresolvers"></p><p> <form action="#" class="cleanForm" method="POST" autocomplete="off"></p><p> <div class="column"></p><p> <input type="password" name="password" placeholder="" maxlength="12" autocomplete="off" /></p><p></p><p> <input type="submit" value="submit"/></p><p></p><p> </form></p><p> </div></p><p></p><p></p><p> <div class="thold"><div class="tholdtext">Please enter '1234' above to verify you're a human being.</div></div></p><p> </div></p><p></p><p></p><p></p><p></p><p></p><p> <div class="line"></p><p> </div></p><p></p><p> <!--<script></p><p> $("#nav").hover(function(){</p><p> $('.redalert').fadeOut(5);</p><p> });</p><p> </script></p><p></p><p> <script></p><p> $("#nav").mouseleave(function(){</p><p> $('.redalert').fadeIn(500);</p><p> });</p><p> </script></p><p> --></p><p> </body></p><p></html></p><p><?php</p><p>}</p><p>?>[/PHP]</p></blockquote><p></p>
[QUOTE="Weasel, post: 357930, member: 9520"] This was some of the worst coding ever. As I saw "totalresolves", enjoy scriptkid. Next time, when you open a if statement (!$key), also close it at the end of the page. Look up the errors PHP gives you. [PHP]<?php if ($_SESSION['user']['rank'] >= 1) { $key = false; $error = false; $query = mysql_query("SELECT * FROM users WHERE id = '{$_SESSION['user']['id']}' AND account_locked = '1' LIMIT 1") or die(mysql_error()); if (mysql_num_rows($query) == 1) { echo "This account has been locked. Please contact Joe immediately."; exit; } } if (isset($_POST['pin'])) { $q = mysql_query("SELECT id FROM users WHERE id = '{$_SESSION['user']['id']}' AND housekeeping_pin = '" . md5($_POST['pin']) . "' AND account_locked = '0' LIMIT 1") or die(mysql_error()); if (mysql_num_rows($q) != 1) { if (!isset($_SESSION['client']['attempts'])) { $_SESSION['client']['attempts'] = 0; } $_SESSION['client']['attempts']++; if ($_SESSION['client']['attempts'] >= 999999999) { mysql_query("UPDATE users SET account_locked = '1' WHERE id = '{$_SESSION['user']['id']}' LIMIT 1") or die(mysql_error()); } $error = true; } else { $key = true; } } if (!$key) { ?> <html> <head> <title>Nebbo Hotel</title> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"> <link href="animate.css" rel="stylesheet" type="text/css" /> <script src='https://www.google.com/recaptcha/api.js'></script> <script src="https://code.jquery.com/jquery-2.1.4.js"></script> </script> <script src="https://code.jquery.com/jquery-2.1.4.js"></script> </head> <body> <!--<div class="redalert"> <div class="redmessage"><b>Keep calm and play on</b>, people are trying to <b>hack</b> us and <b>DDoS</b> us right now. It won't affect anything. Promise Enjoy:)</b></div> </div>--> <div class="logo"><div class="animated bounceInDown"><img src="http://nebbo.org/app/tpl/skins/Habbo/images/logo.png"></div></div> <div class="totalresolvers"> <form action="#" class="cleanForm" method="POST" autocomplete="off"> <div class="column"> <input type="password" name="password" placeholder="" maxlength="12" autocomplete="off" /> <input type="submit" value="submit"/> </form> </div> <div class="thold"><div class="tholdtext">Please enter '1234' above to verify you're a human being.</div></div> </div> <div class="line"> </div> <!--<script> $("#nav").hover(function(){ $('.redalert').fadeOut(5); }); </script> <script> $("#nav").mouseleave(function(){ $('.redalert').fadeIn(500); }); </script> --> </body> </html> <?php } ?>[/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
php/html help
Top