Country-Code: {$country} Phone: {$phone} Created: {$time} Updated: {$time} Updated-By: {$hostmaster} CODE; $network = <<<CODE ID: net-{$net_block} Auth-Area: {$auth_area} Network-Name: {$company}-{$net_block} IP-Network: {$net_block} Organization: {$org_name} Tech-Contact: {$tech_contact} Admin-Contact: {$tech_contact} Created: {$time} Updated: {$time} Updated-By: {$hostmaster} CODE; //write the org file $org_file = $config['root'] . '/etc/rwhoisd/net-' . $auth_area_dashed . '/data/org/' . $net_block_dashed . '.txt'; dolog('adding new org file (' . $org_file . '): ' . "\n" . $org); unlink($org_file); file_put_contents($org_file, $org); //write the network file $net_file = $config['root'] . '/etc/rwhoisd/net-' . $auth_area_dashed . '/data/network/' . $net_block_dashed . '.txt'; dolog('adding new network file (' . $net_file . '): ' . "\n" . $network); unlink($net_file); file_put_contents($net_file, $network); //update server updateServer($auth_area);
if (isset($_REQUEST['id'])) { $id = $_REQUEST['id']; } $form["internalName"] = $_REQUEST["internalName"]; $form["externalName"] = $_REQUEST["externalName"]; $form["status"] = $_REQUEST["status"]; $form["role"] = $_REQUEST["role"]; $form["pool"] = ""; // $_REQUEST["pool"]; if ($_REQUEST['action'] == 'delete') { header("Location: deleteserver.php?id={$id}"); return; } if ($_REQUEST['action'] == 'update') { // Update a server; go back to serverlist.php updateServer($id, $form); } if ($_REQUEST['action'] == 'setup') { // Redirect to serverconf.php header("Location: serverconf.php?server={$form['internalName']}"); return; } if ($_REQUEST['action'] == 'test') { // Redirect to serverconf.php header("Location: servertest.php?server={$form['internalName']}"); return; } if ($_REQUEST['action'] == 'Add Server') { // Add new server; go back to serverlist.php $id = createServer($form); }