index.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. if (cfr('UHW')) {
  3. $uhw = new UHW();
  4. //module control panel display
  5. show_window('', $uhw->panel());
  6. if (!wf_CheckGet(array('showbrute'))) {
  7. //json reply
  8. if (wf_CheckGet(array('ajax'))) {
  9. $loginFilter = (wf_CheckGet(array('username'))) ? $_GET['username'] : '';
  10. $uhw->ajaxGetData($loginFilter);
  11. }
  12. //list all UHW usage list
  13. $searchLogin = (wf_CheckGet(array('username'))) ? $_GET['username'] : '';
  14. show_window(__('UHW successful log'), $uhw->renderUsageList($searchLogin));
  15. if (!empty($searchLogin)) {
  16. show_window('', web_UserControls($searchLogin));
  17. }
  18. } else {
  19. //deleting brute
  20. if (wf_CheckGet(array('delbrute'))) {
  21. $uhw->deleteBrute($_GET['delbrute']);
  22. rcms_redirect("?module=uhw&showbrute=true");
  23. }
  24. //cleanup of all brutes
  25. if (wf_CheckGet(array('cleanallbrute'))) {
  26. $uhw->flushAllBrute();
  27. rcms_redirect("?module=uhw&showbrute=true");
  28. }
  29. $cleanupLink = wf_JSAlert('?module=uhw&showbrute=true&cleanallbrute=true', wf_img('skins/icon_cleanup.png', __('Cleanup')), 'Are you serious');
  30. show_window(__('Brute attempts') . ' ' . $cleanupLink, $uhw->renderBruteAttempts());
  31. }
  32. } else {
  33. show_error(__('Permission denied'));
  34. }
  35. ?>