if ($a_tasks[$task_id]['action'] == 'INVENTORY' and $ptcm->isActivated('inventoryocs') and $a_agent['module_inventory'] == '1') { $ptc->addInventory(); $input['ID'] = $task_id; $ptt->delete($input); $ocsinventory = '0'; $single = 1; } if ($a_tasks[$task_id]['action'] == 'NETDISCOVERY' and $ptcm->isActivated('netdiscovery') and $a_agent['module_netdiscovery'] == '1') { $single = 1; $ptc->addDiscovery($pxml, 1); $input['ID'] = $task_id; $ptt->delete($input); } if ($a_tasks[$task_id]['action'] == 'SNMPQUERY' and $ptcm->isActivated('snmp') and $a_agent['module_snmpquery'] == '1') { $single = 1; $ptc->addQuery($pxml, 1); $input['ID'] = $task_id; $ptt->delete($input); } if ($a_tasks[$task_id]['action'] == 'WAKEONLAN' and $ptcm->isActivated('wol') and $a_agent['module_wakeonlan'] == '1') { $single = 1; $ptc->addWakeonlan($pxml); $input['ID'] = $task_id; $ptt->delete($input); } } if ($single == "0") { if ($a_agent['module_netdiscovery'] == '1') { $ptc->addDiscovery($pxml); } if ($a_agent['module_snmpquery'] == '1') {