isAdmin()) doError('Insufficient Permissions.'); include($DIR_LIBS . 'PLUGINADMIN.php'); // some functions function SE_unlockLogin($login) { sql_query("DELETE FROM ".sql_table('plug_securityenforcer')." WHERE login='".addslashes($login)."'"); } // checks // create the admin area page $oPluginAdmin = new PluginAdmin('SecurityEnforcer'); // add styles to the $oPluginAdmin->start(''); // if form to unlock is posted if(postVar('action') == 'unlock') { if (!$manager->checkTicket()) doError('Invalid Ticket'); $logins = postVar('unlock'); $message = ''; if(is_array($logins)) { foreach ($logins as $entity) { SE_unlockLogin($entity); $message .= '
' . $entity . _SECURITYENFORCER_ADMIN_UNLOCKED; } } } $plug =& $oPluginAdmin->plugin; // page title echo '

Security Enforcer Administration

'; // error output if($message) { echo "

"; echo $message; echo "

"; } // generate table from all entries in the database echo '

'._SECURITYENFORCER_LOCKED_ENTITIES.'

'; echo '
'; echo ''; $manager->addTicketHidden(); echo ''; echo ''; echo ''; // do query to get all entries, loop $result = sql_query("SELECT * FROM ".sql_table("plug_securityenforcer")." WHERE fails >= ".$plug->max_failed_login); if(sql_num_rows($result)) { while($row = sql_fetch_assoc($result)) { echo ''; echo ''; echo ''; echo ''; } } else { echo ''; } echo ''; echo '
'._SECURITYENFORCER_ENTITY.'Unlock?
'.htmlspecialchars($row['login']).''._SECURITYENFORCER_UNLOCK.'
'._SECURITYENFORCER_ADMIN_NONE_LOCKED.'
'; echo '
'; $oPluginAdmin->end(); ?>