Exemplo n.º 1
0
<?php

require_once 'client.php';
session_start();
if ($_SESSION["username"] == '') {
    header("Location: index.php");
    exit;
}
// 1 Get the ReoportUnit ResourceDescriptor...
$currentUri = "/";
if ($_GET['uri'] != '') {
    $currentUri = $_GET['uri'];
}
$result = ws_get($currentUri);
if (is_soap_fault($result)) {
    $errorMessage = $result->getFault()->faultstring;
    echo $errorMessage;
    exit;
} else {
    $folders = getResourceDescriptors($result);
}
if (count($folders) != 1 || $folders[0]['type'] != 'reportUnit') {
    echo "<H1>Invalid RU ({$currentUri})</H1>";
    echo "<pre>{$result}</pre>";
    exit;
}
$reportUnit = $folders[0];
// 2. Prepare the parameters array looking in the $_GET for params
// starting with PARAM_ ...
//
$report_params = array();
Exemplo n.º 2
0
                        <?php 
                    }
                    ?>
        </select>

    <?php 
                } else {
                    if ($controlType == IC_TYPE_SINGLE_SELECT_QUERY) {
                        ?>
        <select name="<?php 
                        echo "PARAM_" . $rd['name'];
                        ?>
">
                <?php 
                        // Get the list of entries....
                        $result = ws_get($rd['uri'], array(IC_GET_QUERY_DATA => $dsUri));
                        $rds = getResourceDescriptors($result);
                        $rd = $rds[0];
                        $datarows = $rd['properties'][PROP_QUERY_DATA]['properties'];
                        foreach ($datarows as $datarow) {
                            $row_value = $datarow['value'];
                            $row_label = "";
                            $k = 0;
                            foreach ($datarow['properties'] as $datacolumn) {
                                if ($k > 0) {
                                    $row_label .= "   |   ";
                                }
                                $row_label .= $datacolumn['value'];
                                $k++;
                            }
                            ?>