예제 #1
0
파일: hook.php 프로젝트: carriercomm/WHMCS
        switch ($hook_type) {
            case 'order':
                $vars = array('orderid' => $_POST['orderid']);
                monitisOrderHookHandler($vars, $hook);
                break;
            case 'module':
                $vars = array('serviceid' => $_POST['serviceid'], 'userid' => $_POST['userid']);
                monitisModuleHookHandlerAlt($vars, $hook);
                break;
            case 'edit':
                $vars = array('serviceid' => $_POST['serviceid'], 'userid' => $_POST['userid']);
                monitisEditHookHandler($vars, $hook);
                break;
            case 'addon':
                $vars = array('id' => $_POST['addonserviceid'], 'addonserviceid' => $_POST['addonserviceid'], 'serviceid' => $_POST['serviceid'], 'userid' => $_POST['userid'], 'addonid' => $_POST['addonid']);
                monitisAddonHookHandler($vars, $hook);
                break;
            case 'multiple':
                $type = $_POST["producttype"];
                if ($type == 'addon') {
                    $resp = MonitisHookClass::applyCreateAddonMonitor($_POST['addonserviceid'], $_POST['serviceid'], $_POST['userid']);
                } else {
                    $resp = MonitisHookClass::applyCreateConfigOptionMonitor($_POST['option_id'], $_POST['productid'], $_POST['serviceid']);
                }
                break;
        }
    } elseif ($action == 'clean') {
        monitisSqlHelper::altQuery('DELETE FROM ' . MONITIS_HOOK_REPORT_TABLE);
    }
}
$list = monitisSqlHelper::query('SELECT * FROM ' . MONITIS_HOOK_REPORT_TABLE . ' ORDER BY `date` DESC');
예제 #2
0
파일: hooks.php 프로젝트: carriercomm/WHMCS
function hook_monitis_AddonAdd($vars)
{
    require_once 'monitisapp.php';
    monitisAddonHookHandler($vars, 'active');
}