Central
Imagination is more important than knowledge.
- Feb 22, 2015
- 709
- 107
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:
Screenshot
All you have to do is follow the following steps:
- With the code's you will see below you will need to edit them
- The code marked bottom of the client.php file you will need to change mysql password to your mysql password
- As well as changing mysql database name with your database name
- Once completed those, please add that code to the bottom of the client.php, add it after <div class="client"></div> or something along the lines as this.
- Go to app/tpl/skins/SKINFOLDER/ 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 users and click Design Table (only if you are using Navicat) and add a new field, this field should be called staff_pin 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.
<style> body {
background-color: #212121;
}
form {
position:absolute;
top:30%;
right:0;
left:0;
text-align: center;
}
select {
background-image: 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>
background-color: #212121;
}
form {
position:absolute;
top:30%;
right:0;
left:0;
text-align: center;
}
select {
background-image: url('
You must be registered for see links
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>
<?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>
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>
Screenshot