// Clean the post variables foreach ($_POST as $key => $value) { $_POST[$key] = trim($value); } // Some checks // Check command if (empty($_POST['cmd'])) { $errors[] = $lang['tool_acc_err2']; } // Check if command exits $result = $igc->getCommand(strtolower($_POST['cmd'])); if ($result['code'] == 'OK' && strtolower($_POST['cmd']) != $cmd['cmd_name']) { $errors[] = $lang['tool_igcmds_err3']; } // Check function $cmds = $igc->getAvailableCmdFunctions(); if (!isset($cmds[$_POST['func']])) { $errors[] = $lang['tool_igcmds_err4']; } // Check response if (strlen($_POST['response']) > 75) { $errors[] = $lang['tool_igcmds_err5']; } // Set the private response setting $_POST['response_priv'] = 'no'; if (isset($_POST['response_priv'])) { $_POST['response_priv'] = 'yes'; } // Set the rights values $_POST['active'] = 'no'; if (isset($_POST['active'])) {