if (isset($_POST['function'])) {
    require_once dirname(__FILE__) . '/../..//opensrs/openSRS_loader.php';
    // Form data capture
    $formFormat = $_POST['format'];
    // Put the data to the Formatted array
    $callstring = '';
    $callArray = array('func' => $_POST['function'], 'data' => array('cookie' => $_POST['cookie'], 'domain' => $_POST['domain'], 'reg_password' => $_POST['reg_password']));
    if ($formFormat == 'json') {
        $callstring = json_encode($callArray);
    }
    if ($formFormat == 'yaml') {
        $callstring = Spyc::YAMLDump($callArray);
    }
    // Open SRS Call -> Result
    $osrsHandler = processOpenSRS($formFormat, $callstring);
    // Print out the results
    echo ' In: ' . $callstring . '<br>';
    echo 'Out: ' . $osrsHandler->resultFullFormatted;
} else {
    // Format
    if (isset($_GET['format'])) {
        $tf = $_GET['format'];
    } else {
        $tf = 'json';
    }
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
Exemple #2
0
<?php

if (isset($_POST['function'])) {
    require_once '../opensrs/openSRS_loader.php';
    $callstring = '';
    $firstname = trim($_POST['firstname']);
    $lastname = trim($_POST['lastname']);
    $searchstring = $firstname . ' ' . $lastname;
    $callArray = array('func' => $_POST['function'], 'data' => array('searchstring' => $searchstring));
    $callstring = json_encode($callArray);
    // Open SRS Call -> Result
    $osrsHandler = processOpenSRS('json', $callstring);
    $json_out = $osrsHandler->resultFormatted;
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" >
<head>
	<link rel="stylesheet" href="css/template.css" type="text/css" />
	<link rel="stylesheet" href="css/template-about.css" type="text/css" />

  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
	<script language="Javascript" type="text/javascript" src="js/runonload.js"></script>
	<script language="Javascript" type="text/javascript" src="js/democode.js"></script>	

	
	<style media="screen" type="text/css">
	.defaultText { width: 205px; height: 39px; font-size: 20px;}
	.defaultTextActive { color: #a1a1a1; font-style: italic;}
	input.headerboxNameSuggest {
Exemple #3
0
<?php

if (isset($_POST['function'])) {
    require_once "../opensrs/spyc.php";
    $callstring = "";
    $firstname = trim($_POST["firstname"]);
    $lastname = trim($_POST["lastname"]);
    $searchstring = $firstname . " " . $lastname;
    $callArray = array("func" => $_POST["function"], "data" => array("searchstring" => $searchstring));
    $callstring = json_encode($callArray);
    // Open SRS Call -> Result
    require_once "../opensrs/openSRS_loader.php";
    $osrsHandler = processOpenSRS("json", $callstring);
    $json_out = $osrsHandler->resultFormatted;
    if (isset($json_out)) {
        echo '<table>';
        $json_a = json_decode($json_out, true);
        $counter = 0;
        foreach ($json_a[suggestion][items] as $item) {
            if ($item[status] == "available") {
                $domain = preg_replace("/\\./", "@", $item[domain], 1);
                if ($counter == 0) {
                    echo '<p id="available"><strong>' . $domain . '</strong> is available.</p>';
                    echo '<h2>Available Email Addresses</h2>';
                }
                $temp = $counter % 2 + 1;
                echo '<tr class="listLine' . $temp . '";"><td>' . $domain . '</td><td>' . $item[status] . '</td></tr>';
                $counter++;
            }
            if ($counter == 20) {
                break;
function opensrspro_viewdomainnotes($params)
{
    global $osrsError;
    global $osrsLogError;
    $domain = $params['sld'] . '.' . $params['tld'];
    $params = array_merge($params, getConfigurationParamsData());
    $command = 'getadmindetails';
    $adminuser = '';
    $values = '';
    $results = localAPI($command, $values, $adminuser);
    $callArray = array('func' => 'viewDomainNotes', 'data' => array('domain' => $domain), 'connect' => generateConnectData($params));
    $result = "";
    $openSRSHandler = processOpenSRS("array", $callArray);
    $result = '<table cellspacing="1" cellpadding="3" width="100%" border="0" class="datatable"><tbody>';
    $result .= '<th>Notes</th>';
    $result .= '<th>Date</th>';
    foreach ($openSRSHandler->resultFullRaw['attributes']['notes'] as $notesData) {
        $result .= '<tr>';
        $result .= '<td>' . $notesData['note'] . '</td>';
        $result .= '<td width=18%>' . $notesData['timestamp'] . '</td>';
        $result .= '</tr>';
    }
    $result .= '</tbody><table>';
    echo $result;
    exit;
}