<?php

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Put the data to the Formatted array
    $callArray = array("user" => $_POST["user"], "attributes" => array("name" => $_POST["name"], "password" => $_POST["password"], "delivery_forward" => $_POST["delivery_forward"], "forward_recipients" => $_POST["forward_recipients"], "spamtag" => $_POST["spamtag"], "autoresponder" => "TEST Auto responder", "allow" => explode(",", $_POST["allow"]), "block" => explode(",", $_POST["block"])), "create_only" => $_POST["create_only"] ? true : false);
    if (!empty($_POST["token"])) {
        $callArray["token"] = $_POST["token"];
    }
    // Open SRS Call -> Result
    require_once dirname(__FILE__) . "/../../opensrs/openSRS_loader.php";
    $response = ChangeUser::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_user</h3>
<form action="" method="post" class="form-horizontal" >
	<div class="control-group">
예제 #2
0
<?php

require_once "conf.ChangeUser.php";
$count = 0;
$thisApp = new ChangeUser(array('app_name' => $APPLICATION_NAME, 'app_version' => '1.0.0', 'app_type' => 'WEB', 'app_auth_dsn' => $APP_DSN, 'app_db_url' => $APP_DSN, 'app_authentication' => TRUE, 'app_auto_authenticate' => TRUE, 'app_exit_point' => $_SERVER['SCRIPT_NAME'], 'app_session_name' => 'PHPSESSION', 'app_auto_connect' => TRUE, 'app_debugger' => $ON, 'app_themes' => TRUE));
$thisApp->bufferDebugging();
$thisApp->debug("This is {$thisApp->app_name_} application.");
$thisApp->debug(ini_get('include_path'));
$thisApp->run();
$thisApp->debugArray($_SESSION);
$thisApp->dumpDebugInfo();