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 Releases
CMS Releases
[Release] Staff Pin System for the client
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="Central" data-source="post: 377705" data-attributes="member: 57042"><p>Hello, I have stumbled across with this Staff Pin System and decided to release it.</p><p></p><p>All you have to do is follow the following steps:</p><ul> <li data-xf-list-type="ul">With the code's you will see below you will need to edit them</li> <li data-xf-list-type="ul">The code marked <strong>bottom of the client.php file </strong>you will need to change <strong>mysql password </strong>to your mysql password</li> <li data-xf-list-type="ul">As well as changing <strong>mysql database name </strong>with your database name</li> <li data-xf-list-type="ul">Once completed those, please add that code to the bottom of the client.php, add it after <strong><div class="client"></div> </strong>or something along the lines as this.</li> <li data-xf-list-type="ul">Go to <strong>app/tpl/skins/SKINFOLDER/ </strong>and make a new php file and name it spk, and add the contents of the spk code from this topic into there.</li> <li data-xf-list-type="ul">Go to your database, right click the table <strong>users </strong>and click Design Table (only if you are using Navicat) and add a new field, this field should be called <strong>staff_pin </strong>and you will just need to save it, if it says you havent filled anything in, put the type as Varchar and the limit or something as 255.</li> </ul><p>[SPOILER="Bottom of the Client.php file"]</p><p><style> body {</p><p> background-color: #212121;</p><p>} </p><p> </p><p> form {</p><p> position:absolute;</p><p> top:30%;</p><p> right:0;</p><p> left:0;</p><p> text-align: center;</p><p> }</p><p> </p><p> select {</p><p> background-image: url('<a href="http://i.imgur.com/yokKfHN.png');" target="_blank">http://i.imgur.com/yokKfHN.png');</a></p><p> background-size: 150px 150px;</p><p> height: 160px;</p><p> width: 130px;</p><p> font-size: 50px;</p><p> text-indent: 40%;</p><p> color: orange;</p><p> border: none;</p><p> border-radius: 10px;</p><p> text-align: center</p><p>}</p><p></p><p> select:focus,</p><p> input:focus {</p><p> outline: none;</p><p> }</p><p></p><p> input {</p><p> color: orange;</p><p> background-color: transparent;</p><p> border: 1px solid orange;</p><p> height: 100px;</p><p> width: 100px;</p><p> border-radius: 100%;</p><p> font-size: 50px;</p><p> </p><p> }</p><p> </p><p> select:hover {</p><p> color: darkorange;</p><p> }</p><p> </p><p> input:hover {</p><p> color: darkorange;</p><p> border: 1px solid darkorange;</p><p> }</style></p><p> <?php $connect = mysql_connect("localhost", "root", "my sql password"); mysql_select_db("mysql database name", $connect); $username = $_SESSION["user"]["username"]; $query = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'"); if(mysql_num_rows($query) == 1) {</p><p> $row = mysql_fetch_assoc($query); $rank = $row["rank"]; if($rank >= 2 && !isset($_SESSION["correct_key"])) { ?></p><p> <form action='spk' method='post'> <select name='first'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select> <select name='second'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select> <select name='third'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select> <select name='fourth'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select><br /> <input type='submit' name='staff_key' value='Go' /> </form> <?php exit; } }else { die("Sorry, something went wrong with your account, apparently you do not exist, please try logging in."); } ?></p><p> </body></div></p><p> </p><p>[/SPOILER]</p><p></p><p>[SPOILER="spk.php"]</p><p><?php</p><p> session_start(); $username = strip_tags(stripslashes(mysql_real_escape_string($_SESSION["user"]["username"]))); $connect = mysql_connect("localhost", "root", "$wqoiwqwqs"); mysql_select_db("fixeddb", $connect); $first = strip_tags(stripslashes(mysql_real_escape_string($_POST["first"]))); $second = strip_tags(stripslashes(mysql_real_escape_string($_POST["second"]))); $third = strip_tags(stripslashes(mysql_real_escape_string($_POST["third"]))); $fourth = strip_tags(stripslashes(mysql_real_escape_string($_POST["fourth"]))); $key = $first."".$second."".$third."".$fourth; if(is_numeric($key)) { $query = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'"); $row = mysql_fetch_assoc($query); $valid_key = $row["staff_pin"]; if($key == $valid_key) { session_start(); $_SESSION["correct_key"] = $key; }else{ die("Incorrect Key!"); } }else { die("Key must be 4 numbers..."); }</p><p>?></p><p><style></p><p> body {</p><p> background-color: #212121;</p><p> }</p><p> </p><p> #container {</p><p> position: absolute;</p><p> width: 600px;</p><p> height: 172px;</p><p> margin: auto;</p><p> position: absolute;</p><p> top: 0; left: 0; bottom: 0; right: 0;</p><p> </p><p> }</p><p> </p><p> #main {</p><p> width: 500px;</p><p> text-align: center;</p><p> height: 70px;</p><p> padding: 10px;</p><p> background-color: #333333;</p><p> border: 1px solid orange;</p><p> margin: 0 auto;</p><p> }</p><p> </p><p> #main h1 {</p><p> color: orange;</p><p> font-size: 20px;</p><p> font-family: sans-serif;</p><p> }</p><p> </p><p> </p><p> #nav {</p><p> box-sizing: border-box;</p><p> border: 1px solid orange;</p><p> width: 200px;</p><p> height: 50px;</p><p> background-color: #333333;</p><p> text-align: center;</p><p> margin: 30 auto;</p><p> }</p><p> </p><p> #nav h2,</p><p> #nav a {</p><p> text-decoration: none;</p><p> color: orange;</p><p> font-size: 20px;</p><p> font-family: sans-serif;</p><p> line-height: 20px;</p><p> }</p><p> </p><p> #nav:hover,</p><p> #main:hover {</p><p> border: 1px solid darkorange;</p><p> }</p><p> </p><p> #main h1:hover,</p><p> #nav h2:hover {</p><p> color: darkorange;</p><p> }</p><p></style></p><p></p><p><div id="container"></p><p><div id="main"></p><p> <h1>You have entered your staff pin correctly! Click the button to go back to the client!</h1></p><p></div></p><p><div id="nav"></p><p> <a href="{url}/client"><h2>Enter Client</h2></a></p><p></div></p><p></div></p><p>[/SPOILER]</p><p></p><p><strong>Screenshot</strong></p><p><strong><img src="http://i.imgur.com/0a9vN0a.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </strong></p></blockquote><p></p>
[QUOTE="Central, post: 377705, member: 57042"] Hello, I have stumbled across with this Staff Pin System and decided to release it. All you have to do is follow the following steps: [LIST] [*]With the code's you will see below you will need to edit them [*]The code marked [B]bottom of the client.php file [/B]you will need to change [B]mysql password [/B]to your mysql password [*]As well as changing [B]mysql database name [/B]with your database name [*]Once completed those, please add that code to the bottom of the client.php, add it after [B]<div class="client"></div> [/B]or something along the lines as this. [*]Go to [B]app/tpl/skins/SKINFOLDER/ [/B]and make a new php file and name it spk, and add the contents of the spk code from this topic into there. [*]Go to your database, right click the table [B]users [/B]and click Design Table (only if you are using Navicat) and add a new field, this field should be called [B]staff_pin [/B]and you will just need to save it, if it says you havent filled anything in, put the type as Varchar and the limit or something as 255. [/LIST] [SPOILER="Bottom of the Client.php file"] <style> body { background-color: #212121; } form { position:absolute; top:30%; right:0; left:0; text-align: center; } select { background-image: url('[URL]http://i.imgur.com/yokKfHN.png');[/URL] background-size: 150px 150px; height: 160px; width: 130px; font-size: 50px; text-indent: 40%; color: orange; border: none; border-radius: 10px; text-align: center } select:focus, input:focus { outline: none; } input { color: orange; background-color: transparent; border: 1px solid orange; height: 100px; width: 100px; border-radius: 100%; font-size: 50px; } select:hover { color: darkorange; } input:hover { color: darkorange; border: 1px solid darkorange; }</style> <?php $connect = mysql_connect("localhost", "root", "my sql password"); mysql_select_db("mysql database name", $connect); $username = $_SESSION["user"]["username"]; $query = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'"); if(mysql_num_rows($query) == 1) { $row = mysql_fetch_assoc($query); $rank = $row["rank"]; if($rank >= 2 && !isset($_SESSION["correct_key"])) { ?> <form action='spk' method='post'> <select name='first'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select> <select name='second'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select> <select name='third'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select> <select name='fourth'> <option value='0'>0</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> </select><br /> <input type='submit' name='staff_key' value='Go' /> </form> <?php exit; } }else { die("Sorry, something went wrong with your account, apparently you do not exist, please try logging in."); } ?> </body></div> [/SPOILER] [SPOILER="spk.php"] <?php session_start(); $username = strip_tags(stripslashes(mysql_real_escape_string($_SESSION["user"]["username"]))); $connect = mysql_connect("localhost", "root", "$wqoiwqwqs"); mysql_select_db("fixeddb", $connect); $first = strip_tags(stripslashes(mysql_real_escape_string($_POST["first"]))); $second = strip_tags(stripslashes(mysql_real_escape_string($_POST["second"]))); $third = strip_tags(stripslashes(mysql_real_escape_string($_POST["third"]))); $fourth = strip_tags(stripslashes(mysql_real_escape_string($_POST["fourth"]))); $key = $first."".$second."".$third."".$fourth; if(is_numeric($key)) { $query = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'"); $row = mysql_fetch_assoc($query); $valid_key = $row["staff_pin"]; if($key == $valid_key) { session_start(); $_SESSION["correct_key"] = $key; }else{ die("Incorrect Key!"); } }else { die("Key must be 4 numbers..."); } ?> <style> body { background-color: #212121; } #container { position: absolute; width: 600px; height: 172px; margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; } #main { width: 500px; text-align: center; height: 70px; padding: 10px; background-color: #333333; border: 1px solid orange; margin: 0 auto; } #main h1 { color: orange; font-size: 20px; font-family: sans-serif; } #nav { box-sizing: border-box; border: 1px solid orange; width: 200px; height: 50px; background-color: #333333; text-align: center; margin: 30 auto; } #nav h2, #nav a { text-decoration: none; color: orange; font-size: 20px; font-family: sans-serif; line-height: 20px; } #nav:hover, #main:hover { border: 1px solid darkorange; } #main h1:hover, #nav h2:hover { color: darkorange; } </style> <div id="container"> <div id="main"> <h1>You have entered your staff pin correctly! Click the button to go back to the client!</h1> </div> <div id="nav"> <a href="{url}/client"><h2>Enter Client</h2></a> </div> </div> [/SPOILER] [B]Screenshot [IMG]http://i.imgur.com/0a9vN0a.png[/IMG] [/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[Release] Staff Pin System for the client
Top