• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[ Tutorial ] How to Secure you're staff's account's [ Solution ]

Status
Not open for further replies.
Newbie Spellweaver
Joined
May 13, 2013
Messages
27
Reaction score
5
Hey Ragezone,

I don't know if this Tutorial has been released yet.

Today I want to show you how to secure your staff's account's


I - SQL

1) Create a Table that would keep the IP's.

We start creating a table that would keep the IP's, incase if someone else got acces on the staff account with a different IP he would not have acces on the housekeeping, This table Would have 2 collums: `ip`, `pseudo`. than you will see that each account have the login IP. This is the SQL to add in you're database :


CREATE TABLE IF NOT EXISTS `ip_staff` ( `ip` varchar(255) NOT NULL, `pseudo` varchar(255) NOT NULL DEFAULT 'AUCUN') ENGINE=MyISAM DEFAULT CHARSET=latin1;
- - - - - - - - - - - - - - - - - - - - - - - - - - -
2) Complete the table.

To complete the table, Click on "Insert" Than in IP, enter the IP off the staff, In psuedo enter the staff username, than save it


II - Redirection (on PHP)

1) We create our mini security system.

We are now going to make the PHP code that would search the computer that try to login with the staff account, and will compare the IP with the IP given in the Database (You will have to make a page a redirection page, we will call it,
"staff_protect.php".



Put the following code in to the CMS main folder : (in my case its global.php)




<?php/** système anti intrusion par OvZ (peut être modifié/supprimé) **/if($user['rank'] >= 4) {$lancer[1] = mysql_query("SELECT ip,pseudo FROM ip_staff WHERE ip = '".$_SERVER['REMOTE_ADDR']."'");$donnees[1] = mysql_fetch_array($lancer[1]);if($donnees[1][pseudo] != $user['username']) {header("location:./staff_protect.php");die();}} ?>
Your staffs will be now secured ( you will never know if your mods give there password to someone to buy some furni's in the staff catalogue )

Credits:

Forum : Ibuild
User : OVZCMS
ME : for the translation & the share :w00t:

Crowey
 
Last edited:
Developer
Loyal Member
Joined
Jul 28, 2009
Messages
983
Reaction score
133
I've to agree with Spheral, i had the same system as you. But 50% of my staff members had a dynamic ip.
However, what you could do is create a cookie with some security information in it, and then check it with the database.
 
Newbie Spellweaver
Joined
May 13, 2013
Messages
27
Reaction score
5
released, stupid ? ignore this thread. K thanks
 
Newbie Spellweaver
Joined
May 13, 2013
Messages
27
Reaction score
5
Did u guys read?

Credits:

Forum : Ibuild
User : OVZCMS
ME : for the translation & the share :w00t:

Crowey
 
Status
Not open for further replies.
Back
Top