function process_list(&$result, $node) { foreach ($node->tr as $row) { $result[] = process_way($row->td->a); } foreach ($node->i as $row) { process_list($result, $row); } }
foreach ((array) $_POST["kill"] as $val) { if (kill_process($val)) { $killed++; } } queries_redirect(ME . "processlist=", lang('%d process(es) have been killed.', $killed), $killed || !$_POST["kill"]); } page_header(lang('Process list'), $error); ?> <form action="" method="post"> <table cellspacing="0" onclick="tableClick(event);" ondblclick="tableClick(event, true);" class="nowrap checkable"> <?php // HTML valid because there is always at least one process $i = -1; foreach (process_list() as $i => $row) { if (!$i) { echo "<thead><tr lang='en'>" . (support("kill") ? "<th> " : ""); foreach ($row as $key => $val) { echo "<th>{$key}" . doc_link(array('sql' => "show-processlist.html#processlist_" . strtolower($key), 'pgsql' => "monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", 'oracle' => "../b14237/dynviews_2088.htm")); } echo "</thead>\n"; } echo "<tr" . odd() . ">" . (support("kill") ? "<td>" . checkbox("kill[]", $row[$jush == "sql" ? "Id" : "pid"], 0) : ""); foreach ($row as $key => $val) { echo "<td>" . ($jush == "sql" && $key == "Info" && preg_match("~Query|Killed~", $row["Command"]) && $val != "" || $jush == "pgsql" && $key == "current_query" && $val != "<IDLE>" || $jush == "oracle" && $key == "sql_text" && $val != "" ? "<code class='jush-{$jush}'>" . shorten_utf8($val, 100, "</code>") . ' <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Clone') . '</a>' : nbsp($val)); } echo "\n"; } ?> </table>
$response = array(); for ($i = 0; $i <= 90; $i += 10) { $body = execute_request('search', getSearchUrl($zip, $cat, $i)); $search = json_decode(filter_result($body)); $ids = $search->ids; $body = execute_request('doctors', getDoctorsList($ids)); if ($body) { $result = json_decode(filter_result($body)); $list = $result->doctor_locations; foreach ($list as $key => $value) { $results[] = $value; } } else { break; } } $response['doctor_locations'] = $results; return json_encode($response); } if (isset($_GET['action'])) { switch ($_GET['action']) { case 'crawl_zocdoc': $zip = $_GET["zip"]; $cat = $_GET["cat"]; $response = process_list($zip, $cat); echo $response; break; } } else { die('action not set'); }