function displayViewTable($uid, $gid, $tid, $selection) { global $keep_shard, $keep_server, $keep_service, $display_view; // 1. create views tree buildVariableEnv($uid, $gid, $tid, $vardisp, $bounds, $privilege, $tree, $condensed, $autoDisplay); if ($autoDisplay || $display_view) { // 2. select branches if (count($selection) > 0) { foreach ($selection as $sel) { if ($sel != "") { $selarray = expandQuery($sel); foreach ($selarray as $sel) { $address = explode(".", $sel); //echo "select address ".$sel."<br>\n"; addToSelectNode($tree, $address, 0); } } } } // 3. remove unselected branches clearupNode($tree); // 4. build and factorize query $query = factorizeQuery(buildQuery($tree)); if ($numsteps == 5) { echo "Unsupported entity request now<br>\n"; return; } $bef = microtime(); $qstate = nel_query($query, $result); $aft = microtime(); list($usec, $sec) = explode(" ", $bef); $bef = (double) $sec + (double) $usec; list($usec, $sec) = explode(" ", $aft); $aft = (double) $sec + (double) $usec; $tm = (int) (($aft - $bef) * 1000.0); if (!$qstate) { echo "<b>{$result}</b>\n"; } } displayResult($result, $vardisp, $bounds, $privilege, $condensed, $autoDisplay); return "Executed query '{$query}'<br>{$tm} milliseconds computation time<br>\n"; }
echo "<tr valign=top>\n"; echo "<td><table>\n"; $numInCol = 0; while ($result && ($arr = sqlfetch($result))) { if ($numInCol >= 5 || $arr["name"] == 'SEPARATOR') { echo "</table></td><td width=30></td><td><table>\n"; $numInCol = 0; } if ($arr["name"] != 'SEPARATOR') { echo "<tr><td><input type=submit name=execServCommand_" . $arr["vid"] . " value='" . $arr["name"] . "'></td></tr>\n"; ++$numInCol; } } if (isset($listPath) && count($listPath) > 0) { $address = "[" . join(",", $listPath) . "]"; $address = factorizeQuery($address); echo "<input type=hidden name=factPaths value='{$address}'>\n"; } echo "</table></td>\n"; echo "</tr></table>\n"; if (isset($cmdResult)) { echo "<br>Result of command '{$fullPath} {$execServParams}':<br>\n"; echo "<table border=1><tr><td>\n"; echo "<pre>{$cmdResult}</pre>\n"; echo "</td></tr></table>\n"; } } } if (count($queryErrors) > 0) { echo "<br><font size=3><b>Execution errors:</b></font>\n"; foreach ($queryErrors as $error) {