Is it possible for a pin system RevCMS?
Printable View
Is it possible for a pin system RevCMS?
You want add a system pin every time when user enter in client?
Make one or ask someone to make you one.
First add this in your client.php after includes system:
And this on end of client.phpPHP Code:if (isset($_POST['pin'])) {
$sql = mysql_fetch_array(mysql_query("SELECT pin FROM users WHERE username='".$_SESSION['username']."' LIMIT 1"));
if ($sql['pin']==mysql_real_escape_string($_POST['pin'])) {
$_SESSION['pin'] = "1";
}
}
if (empty($_SESSION['pin'])) {
echo '<form method="post">';
echo 'Please, put your pin for continue on game:<br>';
echo '<input type="password" name="pin" id="pin" /><br>';
echo '<input type="submit" value="Continue" />';
echo '</form>';
}
Obs: All those codes must be placed between <?php and ?> tagsPHP Code:unset($_SESSION['pin']);
I don't have any certain if this works on revcms. I just create a very simple code of pin. If dont works look the session username.
Dont forget for add this in your table users:
pin int 11 dont null