<?php require __DIR__ . '/../../vendor/autoload.php'; use opensrs\OMA\ChangeCompany; if ($_SERVER['REQUEST_METHOD'] === 'POST') { require_once dirname(__FILE__) . '/../../opensrs/openSRS_loader.php'; // Put the data to the Formatted array $callArray = array('company' => $_POST['user'], 'attributes' => array('password' => $_POST['password'], 'spamtag' => $_POST['spamtag'], 'allow' => explode(',', $_POST['allow']), 'block' => explode(',', $_POST['block']))); if (!empty($_POST['token'])) { $callArray['token'] = $_POST['token']; } // Open SRS Call -> Result $response = ChangeCompany::call(array_filter_recursive($callArray)); // Print out the results echo ' In: ' . json_encode($callArray) . '<br>'; echo 'Out: ' . $response; } else { // Format if (isset($_GET['format'])) { $tf = $_GET['format']; } else { $tf = 'json'; } ?> <?php include 'header.inc'; ?> <div class="container"> <h3>change_company</h3>