Ejemplo n.º 1
0
<?php

if (cfr('UHW')) {
    $uhw = new UHW();
    //module control panel display
    show_window('', $uhw->panel());
    if (!wf_CheckGet(array('showbrute'))) {
        //json reply
        if (wf_CheckGet(array('ajax'))) {
            die($uhw->ajaxGetData());
        }
        //list all UHW usage list
        show_window(__('UHW successful log'), $uhw->renderUsageList());
    } else {
        //deleting brute
        if (wf_CheckGet(array('delbrute'))) {
            $uhw->deleteBrute($_GET['delbrute']);
            rcms_redirect("?module=uhw&showbrute=true");
        }
        //cleanup of all brutes
        if (wf_CheckGet(array('cleanallbrute'))) {
            $uhw->flushAllBrute();
            rcms_redirect("?module=uhw&showbrute=true");
        }
        $cleanupLink = wf_JSAlert('?module=uhw&showbrute=true&cleanallbrute=true', wf_img('skins/icon_cleanup.png', __('Cleanup')), 'Are you serious');
        show_window(__('Brute attempts') . ' ' . $cleanupLink, $uhw->renderBruteAttempts());
    }
} else {
    show_error(__('You cant control this module'));
}
Ejemplo n.º 2
0
         $backpath = zb_backup_tables('*', true);
     }
     die('OK:BACKUPDB ' . $backpath);
 }
 /*
  * database cleanup
  */
 if ($_GET['action'] == 'autocleandb') {
     $cleancount = zb_DBCleanupAutoClean();
     die('OK:AUTOCLEANDB ' . $cleancount);
 }
 /*
  * UHW brute attempts cleanup
  */
 if ($_GET['action'] == 'uhwbrutecleanup') {
     $uhw = new UHW();
     $uhw->flushAllBrute();
     die('OK:UHWBRUTECLEANUP');
 }
 /*
  * SNMP switch polling
  */
 if ($_GET['action'] == 'swpoll') {
     $allDevices = sp_SnmpGetAllDevices();
     $allTemplates = sp_SnmpGetAllModelTemplates();
     $allTemplatesAssoc = sp_SnmpGetModelTemplatesAssoc();
     $allusermacs = zb_UserGetAllMACs();
     $alladdress = zb_AddressGetFullCityaddresslist();
     $alldeadswitches = zb_SwitchesGetAllDead();
     if (!empty($allDevices)) {
         foreach ($allDevices as $io => $eachDevice) {